summaryrefslogtreecommitdiffstats
path: root/plugins/tests/conf
diff options
context:
space:
mode:
authorSven Nierlein <sven@nierlein.de>2023-01-19 22:29:01 (GMT)
committerSven Nierlein <sven@nierlein.org>2023-01-20 07:57:56 (GMT)
commitf4930aee28ccb664691809e7dcc9198eb81429c5 (patch)
treeaaec633b9ddbbc84f70c29999d56712cff32c342 /plugins/tests/conf
parent916572c1aecc37ebfea474f952df61d15d2f60b8 (diff)
downloadmonitoring-plugins-f4930aee28ccb664691809e7dcc9198eb81429c5.tar.gz
fix check_snmp regex matches
the multiplier function always tried to extract a number, even if the result is a string because of using a mib. before: ``` ./check_snmp -H hostname -P2c -c public -o IF-MIB::ifAdminStatus.11466 -vvv -r 0 /usr/bin/snmpget -Le -t 10 -r 5 -m ALL -v 2c [context] [authpriv] 10.0.13.11:161 IF-MIB::ifAdminStatus.11466 IF-MIB::ifAdminStatus.11466 = INTEGER: up(1) Processing oid 1 (line 1) oidname: IF-MIB::ifAdminStatus.11466 response: = INTEGER: up(1) SNMP OK - 0 | IF-MIB::ifAdminStatus.11466=0;; ``` the regexp 0 matches, even if the actual result is "up(1)". after this patch: ``` ./check_snmp -H hostname -P2c -c public -o IF-MIB::ifAdminStatus.11466 -vvv -r 0 /usr/bin/snmpget -Le -t 10 -r 5 -m ALL -v 2c [context] [authpriv] 10.0.13.11:161 IF-MIB::ifAdminStatus.11466 IF-MIB::ifAdminStatus.11466 = INTEGER: up(1) Processing oid 1 (line 1) oidname: IF-MIB::ifAdminStatus.11466 response: = INTEGER: up(1) SNMP CRITICAL - *up(1)* | ```
Diffstat (limited to 'plugins/tests/conf')
0 files changed, 0 insertions, 0 deletions