check_snmp problems

jeff vier jeff.vier at tradingtechnologies.com
Fri Apr 2 20:53:37 CEST 2004


Can you run it from the command line *as the nagios user*?

On Fri, 2004-04-02 at 12:16, Clint Sulis wrote:
> Okay, so I posted a day or two ago about check_snmp problems.  This is
> driving me absolutely insane!  Please give this email a look and offer
> any suggestions you have on what I should investigate.  Thank you in
> advance! 
> 
> I can run snmp_check commands from the command-line but nagios always
> gets the result "SNMP problem - No data recieved from host".  I can only
> think of two possible reasons why I can run check_snmp as root, but not
> as the nagios user: 
> 
> 1. Permissions on plugins or the snmpget binary.  I tested this below,
> and indeed if the nagios user cannot execute the snmpget binary, the
> result will be shown as "SNMP problem - No data received from host". 
> 
> 	[root nagios]# chmod 755 /usr/local/bin/snmpget 
> 	[root nagios]# /usr/local/nagios/libexec/check_snmp -H
> 69.20.4.144 -o .1.3.6.1.4.1.2021.10.1.3.1 -C nagios -p 2112 
> 	SNMP OK - 0.06 
> 
> 	[root nagios]# chmod 000 /usr/local/bin/snmpget 
> 	[root nagios]# /usr/local/nagios/libexec/check_snmp -H
> 69.20.4.144 -o .1.3.6.1.4.1.2021.10.1.3.1 -C nagios -p 2112 
> 	SNMP problem - No data recieved from host 
> 	CMD: /usr/bin/snmpget -m ALL -v 1 -c nagios
> www.homewarranty.com:2112  .1.3.6.1.4.1.2021.10.1.3.1 
> 
> 2. Location of the snmpget utility not in /usr/bin.  This also can cause
> the same bad result, as newer versions of Net-SNMP install the binaries
> in /usr/local/bin by default.  From the output above, it is clear that
> check_snmp requires the snmpget binary be in the /usr/bin directory. 
> 
> 	[root nagios]# su - nagios 
> 	[nagios nagios]$ /usr/local/nagios/libexec/check_snmp -H
> 69.20.4.144 -o .1.3.6.1.4.1.2021.10.1.3.1 -C nagios -p 2112 
> 	SNMP OK - 0.06 
> 
> Since I can run the check command as the nagios user at the
> command-line, I cannot figure out what the heck is wrong.  If anyone can
> suggest where I might be able to investigate this problem further, I
> will be extremely thankful! 
> 
> For reference, my checkcommands.cfg, services.cfg, and hosts.cfg entries
> are configured as follows: 
> 
> ================= 
> CHECKCOMMANDS.CFG 
> ================= 
> 
> define command { 
>         command_name    check_snmp 
>         command_line    /usr/local/nagios/libexec/check_snmp -H
> $HOSTADDRESS$ -o $ARG1$ -C $ARG2$ -p $ARG3$ 
> } 
> 
> ============ 
> SERVICES.CFG 
> ============ 
> 
> define service { 
>         use                             generic_service 
>         host_name                       rackspace 
>         service_description             LOAD 
>         is_volatile                     0 
>         check_period                    24x7 
>         max_check_attempts              3 
>         normal_check_interval           3 
>         retry_check_interval            1 
>         contact_groups                  admin 
>         notification_interval           120 
>         notification_period             24x7 
>         notification_options            w,u,c,r 
>         check_command
> check_snmp!.1.3.6.1.4.1.2021.10.1.3.1!nagios!2112 
> } 
> 
> ========= 
> HOSTS.CFG 
> ========= 
> 
> define host { 
>         use                     generic_host 
>         host_name               rackspace 
>         alias                   Rackspace Dedicated Server 
>         address                 69.20.4.144 
>         check_command           check_host_alive 
>         max_check_attempts      10 
>         notification_interval   120 
>         notification_period     24x7 
>         notification_options    d,u,r 
> } 
> 
> =============== 
> VERSION DETAILS 
> =============== 
> 
> nagios v1.2 
> check_snmp (nagios-plugins 1.3.0) 1.24 
> 
> Clint Sulis 
> ==================== 
> System Administrator 
> PHP/MySQL Programmer



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
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