dkanbier / zabbix-elasticsearch

Scripts and Zabbix templates to monitor Elasticsearch
Other
13 stars 11 forks source link

Error when use node name #1

Closed caiohasouza closed 7 years ago

caiohasouza commented 7 years ago

Hello,

I'm trying use module with node name (es.domain.local) of my elasticsearch, but i have this error:

zbx_es.py nodes.stats nodes.es.domain.local.indices.docs.count Traceback (most recent call last): File "/tmp//zabbix-elasticsearch/zbx_es.py", line 73, in returnval = config.get(key_string) File "/usr/lib/python2.6/site-packages/kaptan/init.py", line 95, in get raise KeyError(key) KeyError: 'nodes.es.domain.local.indices.docs.count'

If i use ID all works: zbx_es.py nodes.stats nodes.l10Q__f6Tf65DZWlIbYvag.indices.docs.count 56841

Do you can help me please?

Best regards

dkanbier commented 7 years ago

I think it's because there are dots in the node name, which is not handled properly by the script. I'll try to fix this today, I think it can be fixed.

caiohasouza commented 7 years ago

Hi @dkanbier,

Perfect, thank very much! I'm waiting for you!

dkanbier commented 7 years ago

@xdexter please give the new commit a go and let me know if it works.

Regards!

caiohasouza commented 7 years ago

@dkanbier

Perfect, now it works, thank you very much!

dkanbier commented 7 years ago

Thanks for the update!