zabbix-disk-performance icon indicating copy to clipboard operation
zabbix-disk-performance copied to clipboard

Issues with python2 on RH5

Open unforgiving opened this issue 7 years ago • 2 comments

Hi,

I need some help here. I had to change "import json" to "import simplejson as json", RH5 doesn't have json installed by default, so I've installed simplejson. But now I'm getting a different error:


Traceback (most recent call last): File "/usr/local/bin/lld-disks.py", line 12, in ? data = [{"{#DEVICENAME}": device} for device in devices] File "/usr/local/bin/lld-disks.py", line 10, in devices = (device for device in os.listdir("/sys/block") NameError: global name 'any' is not defined

Running on....

[root@srv094 tmp]# lsb_release -a Description: Red Hat Enterprise Linux Server release 5.11 (Tikanga)

and...

[root@srv094 tmp]# python -V Python 2.4.3

Someone can modify this python code to run on Python 2.4 ? I can't upgrade this server now, it is a production server.

unforgiving avatar May 21 '18 15:05 unforgiving

Hi, You can try using this version: https://github.com/grundic/zabbix-disk-performance/pull/21

grundic avatar May 28 '18 09:05 grundic

Hi, I've installed this version, but it seems the template is not working. The data is not being collected. I've tested direct from server using zabbix_get combined with the parameter "custom.vfs.dev.read.ops and it works.

unforgiving avatar Jun 04 '18 15:06 unforgiving