nagios core "No OIDs specified " 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
mattau
Posts: 2
Joined: Sat Jul 21, 2012 9:38 pm

nagios core "No OIDs specified " error

Post by mattau »

Hi, I keep getting the "No OIDs specified" error in the web interface. I have tried everything

using ubuntu 11.04 with nagios core 3.2.3

manually I goto /usr/lib/nagios/plugins ./check_snmp -H 172.16.1.2 -C home -P 1 -o sysDescr.0
P OK - Cisco IOS Software

so that works fine

i do an smnpget - that also works fine

-the issue is nagios web interface never works, it just keeps saying no oid specified when I have specified it in the configuration!

I have outlined the command in
/etc/nagios-plugins/config/
define command{
command_name check_snmp_router
command_line /usr/lib/nagios/plugins/check_snmp -H '$HOSTADDRESS$' -C '$ARG1$' -P '$ARG2$' -o '$ARG3$'
}

then in the main conft int /etc/nagios3/objects/switch.cfg

define service{
use generic-service ; Inherit values from a template
host_name Cisco Router
service_description check system
check_command check_snmp_router!-C home -P 1 -o sysDescr.0
}

am I missing something? I have watched various youtube vids and it looks as simple as that yet I cant get it to work!
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: nagios core "No OIDs specified " error

Post by jsmurphy »

Arguments in the service check_command are seperated by using the exclamation mark... so essentially you are passing all of them in $ARG1$ which means what you are actually executing is:

Code: Select all

/usr/lib/nagios/plugins/check_snmp -H '$HOSTADDRESS$' -C '-C home -P 1 -o sysDescr.0' -P '' -o ''
If you change your service check_command to:

Code: Select all

check_command check_snmp_router!home!1!sysDescr.0
Then it should execute as you expect. Alternatively you could also change your command definition to:

Code: Select all

/usr/lib/nagios/plugins/check_snmp -H '$HOSTADDRESS$' '$ARG1$'
mattau
Posts: 2
Joined: Sat Jul 21, 2012 9:38 pm

Re: nagios core "No OIDs specified " error

Post by mattau »

just wanted to say thanks so much! I got it working

it all makes sense with the $ARG1$ being everything after the hostaddress variable. by using your 3rd example I got it all to work.

appreciate the help : )
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: nagios core "No OIDs specified " error

Post by jsmurphy »

You're welcome, glad you got it working!
Locked