Check_SNMP "Unknown Object Identifier" error

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.
Locked
intern_nagios
Posts: 11
Joined: Wed May 27, 2015 3:39 pm

Check_SNMP "Unknown Object Identifier" error

Post by intern_nagios »

Hi there,

Since I want to see the value of an OID I use check_snmp to retrieve those information.
When I manually run the command, I see what I want to see so the OID does excist. I then use the following command:

Code: Select all

check_snmp -H asr01 -C something -o .1.3.6.1.4.1.9.10.56.1.2.1.1.6.2.1" -csomething" -P 2c
When I configure Nagios to run it, the following error is the result:

Code: Select all

External command error: .1.3.6.1.4.1.9.10.56.1.2.1.1.6.2.1": Unknown Object Identifier (Sub-id not found: enterprises -> 1")
The command is specified as following

Code: Select all

define command{
        command_name    check_snmp
        command_line    $USER1$/check_snmp -H $HOSTADDRESS$ -C something -o $ARG1$\" -csomething\" -P 2c -w $ARG2$ -c $ARG3$
}
I specified the community string twice because otherwise snmpget wouldn't get the communitystring

The service is specified as following

Code: Select all

check_command                    check_snmp!.1.3.6.1.4.1.9.10.56.1.2.1.1.6.2.1!8!10
Do you guys have any clue? Thanks
intern_nagios
Posts: 11
Joined: Wed May 27, 2015 3:39 pm

Re: Check_SNMP "Unknown Object Identifier" error

Post by intern_nagios »

When I remove the quotes after the OID, it neither works.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Check_SNMP "Unknown Object Identifier" error

Post by ssax »

Try these:

Code: Select all

check_snmp -H asr01 -C something -o .1.3.6.1.4.1.9.10.56.1.2.1.1.6.2.1 -C public -c something -P 2c

Code: Select all

define command{
        command_name    check_snmp
        command_line    $USER1$/check_snmp -H $HOSTADDRESS$ -o $ARG1$ -C public -P 2c -w $ARG2$ -c $ARG3$
}
intern_nagios
Posts: 11
Joined: Wed May 27, 2015 3:39 pm

Re: Check_SNMP "Unknown Object Identifier" error

Post by intern_nagios »

Thanks, it does work now.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Check_SNMP "Unknown Object Identifier" error

Post by tmcdonald »

I'll be closing this thread now, but feel free to open another if you need anything in the future!
Former Nagios employee
Locked