MrCirca / zabbix-glusterfs

Monitoring GlusterFS Discovery storage with Zabbix 3.4
MIT License
16 stars 21 forks source link

json output parsing error #4

Open inittabr opened 4 years ago

inittabr commented 4 years ago

gstatus --version gstatus 1.0.4 gstatus output result - correct. When run gstatus_discovery.py - JSONDecodeError. ./gstatus_discovery.py Traceback (most recent call last): File "./gstatus_discovery.py", line 9, in gluster_info = json.loads(json_part) File "/usr/lib64/python3.6/json/init.py", line 354, in loads return _default_decoder.decode(s) File "/usr/lib64/python3.6/json/decoder.py", line 342, in decode raise JSONDecodeError("Extra data", s, end) json.decoder.JSONDecodeError: Extra data: line 1 column 2 (char 1)

gpavinteractiv commented 3 years ago

gstatus from 1.0.x changed somewhat since previous releases. it's now based on pyhton3 et output format is different as far as I remember.

thetuxinator commented 2 years ago

Any fix for this? https://stackoverflow.com/questions/48140858/json-decoder-jsondecodeerror-extra-data-line-2-column-1-char-190 sounds explanatory, however i am no python men, so can't fix it myself.

thetuxinator commented 2 years ago

looks like https://github.com/fabricat/zabbix-glusterfs fixed it on his fork

thetuxinator commented 2 years ago

He also https://github.com/mofm/zabbix-glusterfs