Page 1 of 1

Check_SNMP "Unknown Object Identifier" error

Posted: Fri Jun 05, 2015 8:02 am
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

Re: Check_SNMP "Unknown Object Identifier" error

Posted: Fri Jun 05, 2015 8:17 am
by intern_nagios
When I remove the quotes after the OID, it neither works.

Re: Check_SNMP "Unknown Object Identifier" error

Posted: Fri Jun 05, 2015 12:06 pm
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$
}

Re: Check_SNMP "Unknown Object Identifier" error

Posted: Sat Jun 06, 2015 4:58 am
by intern_nagios
Thanks, it does work now.

Re: Check_SNMP "Unknown Object Identifier" error

Posted: Mon Jun 08, 2015 9:27 am
by tmcdonald
I'll be closing this thread now, but feel free to open another if you need anything in the future!