Snmp Check Status

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Post Reply
TcoUpLoad
Posts: 7
Joined: Wed Oct 20, 2021 6:40 am

Snmp Check Status

Post 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?
kg2857
Posts: 233
Joined: Wed Apr 12, 2023 5:48 pm

Re: Snmp Check Status

Post 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?
TcoUpLoad
Posts: 7
Joined: Wed Oct 20, 2021 6:40 am

Re: Snmp Check Status

Post 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
Post Reply