Next: check_snmp | Previous: admin-guide | [Table of Contents] | [Index] |
check_interfaces - spong-network module to check for down intefaces via SNMP
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_interfaces module checks for down network interfaces on a host by polling via SNMP. It reports any interfaces that are administratively up but operationally not up.
To override the default name on a per host basis, specify a snmp_ community
attribute in a host's entry in the %HOSTS variabile of the the spong.conf manpage
configuration file. See the the section on EXAMPLES elsewhere in this document section for a detailed
example.
A default list of interfaces to ignore is added an 'ignore_interfaces' entry to the $HOSTS_DEFAULTS variable. A list of interfaces to ignore in all hosts is created by adding an 'ignore_interfaces' entry to the $HOSTS_ALL varirable. See the Examples section for a detailed example.
%HOSTS = ( 'hostname.my-inc.com' => { 'services' => 'interfaces', 'ip_addr' => ['192.168.13.123'], 'community' => 'local-read', 'ignore_interfaces' => ['ppp1','ppp2']; }, ); $HOSTS_DEFAULTS{'snmp_community'} = 'mysecret'; # Ignore the unused default intefaces on more servers $HOSTS_DEFAULTS{'ignore_interfaces'} = ['et0','lan0']; # Skip the loopback interface on the linux boxes $HOSTS_ALL('ignore_interfaces} = ['lo0'];
the spong-network entry elsewhere in this document, the check_snmp manpage, the spong-network Modules Template|spong-network-mod-template entry elsewhere in this document, the Spong Developer Guide|developer-guide entry elsewhere in this document
The check_interfaces module use SNMP to poll a host. It retrieves the ifIndex, ifDesc, ifType, ifAdminStatus, and ifOperStatus fields for every entry in the ifTable table. The module then scans all of all of the network interfaces inretrieved from the table. Any interface that is administratively up and is not operationally up will result in an critical status (red) being return.
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
>.