LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Regex matching with check_snmp and nagios (https://www.linuxquestions.org/questions/linux-software-2/regex-matching-with-check_snmp-and-nagios-858798/)

angel115 01-26-2011 10:41 AM

Regex matching with check_snmp and nagios
 
Hello There,


I'm trying to generate a critical error when my OID is at "0".
but what ever I do it still say "SNMP OK"

Code:

# ./check_snmp -H 192.6.2.150  -C public -o SNMPv2-SMI::mib-2.33.1.9.9.0 -r 0
SNMP OK - 0 | SNMPv2-SMI::mib-2.33.1.9.9.0=0
#
# ./check_snmp -H 192.6.2.150  -C public -o SNMPv2-SMI::mib-2.33.1.9.9.0 -r 1
SNMP OK - 0 | SNMPv2-SMI::mib-2.33.1.9.9.0=0
#
#./check_snmp -H 192.6.2.150  -C public -o SNMPv2-SMI::mib-2.33.1.9.9.0 -s 1
SNMP OK - 0 | SNMPv2-SMI::mib-2.33.1.9.9.0=0
#
# ./libexec/check_snmp -H 192.6.2.150  -C public -o SNMPv2-SMI::mib-2.33.1.9.9.0 -s 0
SNMP OK - 0 | SNMPv2-SMI::mib-2.33.1.9.9.0=0
#


But if I do the same check using a string on a diffrent OID it's working as expected:
Code:

# ./check_snmp -H 192.6.2.150  -C public -o SNMPv2-MIB::sysContact.0 -r Com
SNMP OK - Computer Room Manager |
# ./check_snmp -H 192.6.2.150  -C public -o SNMPv2-MIB::sysContact.0 -r KO
SNMP CRITICAL - *Computer Room Manager* |
#

Any idea about what I'm doing wrong?
or
Is there a bug to filter interger result?

Best regards,
Angel.

angel115 01-29-2011 03:55 AM

Wow after few days still no answer!!!

Is my question is unclear or that difficult?
Am I the only one to get this kind of issue?

Regards,
angel.

angel115 02-07-2011 02:10 AM

If anyone got a lead I'll be thanks full.

Best regards,
Angel.


All times are GMT -5. The time now is 07:57 PM.