pnp4nagios, check_snmp, and the `-m' flag

David Krider david at davidkrider.com
Mon Nov 16 21:17:13 CET 2009


I have a system all setup and running with Nagios and PNP4Nagios. Some
of the SNMP checks are not making graphs for me. My general habit has
been to "anchor" the SNMP check with the `-m' flag on the check_snmp
command.

My command:

define command {
  command_name check_snmp
  command_line $USER1$/check_snmp -H $HOSTADDRESS$ -m $ARG1$ -o $ARG2$
}

My service:

define service {
	hostgroup_name power_meters
	service_description Demand KiloWatts
	use snmp-service
	check_command check_snmp!
EATON-PWR-MTR-MIB!.1.3.6.1.4.1.534.8.3.1.5.1.1.4.1
	servicegroups power_meter_checks
}

My result:

temporary configs # /usr/lib/nagios/plugins/check_snmp -H 10.1.25.11 -m
EATON-PWR-MTR-MIB -o .1.3.6.1.4.1.534.8.3.1.5.1.1.4.1
SNMP OK - 19 kilo-watts |

Notice that there's no perfdata. If I leave out the `-m', I get it:

temporary configs # /usr/lib/nagios/plugins/check_snmp -H 10.1.25.11
-o .1.3.6.1.4.1.534.8.3.1.5.1.1.4.1
SNMP OK - 19 | iso.3.6.1.4.1.534.8.3.1.5.1.1.4.1=19

It would be nice to keep the units on these calls, just for the sake of
it, but this is what's keeping the performance data from being reported
in these instances. Just thought I'd post this to the list for future
reference. If past experience is any indication of future trending, I'll
find this through Google in about 3 years when I can't figure out why I
can't get performance data in Nagios again. ;-)

Regards,
dk



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list