elastizabbix
elastizabbix copied to clipboard
error in zabbix_agent log file
Hi, Nice script for zabbix in our setup it seems to work fine however in the agent log there are errors on all elasticsearch nodes
return json.load(open(cache))
File "/usr/lib/python2.7/json/init.py", line 278, in load
*_kw)
File "/usr/lib/python2.7/json/init.py", line 326, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
Traceback (most recent call last):
File "/opt/zabbix/scripts/elastizabbix.py", line 63, in
this happens on ubuntu 12.04
I'm seeing this also -- here's an example from the zabbix server log:
13966:20160916:114202.405 item "scmon-es1:elastizabbix[nodes,nodes.8r_wOHz-SvO9_bX8cmny5g.breakers.fielddata.tripped]" became not supported: Received value [Traceback (most recent call last): File "/etc/zabbix/externalscripts/elastizabbix.py", line 76, in
What's happening is that elastizabbix script is occasionally generating python errors which are being sent from zabbix agent to zabbix server as the script return value. The zabbix server is (correctly) saying that the python error output is not compatible with the data type (unsigned) expected...
Why elastizabbix is throwing errors and why zabbix agent is passing them to the server... I have not figured out yet.
zabbix-agent-2.4.4-1.el6.x86_64 on Red Hat Enterprise Linux Server release 7.0 (Maipo)
Looks to me that you're not getting valid responses back from elasticsearch:
ValueError("No JSON object could be decoded")
It very well could be because of a timeout situation if your elasticsearch nodes are responding slow. Try adding "timeout=150" to this line: https://github.com/mkhpalm/elastizabbix/blob/master/agent/elastizabbix#L37
And make sure you increase your zabbix agent conf file's Timeout setting to match.
If you are not using http://localhost:9200/ as backend server address. you should modify https://github.com/mkhpalm/elastizabbix/blob/master/agent/elastizabbix#L11-L16