how do i monitor snmp

Max H. btmanmeh at verizon.net
Thu Jul 20 15:03:51 CEST 2006


karthik arya wrote:
> hey
> 
>   i have installed nagios2.4 on fedora 3. i just have to services being monitored at the moment. I want to monitor SNMP installed on my system and few others in my network. i tried making changes to the configuration file services.cfg, tried adding the line: check_command     check_snmp.
> 
> But i'm getting the error:Error: Service check command 'check_snmp' specified in service 'SNMP' for host 'example.com' not defined anywhere!
> Obviously i'm missing something.
> 
> any help????
> 

Well, you need to specify more than just check_snmp. You need to specify 
what across SNMP you're wanting to check.

[root at nagios plugins]# ./check_snmp --help
check_snmp: Could not parse arguments
Usage: check_snmp -H <ip_address> -o <OID> [-w warn_range] [-c crit_range]
                   [-C community] [-s string] [-r regex] [-R regexi]
                   [-t timeout] [-e retries]
                   [-l label] [-u units] [-p port-number] [-d delimiter]
                   [-D output-delimiter] [-m miblist] [-P snmp version]
                   [-L seclevel] [-U secname] [-a authproto] [-A authpasswd]
                   [-X privpasswd]

For example:

I'm checking a temperature probe across SNMP on a device. I specify the 
check command in checkcommands.cfg.

# 'snmp_temp' Custom temperature check of Huntingdon Machine Room
define command{
         command_name    snmp_temp
         command_line    $USER1$/check_snmp -H $HOSTADDRESS$ -C public 
-o ALERT-MIB::ssVarReading.0 -w $ARG1$ -c $ARG2$ -u 'F' -l 'Temperature'
         }

-o is pointing to the specific MIB arguments.

Now, my service would look something like this:
define service{
         use                             basic-service
         name                            snmp-temp
         check_command                   snmp_temp!82!85
         service_description             TEMP
         host_name                       monitor1
         service_description             TEMP
         notification_interval           0
         notification_options            c,r
         notification_period             24x7
         check_command                   snmp_temp
         register                        0
	}

Start reading the docs too. SNMP is hard to catch on to at first, but 
once you get good at it, you'll be fine and this will all make more 
sense. :)

Max





-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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