<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 3 Sep 2010, at 14:15, Gothard, Morgan wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div lang="EN-US" link="blue" vlink="purple"><div class="Section1"><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: Garamond, serif; color: rgb(0, 32, 96); ">Sometime between 1.4.11 and 1.4.15 this plugin stopped parsing string output. The result of this is that all my check commands that use the --string or --regex options now *<b>always</b>* return an OK result. If checked this with multiple MIBs, OIDs, and devices.<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: Garamond, serif; color: rgb(0, 32, 96); "><o:p> </o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: Garamond, serif; color: rgb(0, 32, 96); ">Version 1.4.11 output:<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: Garamond, serif; color: rgb(0, 32, 96); "><o:p> </o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: Garamond, serif; color: rgb(0, 32, 96); ">./check_snmp --protocol=2c --hostname=host1 --community=public --oid=CISCO-FIREWALL-MIB::cfwHardwareStatusValue.primaryUnit -r active -vvvv<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: Garamond, serif; color: rgb(0, 32, 96); ">/usr/bin/snmpget -t 1 -r 5 -m ALL -v 2c -c public host1:161 CISCO-FIREWALL-MIB::cfwHardwareStatusValue.primaryUnit<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: Garamond, serif; color: rgb(0, 32, 96); ">CISCO-FIREWALL-MIB::cfwHardwareStatusValue.primaryUnit = INTEGER: active(9)<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: Garamond, serif; color: rgb(0, 32, 96); "><o:p> </o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: Garamond, serif; color: rgb(0, 32, 96); ">SNMP OK - active(9) | CISCO-FIREWALL-MIB::cfwHardwareStatusValue.primaryUnit=active(9)<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: Garamond, serif; color: rgb(0, 32, 96); "><o:p> </o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: Garamond, serif; color: rgb(0, 32, 96); "><o:p> </o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: Garamond, serif; color: rgb(0, 32, 96); ">Version 1.4.15 output:<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: Garamond, serif; color: rgb(0, 32, 96); "><o:p> </o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: Garamond, serif; color: rgb(0, 32, 96); ">./check_snmp --protocol=2c --hostname=host1 --community=public --oid=CISCO-FIREWALL-MIB::cfwHardwareStatusValue.primaryUnit –r active -vvvv<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: Garamond, serif; color: rgb(0, 32, 96); ">/usr/bin/snmpget -t 1 -r 5 -m ALL -v 2c [authpriv] host1:161 CISCO-FIREWALL-MIB::cfwHardwareStatusValue.primaryUnit<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: Garamond, serif; color: rgb(0, 32, 96); ">CISCO-FIREWALL-MIB::cfwHardwareStatusValue.primaryUnit = INTEGER: active(9)<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: Garamond, serif; color: rgb(0, 32, 96); ">Processing oid 1 (line 1)<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: Garamond, serif; color: rgb(0, 32, 96); "> oidname: CISCO-FIREWALL-MIB::cfwHardwareStatusValue.primaryUnit<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: Garamond, serif; color: rgb(0, 32, 96); "> response: = INTEGER: active(9)<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: Garamond, serif; color: rgb(0, 32, 96); ">SNMP OK - 9 | CISCO-FIREWALL-MIB::cfwHardwareStatusValue.primaryUnit=9</div></div></div></span></blockquote><div><br></div>The code was tightened around here. I'm guessing this is failing because the returned value is an integer, not a string, so a string comparison doesn't make sense.</div><div><br></div><div>You could do a comparison on the value instead, so -c 9:9 should return an error when it is not 9.</div><div><br></div><div>Ton</div><div><br></div></body></html>