[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.

Output Returned

If all interfaces are operationally up, a 'green' status is returned. If a host is found to have no interfaces a 'yellow' status is returned. Any interfaces that are operationally down and administratively up, a 'red' status is returned. Any SNMP session problems will also result in a 'red' status being returned.
Summary Field
In normal operation, the status field will show "all interfaces up". If one or more network interfaces are down, it will show "some interfaces are down". Otherwise the summary field will have a description of what the problem or anamoly is.
Detail Message Field
In normal opereration the detail message field will have a list of all of the network interfaces in the MIBII ifTable table along with the interface description (ifDesc), type (ifType), administrative status (ifAdminStatus) and operational status (ifOperStatus). Otherwise this field will have a detailed description of the cause of an error.


SNMP Community Name
The default SNMP Community name is public. To provide an alternate default SNMP Community name add it to the $HOSTS_DEFAULTS entry in the spong.conf file (i.e. $HOSTS_DEFAULTS{'snmp_community'} = 'secret';).

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.

Ignored Interfaces
You can also specify a list of network interfaces for the check_interfaces module to ignore. Add an 'ignore_interfaces' attribute to a host entry in $HOSTS with a list of network interface to ignore.

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 = ( '' => { 'services'  => 'interfaces',
                                       'ip_addr'   => [''],
                                       '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:


The original author is Mike Bayliss <>. Extra debug code and enhancements added by Stephen L Johnson <>.

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