Page 1 of 1

Snmp Check Status

Posted: Tue May 16, 2023 7:37 am
by TcoUpLoad
Our snmp command as named OID can nagios understand them? if i run the command at shell

/usr/local/nagios/libexec/check_snmp -H [IP] -P 3 -U [USER] -L authPriv -a SHA -A [KEY] -x AES -X [KEY] -o IF-MIB::ifOperStatus.10150
SNMP OK - up(1)


it return everything ok
if nagios core run the command it return an error

$USER1$/check_snmp -H $HOSTADDRESS$ -P 3 -U $USER3$ -L authPriv -a SHA -A $USER4$ -x AES -X $USER5$ -o IF-MIB::ifOperStatus.10150 (undefined)

-> IF-MIB::ifOperStatus.10150 <- this appear in RED. How can i resolve it?

Re: Snmp Check Status

Posted: Wed May 17, 2023 7:59 pm
by kg2857
Are you running the test in the shell as the nagios user?
You might use snmptranslate to get the numeric OID and run the command with that.
Finally, are $USER4$ and $USER5$ defined?

Re: Snmp Check Status

Posted: Tue Jun 13, 2023 11:45 am
by TcoUpLoad
First my apologies for so late response.
Answering to your questions, yes, i am running with nagios user. In my post is a mistake made by me, the (undefined) section is not an error but an indication that the 2nd argument is not defined.
In dashboard that command return UNKNOWN in the shell it return OK