Re: [Nagios-users] Newbie question - check_snmp syntax

2008-05-16 Thread mrinal devadas
Hi Patrick,
Thank you for the detailed explanation.

Yes, I am just polling SNMP for values. The switches provided in the
check_snmp service are values that the plugin seems to require. The SNMP
version is always 2c and the community string is public. If I do not specify
Œ-L noAuthNoPriv¹ the switch defaults to ŒauthPriv¹. I have now removed this
switch.

Also the delimiter used by check_snmp is ³=². If I use this delimiter in the
netapp.cfg file, nagios complains about a syntax error in the file. If Œ-m¹
is not specified it defaults to ŒALL¹. Is that a bad thing? I have also
changed Œ-m¹ to Œ-o¹.

What I found to be odd is that nagios seems to have picked up the value for
the OID at some time in the past and then lost it. From the nagios.log
file
-
05-15-2008 23:18:36] EXTERNAL COMMAND:
SCHEDULE_FORCED_HOST_CHECK;gx4;1210889913
[05-15-2008 23:18:14] EXTERNAL COMMAND:
SCHEDULE_FORCED_SVC_CHECK;gx3;Uptime;1210889891
[05-15-2008 23:17:50] EXTERNAL COMMAND:
SCHEDULE_FORCED_SVC_CHECK;gx2;Uptime;1210889868
[05-15-2008 23:16:33] SERVICE FLAPPING ALERT: gx1;Uptime;STARTED; Service
appears to have started flapping (22.8% change = 20.0% threshold)


On NetApp the only configuration setting is the define the server that is
going to receive the SNMP traps.

With the configuration updates the results are as below...
### commands.cfg
# 'check_snmp' command definition
define command{
command_namecheck_snmp
command_line$USER1$/check_snmp -H $ARG1$ -P 2c -d ! -o $ARG2$
}

### netapp.cfg
define service{
usegeneric-service; Inherit values from a template
host_namegx3
service_descriptionUptime
check_commandcheck_snmp!gx3!sysUpTime.0
}

### command output 
Status Information:SNMP problem - No data received from host
CMD: /usr/bin/snmpget -t 1 -r 5 -m ALL -v 2c [authpriv] gx3:161 sysUpTime.0


Regards,
Mrinal.



On 16/05/2008 01:44, Patrick Morris [EMAIL PROTECTED] wrote:

 On Thu, 15 May 2008, mrinal devadas wrote:
 
  Hi all,
  Am attempting to setup a Nagios server to accept SNMP traps from a NetApp
  controller. Need help with the syntax to be used for check_snmp.
 
  My commands.cfg file has,
  define command{
  command_namecheck_snmp
  command_line$USER1$/check_snmp -H $ARG1$ -P 2c -L noAuthNoPriv
  -d ! -m $ARG2$
  }
 
  My netapp.cfg file has,
  define service{
  use generic-service ; Inherit values from a
  template
  host_name   gx3
  service_description Uptime
  check_command   check_snmp!gx3!sysUpTime.0
  }
 
  I get the following error message on Nagios,
  Status Information:SNMP problem - No data received from host
  CMD: /usr/bin/snmpget -t 1 -r 5 -m sysUpTime.0 -v 2c [authpriv] gx2:161
 
  What am I doing wrong?
 
 First, a couple points:
 
 NMP traps are not something you can get using check_snmp.  They are sent
 from a device to something that listens for SNMP traps, and aren't
 something you can poll for.  In the example you gave, however, it
 appears you're polling for the sysUpTime.0 OID from SNMP, which is not
 a trap, so maybe you're just using the wrong terminology. If you are
 trying to receive traps, though, your current approach will never work.
 
 Now, if you're just polling SNMP for values, you've got a workable
 start. However, The result you say you're receiving in Nagios cannot be
 the result of the configs you've supplied.  You're also mixing commands
 in a way that doesn't make much sense. For example, you specify to use
 SNMP version 2, but also include the -L switch, which only applies to
 SNMP version 3.  You're also going to have trouble with the -d ! part
 of the command line, probably, and I doubt you even need it.  You're
 also not specifying the OID you want to poll.  The -m flag specifies a
 MIB to load -- a MIB is generally a file containing information about
 the OIDs available on a device, but the -o switch is the one to use to
 specify the data you want returned.
 
 It's also unclear what, if anything, you've done on the NetApp as far as
 SNMP configuration, so that could very well be a problem as well.
 

-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
Nagios-users mailing list
Nagios-users@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

[Nagios-users] Newbie question - check_snmp syntax

2008-05-15 Thread mrinal devadas
Hi all,
Am attempting to setup a Nagios server to accept SNMP traps from a NetApp
controller. Need help with the syntax to be used for check_snmp.

My commands.cfg file has,
define command{
command_namecheck_snmp
command_line$USER1$/check_snmp -H $ARG1$ -P 2c -L noAuthNoPriv
-d ! -m $ARG2$
}

My netapp.cfg file has,
define service{
use generic-service ; Inherit values from a
template
host_name   gx3
service_description Uptime
check_command   check_snmp!gx3!sysUpTime.0
}

I get the following error message on Nagios,
Status Information:SNMP problem - No data received from host
CMD: /usr/bin/snmpget -t 1 -r 5 -m sysUpTime.0 -v 2c [authpriv] gx2:161

What am I doing wrong?


Thanks in advance,
Mrinal.


-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] Newbie question - check_snmp syntax

2008-05-15 Thread Patrick Morris
On Thu, 15 May 2008, mrinal devadas wrote:

 Hi all,
 Am attempting to setup a Nagios server to accept SNMP traps from a NetApp
 controller. Need help with the syntax to be used for check_snmp.
 
 My commands.cfg file has,
 define command{
 command_namecheck_snmp
 command_line$USER1$/check_snmp -H $ARG1$ -P 2c -L noAuthNoPriv
 -d ! -m $ARG2$
 }
 
 My netapp.cfg file has,
 define service{
 use generic-service ; Inherit values from a
 template
 host_name   gx3
 service_description Uptime
 check_command   check_snmp!gx3!sysUpTime.0
 }
 
 I get the following error message on Nagios,
 Status Information:SNMP problem - No data received from host
 CMD: /usr/bin/snmpget -t 1 -r 5 -m sysUpTime.0 -v 2c [authpriv] gx2:161
 
 What am I doing wrong?

First, a couple points:

NMP traps are not something you can get using check_snmp.  They are sent
from a device to something that listens for SNMP traps, and aren't
something you can poll for.  In the example you gave, however, it 
appears you're polling for the sysUpTime.0 OID from SNMP, which is not 
a trap, so maybe you're just using the wrong terminology. If you are
trying to receive traps, though, your current approach will never work.

Now, if you're just polling SNMP for values, you've got a workable
start. However, The result you say you're receiving in Nagios cannot be
the result of the configs you've supplied.  You're also mixing commands
in a way that doesn't make much sense. For example, you specify to use
SNMP version 2, but also include the -L switch, which only applies to
SNMP version 3.  You're also going to have trouble with the -d ! part
of the command line, probably, and I doubt you even need it.  You're
also not specifying the OID you want to poll.  The -m flag specifies a
MIB to load -- a MIB is generally a file containing information about
the OIDs available on a device, but the -o switch is the one to use to
specify the data you want returned.

It's also unclear what, if anything, you've done on the NetApp as far as
SNMP configuration, so that could very well be a problem as well. 

-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Nagios-users mailing list
Nagios-users@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