Monitoring disk IO with Net-SNMP

From OpenNMS
Jump to navigation Jump to search

OpenNMS ships with all the necessary configuration to collect disk I/O metric data from the Net-SNMP agent, but the actual collection is switched off by default. The reason is slightly ironic: collecting these metrics can overwhelm the OpenNMS server with disk I/O.

Net SNMP Requirements

Net-SNMP must be built with the module ucd-snmp/diskio enabled. All modern enterprise Linux distributions should ship the agent this way by default.

OpenNMS Configuration (GUI)

While logged in as an admin user to the OpenNMS web UI, go to the Configure OpenNMS menu item under the user menu. Select Configure SNMP Collections and Data Collection Groups. Select the Data Collection Groups tab, and choose netsnmp.xml from the Select Data Collection Group File combo-box. Select the System Definitions tab and highlight the Net-SNMP entry.

Screen capture 1/3

Scroll down and click the Edit button. In the Available MIB Groups multi-select list, choose ucd-diskio and click the >> button to move this group into the Selected list. Click the Save button.

Screen capture 2/3

Scroll back up and click the Save Data Collection File button. Confirm the popup dialog.

Screen capture 3/3

Disk I/O data will begin collecting from the next collection cycle.

OpenNMS Configuration (CLI)

If you prefer the CLI, you can go that route.

Edit the file OPENNMS_HOME/etc/datacollection/netsnmp.xml and for the "Net-SNMP" system definition, add "<includeGroup>ucd-diskio</includeGroup>". The other system definitions need touching only if you are using a very old version of Net-SNMP.

Tip off OpenNMS to the changes by updating the modification timestamp on OPENNMS_HOME/etc/datacollection-config.xml. On Linux systems, the touch utility is the usual way to do this. On other platforms you are on your own.