SNMP Network Profile
This network service profile monitors any network device using SNMP. A set of services issues an SNMP GET command to get interface operational status (ifoperstatus), interface input and output utilization, and interface in/out and error/discard statistics for interface 1. This Profile can be extended to monitor additional interfaces or other SNMP parameters.
Services Configuration
- Service - Definitions in Monarch are stored under this name.
- Command LIne - Service command name with arguments to be passed to the plugin.
- Plugin Command Line - Plugin script called by Nagios for this Service.
- Extended Info - The Extended Service Info definition, typically used for generating graphs.
Command lines displayed below are intended to be single line commands. Service Command Line Plugin Command Line Extended Info snmp_alive check_snmp_alive $USER1$/check_snmp -H $HOSTADDRESS$ -o .1.3.6.1.2.1.1.5.0 -l "sysName is " -C '$USER7$'
snmp_if_1 check_snmp_if!1 $USER1$/check_snmp -H $HOSTADDRESS$ -C '$USER7$' -o "IF-MIB::ifInOctets.$ARG1$,IF-MIB::ifOutOctets.$ARG1$,IF-MIB::ifInDiscards.$ARG1$,IF-MIB::ifOutDiscards.$ARG1$,IF-MIB::ifInErrors.$ARG1$,IF-MIB::ifOutErrors.$ARG1$" snmp_ifbandwidth snmp_if_bandwidth_1 check_snmp_bandwidth!1 $USER1$/check_snmp -H $HOSTADDRESS$ -C '$USER7$' -o" IF-MIB::ifInOctets.$ARG1$,IF-MIB::ifOutOctets.$ARG1$,IF-MIB::ifSpeed.$ARG1$" snmp-ifbandwidth snmp_ifoperstatus_1 check_ifoperstatus!1 $USER1$/check_ifoperstatus -k "$ARG1$" -H $HOSTADDRESS$ -C "$USER7$" snmp_ifbandwidth snmp_uptime check_snmp_uptime!180000:! $USER1$/check_snmp -H $HOSTADDRESS$ -o .1.3.6.1.2.1.1.3.0 -l "sysUptime is " -C '$USER7$' -w $ARG1$ -c $ARG2$
udp_snmp check_snmp_alive $USER1$/check_snmp -H $HOSTADDRESS$ -o .1.3.6.1.2.1.1.3.0 -l "Uptime is " -C '$USER7$' number_graph
Profile Package
This package includes the following files:
Profile Definitions
- host-profile-snmp-network.xml
- service-profile-snmp-network.xml
- perfconfig-snmp-network.xml
Plugins Scripts
- check_snmp
- check_ifoperstatus
Performance Graphing Programs
- if_bandwidth_graph2.cgi
- number_graph.cgi
Discovery Script for Network Interfaces
- discover_snmp_if.pl
- Located here in the GroundWork distribution:
/usr/local/groundwork/tools/discover_import/discover_snmp_if.pl
Installation
GroundWork Monitor includes many monitoring profiles for a variety of devices, systems and applications. Profiles already imported on a new GroundWork installation include Service Ping, SNMP Network, and SSH UNIX. The GroundWork Monitor Configuration tool is used to import updated Profiles and Profiles that require additional setup; the Profile XML file and its companion Performance Configuration definition file. Services can also be imported in addition to Service Profiles in the Profile Importer. The import process is documented under GROUNDWORK PROFILES > How to import profiles.
Implementation
This section contains detail settings used by this Profile. These parameters can be altered with the Configuration tool.
Command Parameters
Command parameters are in the Configuration Services section with the following names and default values.
snmp_if_1
- $ARG1$ - The SNMP ifIndex value. Set default to 1, first interface.
- $USER7$ - SNMP Read Community String
snmp_ifbandwidth_1
- $ARG1$ - The SNMP ifIndex value. Set default to 1, first interface.
snmp_ifoperstatus_1
- $ARG1$ - The SNMP ifIndex value. Set default to 1, first interface.
udp_snmp
- No arguments.
Performance Graphing Parameters
The following parameters are used to generate performance charts. These parameters are set using the Configuration>Performance tool in GroundWork Monitor.
snmp_if_1
- Graphs octets in/out, discards in/out, errors in/out per second for ifIndex 1.
- Nagios Service description must contain the string snmp_if_.
snmp_ifbandwidth_1
- Graphs bytes in/out per second and interface speed in bytes per second for ifIndex 1.
- Nagios Service description must contain the string snmp_ifbandwidth_.
Implementation Notes
- Execute the script discover_snmp_if.pl (list of network device IP addresses, space separated).
- Copy the output file discover_snmp_if.out to the import directory, which is typically: /usr/local/groundwork/import/csv/
- Log on to GroundWork Monitor as an Administrator, select Profile Tools, then Import.
- Select the Host Profile host_profile_snmp_network from the drop-down box.
- Select the import CSV file: discover_snmp_if.out
- Select Show Services and follow the procedures on the new page to import the file into Configuration (Configuration).
If this device has multiple interfaces you can use the following steps to define additional interfaces on a device:
- Select Services from the Configuration menu options.
- Create new Services for snmp_if and snmp_bandwidth for each interface (i.e. snmp_if_2, snmp_if_3,...).
- Modify the Check Command arguments to reference the interface number.
- Save each Service, and go to Profiles where you will add the Services and re-apply the Service Profile to the Host using the Apply tab.