zabbix-grab-bag
zabbix-grab-bag copied to clipboard
ERROR: Connection failure. Exception: global name 'is_master_node' is not defined
Hi,
If i enable master_only = True, it always gives an error (also on the masternode): ERROR: Connection failure. Exception: global name 'is_master_node' is not defined
I fixed this by installing curator, and import it in the es_stats_zabbix/utils.py script. Here is a diff with my version:
# diff es_stats_zabbix/utils.py /tmp/utils.py.orig
6d5
< import curator
88c87
< if master_only and not curator.is_master_node(client):
---
> if master_only and not is_master_node(client):
is this the right way to fix this?
Thanks, Erik
Sorry for the belated response.
Your suggestion should fix it temporarily. Thanks for reporting the bug. I will probably make curator
a dependency to use the client methods in there (that way I don't have to maintain them in two places).
The benefit will be YAML client configuration files, too. INI is pretty crusty and old.