RRD store by group feature

From OpenNMS
Jump to: navigation, search


Why

OpenNMS has probably one of the fastest SNMP data collection engines on the planet. However, persisting that data to RRD storage places a tremendous demand on the system IO due mainly to the way that OpenNMS writes each data points to its own RRD file. This milestone, provides a more flexible and configurable way to persist RRD data (group collected data into a single file). This frees up IO overhead and will improve performance tremendously.

What it does

When this feature is enabled, all data points specified in the data collection configuration file <group> element are stored in a file using the name of the group. For example, all of the data points below will be stored in a single file for "mib2-interfaces":

<group name="mib2-interfaces" ifType="all">
  <mibObj oid=".1.3.6.1.2.1.2.2.1.10" instance="ifIndex" alias="ifInOctets" type="counter" />
  <mibObj oid=".1.3.6.1.2.1.2.2.1.11" instance="ifIndex" alias="ifInUcastpkts" type="counter" />
  <mibObj oid=".1.3.6.1.2.1.2.2.1.12" instance="ifIndex" alias="ifInNUcastpkts" type="counter" />
  <mibObj oid=".1.3.6.1.2.1.2.2.1.13" instance="ifIndex" alias="ifInDiscards" type="counter" />
  <mibObj oid=".1.3.6.1.2.1.2.2.1.14" instance="ifIndex" alias="ifInErrors" type="counter" />
  <mibObj oid=".1.3.6.1.2.1.2.2.1.16" instance="ifIndex" alias="ifOutOctets" type="counter" />
  <mibObj oid=".1.3.6.1.2.1.2.2.1.17" instance="ifIndex" alias="ifOutUcastPkts" type="counter" />
  <mibObj oid=".1.3.6.1.2.1.2.2.1.18" instance="ifIndex" alias="ifOutNUcastPkts" type="counter" />
  <mibObj oid=".1.3.6.1.2.1.2.2.1.19" instance="ifIndex" alias="ifOutDiscards" type="counter" />
  <mibObj oid=".1.3.6.1.2.1.2.2.1.20" instance="ifIndex" alias="ifOutErrors" type="counter" />
  <mibObj oid=".1.3.6.1.2.1.31.1.1.1.6" instance="ifIndex" alias="ifHCInOctets" type="counter" />
  <mibObj oid=".1.3.6.1.2.1.31.1.1.1.10" instance="ifIndex" alias="ifHCOutOctets" type="counter" />
</group>

Availability

This feature is available in OpenNMS release 1.3.2 and all later releases. It works with both JRobin and RRD storage strategies.

Configuration

Enable store by group SNMP data collection

Edit $OPENNMS_HOME/etc/opennms.properties and set "org.opennms.rrd.storeByGroup" to "true". Example:

org.opennms.rrd.storeByGroup=true

Stop OpenNMS

It's necessary to restart OpenNMS in order for the new property setting to take effect. You'll want to perform the following step after OpenNMS has stopped but before it restarts, so just stop it rather than issuing a restart command.

Delete old RRD files

Currently no tool is available to convert an RRD repository created by openNMS in one-to-one persistence mode to be compatible with store-by-group persistence mode. You'll need to delete the existing RRD files in your OPENNMS_HOME/share/rrd/snmp directory, which implies losing all historical performance data. At some point a tool will be available to convert RRD repositories bidirectionally between the one-to-one and store-by-group persistence modes.

Start OpenNMS

And you're off and running.

Downsides

While other downsides of this feature were fixed, one downside in using this feature remains: If you change a group to include a new oid, this renders the RRD file unusable. You will have to delete it and have OpenNMS recreate it, which means you lose old performance data.