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

local variable 'node' referenced before assignment #7

Open
itJunky opened this issue Mar 10, 2016 · 3 comments
Open

local variable 'node' referenced before assignment #7

itJunky opened this issue Mar 10, 2016 · 3 comments

Comments

@itJunky
Copy link

itJunky commented Mar 10, 2016

When i run this script by hand i getting error. How can i fix it?
root@elastic1 ~ # sudo -u zabbix /etc/zabbix/scripts/elasticsearch.py status
Traceback (most recent call last):
File "/etc/zabbix/scripts/elasticsearch.py", line 116, in
main()
File "/etc/zabbix/scripts/elasticsearch.py", line 93, in main
out += getKeys(node,traps2) #getting stats values
UnboundLocalError: local variable 'node' referenced before assignment

@itJunky
Copy link
Author

itJunky commented Mar 10, 2016

After update a script to latest version, error changed to "Unable to load JSON data!"

@itJunky
Copy link
Author

itJunky commented Apr 7, 2016

Why you doesn't use a url 'localhost:9200/_cat/nodes?v' for getting node list?
'_nodes/_local/stats?all=true' get unparseble long output about cluster and doesn't have a list of nodes.

@itJunky
Copy link
Author

itJunky commented May 19, 2016

After rename a node names from ip to domain, i can getting output without errors

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

No branches or pull requests

1 participant