-
Notifications
You must be signed in to change notification settings - Fork 318
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
Conversation
There was a problem hiding this 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.
grafanalib/zabbix.py
Outdated
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.
This comment was marked as abuse.
Sorry, something went wrong.
grafanalib/zabbix.py
Outdated
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.
This comment was marked as abuse.
Sorry, something went wrong.
grafanalib/zabbix.py
Outdated
""" | ||
if isinstance(value, int) or isinstance(value, float): | ||
return | ||
raise ValueError("{attr} should be interger or float".format( |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
grafanalib/zabbix.py
Outdated
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.
This comment was marked as abuse.
Sorry, something went wrong.
grafanalib/zabbix.py
Outdated
|
||
__options = ("avg", "min", "max", "median") | ||
__default_interval = "1m" | ||
__default_function = "avg" |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
grafanalib/zabbix.py
Outdated
http://docs.grafana-zabbix.org/reference/functions/#scale | ||
""" | ||
|
||
__default_factor = 100 |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
Fixed according to @jml comments |
Grafana Zabbix pluging support added.
Plugin docs: http://docs.grafana-zabbix.org/