Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grafana Zabbix plugin support added #31

Merged
merged 2 commits into from
Apr 4, 2017
Merged

Grafana Zabbix plugin support added #31

merged 2 commits into from
Apr 4, 2017

Conversation

dmajere
Copy link
Contributor

@dmajere dmajere commented Apr 2, 2017

Grafana Zabbix pluging support added.
Plugin docs: http://docs.grafana-zabbix.org/

@jml jml changed the title Grafana Zabbix pluging support added Grafana Zabbix plugin support added Apr 3, 2017
Copy link
Contributor

@jml jml left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, this is great, thank you.

A few minor comments.

if not re.match("^[+-]?\d*[smhdMY]$", value):
raise ValueError(
"valid interval should be a string "
"matching an expressiong: ^[+-]?\d*[smhdMY]$. "

This comment was marked as abuse.

raise ValueError(
"valid interval should be a string "
"matching an expressiong: ^[+-]?\d*[smhdMY]$. "
"Exaxples: 24h 7d 1M +24h -24h")

This comment was marked as abuse.

"""
if isinstance(value, int) or isinstance(value, float):
return
raise ValueError("{attr} should be interger or float".format(

This comment was marked as abuse.

A validator that raises a :exc:`ValueError` if the attribute value is not
a number (not int or float).
"""
if isinstance(value, int) or isinstance(value, float):

This comment was marked as abuse.


__options = ("avg", "min", "max", "median")
__default_interval = "1m"
__default_function = "avg"

This comment was marked as abuse.

http://docs.grafana-zabbix.org/reference/functions/#scale
"""

__default_factor = 100

This comment was marked as abuse.

@dmajere
Copy link
Contributor Author

dmajere commented Apr 3, 2017

Fixed according to @jml comments

@jml jml merged commit 6c6b3bd into weaveworks:master Apr 4, 2017
@dmajere dmajere deleted the zabbix branch April 10, 2017 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants