Next:
data_sendmsg
Previous:
check_interfaces
 [Table of Contents][Index]

check_snmp



NAME

check_snmp - spong-network module to check for proper SNMP agent operation

DESCRIPTION

This is a plugin module for the Spong the spong-network entry elsewhere in this document program. It is a core Spong module. The check_snmp module checks for the SNMP agent running in the host for proper operation.

The module check SNMP by issuing an snmpget operation for the systemGroup table of the host. If the operation is sucessfully, snmp service is deemed OK. The module also has an option check for the sysObjectId. An expected sysObjectId value can be specified to be checked against the sysObjectId value retrieved in the snmpget operation. If the values don't agree, a critical (red) status is reported

Output Returned

Status
If the snmpget operation is successfully, 'green' status is return. If an SNMP error occurs a 'red' status is returned.

If an expect_objid is specified for the host, a 'green' status is returned if the snmpget operation is successful and the sysObjectId value matches the expect_objid. If the values don't match, a 'red' status is returned.

Summary Field
If there are no problems, "snmp ok" is returned. Otherwise the summary field will have a short description of that the problem or anamoly is.
Detail Message Field
If normal operation the detail message will have the values of the system description (sysDesc), uptime (sysUpTime), contact (sysContact), name (sysName), location (sysLocation), and object id (sysObjectID) fields from the System Group. If an expect_objid was specified for the host and the retrived object id doesn't match, the expected value will also be listed. Otherwise this field will have a detailed description of the cause of an error.

Configuration

SNMP Community Name
The default SNMP Community name is public. To override the default name specify a snmp_community attribute in a host's entry in the %HOSTS variable in the the spong.conf manpage configuration file. See the section on EXAMPLES elsewhere in this document for a detailed example.
Expected System Object ID
You can specify an expected sysObjectID value to be checked against the retrieved. Specify a expect_objid attribute in a host's entry in the %HOSTS variable in the the spong.conf manpage configuration file. See the Examples section for a detailed example.

EXAMPLES

 %HOSTS = ( 'hostname.my-inc.com' => { 'services'  => 'snmp',
                                       'ip_addr'  => ['192.168.13.123'],
                                       'snmp_community' => 'local-read',
                                       'expect_objid' =>
                                           '1.3.6.1.4.1.2021.250.10',
          );

SEE ALSO

the spong-network entry elsewhere in this document, the check_interfaces manpage, the spong-network Modules Template|spong-network-mod-template entry elsewhere in this document, the Spong Developer's Guide|developer-guide entry elsewhere in this document

NOTES

The check_snmp module uses an SNMP snmpget operation to poll a host. It retrieves the values of the system description (sysDesc), uptime (sysUpTime), contact (sysContact), name (sysName), location (sysLocation), and object id (sysObjectID) fields from the System Group. If the snmpget operation was successful, the snmp service is deemed OK.

If an optional expect_objid value is specified for the host, it will be compared to the sysObjectID value retrieved from the host. If the values don't match a critical ('red') status is generated.

RESTRICTIONS

check_interfaces uses the SNMP_Session, SNMP_utils and BER modules from the SNMP_Session package. The SNMP_Session package must be installed in order for this module to work.

The latest version of SNMP_Session package can be obtained from:

  http://www.switch.ch/misc/leinen/snmp/perl/index.html

AUTHOR

The original author is Mike Bayliss <mbayliss@datax.be>. Extra debug code and enhancements added by Stephen L Johnson <sjohnson@monsters.org>.


[Top] Generated by Pod::HTML 0.43 on Wed Jun 13 11:17:40 2001