Hello,
we encountered the same problem referenced in #310 - With check_nwc_health version 10.0 the error looks as follows:
Argument "ON" isn't numeric in numeric eq (==) at /usr/lib64/nagios/plugins/check_nwc_health line 71087.
Argument "LOST" isn't numeric in numeric eq (==) at /usr/lib64/nagios/plugins/check_nwc_health line 71087.
CRITICAL - sensor PSU [2] alarm status is true | 'sensor_PSU [1] '=0;;;; 'sensor_PSU [2] '=0;;;;
Unfortunately, even after applying the fix from dcec checking the value for being actually "-1" in string comparison before doing a numeric eq, I received another error:
Argument "ON" isn't numeric in sprintf at ./check_nwc_health.new line 514.
Argument "LOST" isn't numeric in sprintf at ./check_nwc_health.new line 514.
CRITICAL - sensor PSU [2] alarm status is true | 'sensor_PSU [1] '=0;;;; 'sensor_PSU [2] '=0;;;;
So I dusted off my perl skills and tried to fix that, too, by sending perfdata only if the value is numeric. Please let me know if this is sufficient and the proper way to do it.
Hello, we encountered the same problem referenced in #310 - With check_nwc_health version 10.0 the error looks as follows:
Argument "ON" isn't numeric in numeric eq (==) at /usr/lib64/nagios/plugins/check_nwc_health line 71087. Argument "LOST" isn't numeric in numeric eq (==) at /usr/lib64/nagios/plugins/check_nwc_health line 71087. CRITICAL - sensor PSU [2] alarm status is true | 'sensor_PSU [1] '=0;;;; 'sensor_PSU [2] '=0;;;;
Unfortunately, even after applying the fix from dcec checking the value for being actually "-1" in string comparison before doing a numeric eq, I received another error:
Argument "ON" isn't numeric in sprintf at ./check_nwc_health.new line 514. Argument "LOST" isn't numeric in sprintf at ./check_nwc_health.new line 514. CRITICAL - sensor PSU [2] alarm status is true | 'sensor_PSU [1] '=0;;;; 'sensor_PSU [2] '=0;;;;
So I dusted off my perl skills and tried to fix that, too, by sending perfdata only if the value is numeric. Please let me know if this is sufficient and the proper way to do it.