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!
nagios core "No OIDs specified " error
Re: nagios core "No OIDs specified " error
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:
If you change your service check_command to:
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$' -C '-C home -P 1 -o sysDescr.0' -P '' -o ''Code: Select all
check_command check_snmp_router!home!1!sysDescr.0Code: Select all
/usr/lib/nagios/plugins/check_snmp -H '$HOSTADDRESS$' '$ARG1$'Re: nagios core "No OIDs specified " error
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 : )
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 : )
Re: nagios core "No OIDs specified " error
You're welcome, glad you got it working!