untergeek / zabbix-grab-bag

This is a collection of miscellaneous scripts for Zabbix data collection, maintenance, etc.
Other
105 stars 31 forks source link

pyes is way outdated. Use elasticsearch-py #5

Closed untergeek closed 8 years ago

untergeek commented 9 years ago

Need to update the ESZabbix.py scripts to use the official elasticsearch python client.

davidelang commented 8 years ago

pyes also broke it's API so that the current ESzabbix.py no longer runs with it (pyes0.19.1 broke it)

untergeek commented 8 years ago

Yep. Sorry bout that. I've been rethinking the model since the stats API is different from the current model too.

davidelang commented 8 years ago

If you haven't seen it, I would suggest that you look at http://blog.sepa.spb.ru/2014/12/elasticsearch-internals-monitoring-by.html

It doesn't depend on a specific python client (although it does depend on the restful interface not changing), and it has the advantage of less load since it gathers lots of data at once rather than querying for each data item. It does it with zabbix traps to gather most of the data, but a sufficiently smart active-mode agent could get similar efficiency.

It is lacking in cluster status info and doesn't do discovery to get per-index data or other things like that, but it may be that some sort of mix of approaches will end up being the right answer.

untergeek commented 8 years ago

I work for Elastic, so I have the advantage of knowing about the API changes :wink:

This just hasn't been a priority for me. I agree with the approach of having the script poll once per minute and send the stats back as a batch, though. That's been my approach for this sort of thing in recent scripts.

untergeek commented 8 years ago

This commit (https://github.com/untergeek/zabbix-grab-bag/commit/1bb064980eb40e450f23056e8e5ee4f97135b0d8) should fix all issues. It enables new functionality and is much more extensible than the previous iteration.

untergeek commented 8 years ago

@davidelang please try this and let me know what you think.

untergeek commented 8 years ago

Going to close this. Reopen, or create a new issue if you see something that could be changed or improved.