Linuxfabrik / monitoring-plugins

220+ check plugins for Icinga and other Nagios-compatible monitoring applications. Each plugin is a standalone command line tool (written in Python) that provides a specific type of check.
https://linuxfabrik.ch
The Unlicense
220 stars 51 forks source link

disk-io3: Fails on Proxmox VE #552

Closed berrnd closed 2 years ago

berrnd commented 2 years ago

Describe the bug On Proxmox VE, disk-io3 fails with that error:

bb@ct-mon1:/opt/centralcfg/scripts/icinga/linuxfabrik-monitoring-plugins$ ./disk-io3
Traceback (most recent call last):
  File "/opt/centralcfg/scripts/icinga/linuxfabrik-monitoring-plugins/./disk-io3", line 294, in 'module'
    main()
  File "/opt/centralcfg/scripts/icinga/linuxfabrik-monitoring-plugins/./disk-io3", line 131, in main
    lib.base3.version(platform.release()) '= lib.base3.version('4.18.0'),
  File "/opt/centralcfg/scripts/icinga/linuxfabrik-monitoring-plugins/lib/base3.py", line 617, in version
    return tuple(map(int, (v.split("."))))
ValueError: invalid literal for int() with base 10: ''

Environment:

This is due to that platform.release() contains more than 1 hyphen which leads a comparision based on lib.base3.version() to fail.

I will provide a fix / pull request to fix that shortly at Linuxfabrik/lib.

markuslf commented 2 years ago

Fix implemented in base3.py: https://github.com/Linuxfabrik/lib/commit/3eac3b87f2fd50add822a1ba9fa5e7e380a194cb