AndreySV / check_modbus

Nagios plugin for Modbus TCP and Modbus RTU
GNU General Public License v3.0
14 stars 20 forks source link

"real" ranges support for thresholds #3

Closed fibbs closed 10 years ago

fibbs commented 10 years ago

Would you see it useful to implement support for ranges for WARNING and CRITICAL thresholds to also support lower thresholds?

something like -w 230:250 -c 220:260

AndreySV commented 10 years ago

It seems to be a useful feature and command line in this case will be backward compatible.

sq5gvm commented 10 years ago

It would be really nice to have full support for icinga/nagios range format (as in https://nagios-plugins.org/doc/guidelines.html#THRESHOLDFORMAT)? Some time ago I thought about creating such patch for check_modbus and found check_varnish plugin (https://github.com/varnish/varnish-nagios/blob/master/check_varnish.c) which IIRC has complete support for ranges parsing and comparing.

AndreySV commented 10 years ago

Thank you, Miroslaw, for reference to check_varnish. With version 0.47 full support of nagios range format is added. Unfortunately previous critical/warning ranges support was not compatible with standard nagios ranges. Therefore new version is not backward compatible with old command line parameters.

I think about changing command line parameters to make the change obvious for users. Remove options for old ranges '-c' and '-w'. Add new options for standard nagios ranges '-C' and '-W'. What do you think about?

sq5gvm commented 10 years ago

Using -w and -c in nagios/icinga plugins is de facto standard so I think using -W -C (instead -w -c) isn't a solution. I would change plugin behavior and leave clear information about backward incompatibility in changelog and readme file.

brgds Mirek

AndreySV commented 10 years ago

ok. Good point. So I leave the code as it currently is.

Best regards, Andrey Skvortsov