CiscoPingMibMonitor
Subscribe

From OpenNMS

Jump to: navigation, search

Contents

Introduction

Purpose

This poller monitor's purpose is to create conceptual rows (entries) in the ciscoPingTable on Cisco IOS devices that support the CISCO-PING-MIB. These entries direct the remote IOS device to ping an IPv4 or IPv6 address with a configurable set of parameters. After the IOS device has completed the requested ping operations, the poller monitor queries the IOS device to determine the results. If the results indicate success according to the configured parameters in the service configuration, then the monitored service is reported as available and the results are available for optional time-series (RRD) storage. If the results indicate failure, the monitored service is reported unavailable with a descriptive reason code. If something goes wrong during the setup of the entry or the subsequent querying of its status, the monitored service is reported to be in an unknown state.

Note that, unlike most poller monitors, the CiscoPingMibMonitor does not interpret the timeout and retries parameters to determine when a poll attempt has timed out or whether it should be attempted again. The packet-count and packet-timeout parameters instead service this purpose from the perspective of the remote IOS device.

Prerequisites

  1. One or more Cisco devices running an IOS image of recent vintage; any 12.2 or later image is probably fine. Even very low-end devices appear to support the CISCO-PING-MIB.
  2. The IOS devices that will perform the remote pings must be configured with an SNMP write community string whose source address access-list includes the address of the OpenNMS server and whose MIB view (if any) includes the OID of the ciscoPingTable (.1.3.6.1.4.1.9.9.16.1.1).
  3. The corresponding SNMP write community string must be specified in the write-community attribute of either the top-level <snmp-config> element of snmp-config.xml or a <definition> child element that applies to the SNMP-primary interface of the IOS device(s) that will perform the remote pings.

Configuration

Service monitor parameters

Parameters common to all monitors

rrd-repository (optional)
Base directory of an RRD repository in which to store this service monitor's response-time samples
ds-name (optional, unused for this monitor)
Name of the RRD datasource (DS) name in which to store this service monitor's response-time samples; rrd-base-name (optional)
Base name of the RRD file (minus the .rrd or .jrb file extension) within the specified rrd-repository path in which this service monitor's response-time samples will be persisted

Parameters common to all SNMP-based monitors

timeout (optional)
A timeout, in milliseconds, that should override the SNMP timeout specified in snmp-config.xml.
retry (optional)
Number of retries to attempt if the initial attempt times out. Overrides the equivalent value from snmp-config.xml.
version (optional)
SNMP protocol version (1, 2c, or 3) to use for operations performed by thie service monitor

Parameters specific to this monitor

packet-count
Number of ping packets that the remote IOS device should send. Optional; defaults to 5.
packet-size
Size, in bytes, of each ping packet that the remote IOS device should send. Optional; defaults to 100.
packet-timeout
Timeout, in milliseconds, of each ping packet sent by the remote IOS device. Optional; defaults to 2000.
packet-delay
Delay, in milliseconds, between ping packets sent by the remote IOS device. Optional; defaults to 0.
entry-owner
String value to set as the value of ciscoPingEntryOwner of entries created for this service. Optional; defaults to "OpenNMS CiscoPingMibMonitor".
vrf-name
String value to set as the VRF (VLAN) name in whose context the remote IOS device should perform the pings for this service. Optional; defaults to the empty string.
proxy-node-id
Numeric database identifier of the node whose primary SNMP interface should be used as the "proxy" for this service. If specified along with the related proxy-node-foreign-source, proxy-node-foreign-id, and/or proxy-ip-addr, this parameter will be the effective one.
proxy-node-foreign-source and proxy-node-foreign-id
Foreign-source name and foreign-ID of the node whose primary SNMP interface should be used as the "proxy" for this service. These two parameters are corequisites. If they appear along with the related proxy-ip-addr, these parameters will be the effective ones.
proxy-ip-addr
IP address of the interface that should be used as the "proxy" for this service. Effective only if none of proxy-node-id, proxy-node-foreign-source, nor proxy-node-foreign-id appears alongside this parameter. A value of ${ipaddr} will be substituted with the IP address of the interface on which the monitored service appears.
target-ip-addr
IP address that the remote IOS device should ping. A value of ${ipaddr} will be substituted with the IP address of the interface on which the monitored service appears.
success-percent
A whole-number percentage of pings that must succeed (from the perspective of the remote IOS device) in order for this service to be considered available. Optional; defaults to 100. As an example, if packet-count is left at its default value of 5 but you wish the service to be considered available even if only one of those five pings is successful, then set this parameter's value to 20.

Examples

Ping the same non-routable address from all routers of customer Foo

Scenario

A service provider's client, Foo Corporation, has network service at multiple locations. At each Foo location, a point-of-sale system is statically configured at IPv4 address 192.168.255.1. Foo wants to be notified any time a point-of-sale system becomes unreachable. Using an OpenNMS remote location monitor is not feasible. All of Foo Corporation's CPE routers must be Cisco IOS devices in order to achieve full coverage in this scenario.

Approach

One approach to this requirement is to configure all of Foo Corporation's premise routers to be in the surveillance categories Customer_Foo, CPE, and Routers, and to use a filter to create a poller package that applies only to those routers. We will use the special value ${ipaddr} for the proxy-ip-addr parameter so that the remote pings will be provisioned on each Foo CPE router. Since we want each Foo CPE router to ping the same IP address 192.168.255.1, we statically list that value for the target-ip-addr address.

Example poller-configuration.xml additions

 <package name="ciscoping-foo-pos">
   <filter>catincCustomer_Foo & catincCPE & catincRouters & nodeSysOID LIKE '.1.3.6.1.4.1.9.%'</filter>
   <include-range begin="0.0.0.0" end="254.254.254.254" />
   <rrd step="300">
     <rra>RRA:AVERAGE:0.5:1:2016</rra>
     <rra>RRA:AVERAGE:0.5:12:1488</rra>
     <rra>RRA:AVERAGE:0.5:288:366</rra>
     <rra>RRA:MAX:0.5:288:366</rra>
     <rra>RRA:MIN:0.5:288:366</rra>
   </rrd>
   <service name="FooPOS" interval="300000" user-defined="false" status="on">
     <parameter key="rrd-repository" value="/opt/opennms/share/rrd/response" />
     <parameter key="rrd-base-name" value="ciscoping" />
     <parameter key="ds-name" value="ciscoping" />
     <parameter key="proxy-ip-addr" value="${ipaddr}" />
     <parameter key="target-ip-addr" value="192.168.255.1" />
   </service>
   <downtime interval="30000" begin="0" end="300000" /><!-- 30s, 0, 5m -->
   <downtime interval="300000" begin="300000" end="43200000" /><!-- 5m, 5m, 12h -->
   <downtime interval="600000" begin="43200000" end="432000000" /><!-- 10m, 12h, 5d -->
   <downtime begin="432000000" delete="true" /><!-- anything after 5 days delete -->
 </package>

You must also tell the poller which monitor class to use for the FooPOS service with an entry like this at the end of the file:

 <monitor service="FooPOS" class-name="org.opennms.netmgt.poller.monitors.CiscoPingMibMonitor" />

Ping from a single IOS device routable address of each router of customer Bar

Scenario

A service provider's client, Bar Limited, has network service at multiple locations. While OpenNMS' world-class service assurance is generally sufficient, Bar also wants to be notified any time a premise router at one of their locations unreachable from the perspective of an IOS device in Bar's main data center. Some or all of the Bar Limited CPE routers may be non-Cisco devices in this scenario.

Approach

To meet this requirement, our approach is to configure Bar Limited's premise routers to be in the surveillance categories Customer_Bar, CPE, and Routers, and to use a filter to create a poller package that applies only to those routers. This time, though, we will use the special value ${ipaddr} not in the proxy-ip-addr parameter but in the target-ip-addr parameter so that the remote pings will be performed for each Bar CPE router. Since we want the same IOS device 20.11.5.11 to ping the CPE routers, we statically list that value for the proxy-ip-addr address.

Example poller-configuration.xml additions

 <package name="ciscoping-bar-cpe">
   <filter>catincCustomer_Bar & catincCPE & catincRouters</filter>
   <include-range begin="0.0.0.0" end="254.254.254.254" />
   <rrd step="300">
     <rra>RRA:AVERAGE:0.5:1:2016</rra>
     <rra>RRA:AVERAGE:0.5:12:1488</rra>
     <rra>RRA:AVERAGE:0.5:288:366</rra>
     <rra>RRA:MAX:0.5:288:366</rra>
     <rra>RRA:MIN:0.5:288:366</rra>
   </rrd>
   <service name="BarCentral" interval="300000" user-defined="false" status="on">
     <parameter key="rrd-repository" value="/opt/opennms/share/rrd/response" />
     <parameter key="rrd-base-name" value="ciscoping" />
     <parameter key="ds-name" value="ciscoping" />
     <parameter key="proxy-ip-addr" value="20.11.5.11" />
     <parameter key="target-ip-addr" value="${ipaddr}" />
   </service>
   <downtime interval="30000" begin="0" end="300000" /><!-- 30s, 0, 5m -->
   <downtime interval="300000" begin="300000" end="43200000" /><!-- 5m, 5m, 12h -->
   <downtime interval="600000" begin="43200000" end="432000000" /><!-- 10m, 12h, 5d -->
   <downtime begin="432000000" delete="true" /><!-- anything after 5 days delete -->
 </package>

You must also tell the poller which monitor class to use for the BarCentral service with an entry like this at the end of the file:

 <monitor service="BarCentral" class-name="org.opennms.netmgt.poller.monitors.CiscoPingMibMonitor" />

Limitations

Scalability concerns

  • This monitor spends a fair amount of time sleeping while it waits for the remote IOS device to complete the requested ping operations. The monitor is pessimistic in calculating the delay between creation of the ciscoPingTable entry and its first attempt to retrieve the results of that entry's ping operations -- it will always wait at least ( packet-count * ( packet-timeout + packet-delay ) ) milliseconds before even checking whether the remote pings have completed. It's therefore prone to hogging poller threads if used with large values for the packet-count, packet-timeout, and/or packet-delay parameters. Keep these values as small as practical to avoid tying up poller threads unnecessarily.
  • This monitor always uses the current time in whole seconds since the UNIX epoch as the instance identifier of the ciscoPingTable entries that it creates. The object that holds this identifier is a signed 32-bit integer type, precluding a finer resolution. It's probably a good idea to mix in the least-significant byte of the millisecond-accurate time as a substitute for that of the whole-second-accurate value to avoid collisions. IOS seems to clean up entries in this table within a manner of minutes after their ping operations have completed.

Version History/Availability

Version History/Availability