Next: data_sendmsg | Previous: check_interfaces | [Table of Contents] | [Index] |
check_snmp - spong-network module to check for proper SNMP agent operation
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
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.
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.
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.
%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', );
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
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.
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
The original author is Mike Bayliss <mbayliss@datax.be
>. Extra debug code
and enhancements added by Stephen L Johnson <sjohnson@monsters.org
>.