summaryrefslogtreecommitdiffstats
path: root/gl/dirname-lgpl.c
diff options
context:
space:
mode:
authorSven Nierlein <sven@nierlein.de>2023-01-19 23:29:01 +0100
committerSven Nierlein <sven@nierlein.org>2023-01-20 08:57:56 +0100
commitf4930aee28ccb664691809e7dcc9198eb81429c5 (patch)
treeaaec633b9ddbbc84f70c29999d56712cff32c342 /gl/dirname-lgpl.c
parent916572c1aecc37ebfea474f952df61d15d2f60b8 (diff)
downloadmonitoring-plugins-f4930ae.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 'gl/dirname-lgpl.c')
0 files changed, 0 insertions, 0 deletions