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

error in zabbix_agent log file #5

Open
Trikke76 opened this issue Jul 22, 2016 · 3 comments
Open

error in zabbix_agent log file #5

Trikke76 opened this issue Jul 22, 2016 · 3 comments

Comments

@Trikke76
Copy link

Trikke76 commented Jul 22, 2016

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
stat = get_stat(api, stat)
File "/opt/zabbix/scripts/elastizabbix.py", line 31, in get_stat
d = get_cache(api)
File "/opt/zabbix/scripts/elastizabbix.py", line 28, in get_cache
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")

this happens on ubuntu 12.04

@lmgray
Copy link

lmgray commented Sep 16, 2016

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 stat = get_stat(api, stat) File "/etc/zabbix/externalscripts/elastizabbix.py", line 44, in get_stat d = get_cache(api) File "/etc/zabbix/externalscripts/elastizabbix.py", line 41, in get_cache return json.load(open(cache)) File "/usr/lib64/python2.7/json/init.py", line 290, in load **kw) File "/usr/lib64/python2.7/json/init.py", line 338, in loads return _default_decoder.decode(s) File "/usr/lib64/python2.7/json/decoder.py", line 365, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib64/python2.7/json/decoder.py", line 383, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded] is not suitable for value type [Numeric (unsigned)] and data type [Decimal]

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)

@mkhpalm
Copy link
Owner

mkhpalm commented Sep 18, 2016

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.

@zhujinhe
Copy link

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

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

4 participants