Yet Another "No OIDs Specified" Problem.

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
tinton
Posts: 2
Joined: Sun Apr 20, 2014 10:47 pm

Yet Another "No OIDs Specified" Problem.

Post by tinton »

This one is different. I can assure you, i've read at least 5-6 other similar problems, but all those suggestions i've already implemented.

So i installed nagios on debian on a VM, and i was able to configure it pretty easily using the nagios.org Nagios Core Quick Start Guides: http://nagios.sourceforge.net/docs/3_0/ ... uters.html. I tested the configurations, and made sure i got no errors. I started by configuring they system to check a managed switch.

When i go to the Web UI, on /nagios3/ I'm getting the "No OIDs specified" next to the two check_snmp services i have, just like many others have gotten. Except that i tried all the things that made the others work.

As usual, when called from command line, check_snmp works great. But i went even further: i created a wrapper around check_snmp that would print stderr and stdout to a log file, basically simply

Code: Select all

/usr/lib/nagios/plugins/check_snmp_orig $* &> /tmp/check_snmp.output 

I knew this would return errors, cuz i wasn't teeing the output, so nagios couldn't catch it. But all i needed was to look at the log file, and the log file contained successful information, similar to what i was getting at the command line!

So now i know the check works OK, even when called by nagios, but the the WEB UI still reports "No OIDs specified".

What's going on? Is maybe the check_snmp not supported by nagios3? Why isn't the check_snmp plugin in the manual page documentation for the nagios3 plugins http://nagios-plugins.org/doc/man/index.html?

So here are the services:

Code: Select all

define service{
        use                     generic-service ; Inherit values from a template
        host_name               l2.momo.lan.afm.co
        service_description     Uptime  
        check_command           check_snmp!-C public -o sysUpTime.0
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               l2.momo.lan.afm.co
        service_description     Port 1 Link Status
        check_command           check_snmp!-C public -o .1.3.6.1.2.1.2.2.1.8.1 -r 1 -m RFC1213-MIB
        }
And here's the command:

Code: Select all

# 'check_snmp' command definition
define command{
        command_name    check_snmp
        command_line    /usr/lib/nagios/plugins/check_snmp -H '$HOSTADDRESS$' '$ARG1$'
        }
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Yet Another "No OIDs Specified" Problem.

Post by sreinhardt »

Can you post the command line options and results that are working please? It certainly seems like you have provided the plugin the oid and shortnames, and nagios3 definitely supports check_snmp without issue, so most likely I would think its an issue with your command definition or wrapper script if that is still in use.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
tinton
Posts: 2
Joined: Sun Apr 20, 2014 10:47 pm

Re: Yet Another "No OIDs Specified" Problem.

Post by tinton »

This is the wrapper:

Code: Select all

/usr/lib/nagios/plugins/check_snmp_orig $* 2>&1 | tee /tmp/check_snmp.output
This is the call from CLI.

Code: Select all

root@vm1:~# /usr/lib/nagios/plugins/check_snmp -H 10.1.34.4 -C public -o ifOperStatus.1 -r 1 -m RFC1213-MIB
SNMP CRITICAL - *down(2)* | 
Today i just noticed that i got it to work, as long as there is a wrapper present. It can be as simple as a transparent wrapper:

Code: Select all

/usr/lib/nagios/plugins/check_snmp_orig $* 
but it has to be there. As soon as i remove it, nagios3/check_snmp stops working So strange...
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Yet Another "No OIDs Specified" Problem.

Post by slansing »

That is very odd indeed, I'm going to give this a shot on one of my test systems.
Locked