Tutorial Data Collection

From OpenNMS
Jump to: navigation, search


In OpenNMS, data collection is performed by a daemon called Collectd, which is enabled by default.

This daemon is configured through a file called collectd-configuration.xml. The content of this file is classified by packages. Each package contains a section to select the nodes based on a given filter, and a list of services. Each service definition is associated with a specific collector type.

Collectd will activate data collection for each node who pass the filter, contains an IP address in the configured range and also contains any of those services listed in the package associated with the selected IP address.

By default data collection is enabled for SNMP and for OpenNMS-JVM (to monitor itself through JMX).

Example Configuration

Here is how a package looks:

 <package name="example1">
        <filter>IPADDR != ''</filter>
        <include-range begin="" end=""/>
        <service name="SNMP" interval="300000" user-defined="false" status="on">
            <parameter key="collection" value="default"/>
            <parameter key="thresholding-enabled" value="true"/>

The package example1 will be applied to all nodes that pass the filter (IPADDR != ''), contain an IP address in the range (From to, and have the SNMP service associated with the IP contained in the range. The data collection for SNMP will be performed every 5 minutes (according with the interval) using the default collection. Also the threshold processing is enabled for this service.

At the end of the configuration file, there is an entry like this:

<collector service="SNMP" class-name="org.opennms.netmgt.collectd.SnmpCollector"/>

This means, that the SnmpCollector will be associated with the service SNMP. That is how we tell to OpenNMS the collector type that should be used for a specific service. So an entry like this must exist for every single service defined on all packages.

Each collector type has their own specific set of configuration files, and each of them must be configured separately.

Data Collection Implementations

Currently there are implementations to perform data collection through SNMP, JMX, JDBC, NSClient, WMI, XML, HTTP and XMP.

Learn More

Note.png Try It! Specific Data Collection Tutorials

Here are some tutorials about how to configure the commonly used services:

Note.png Try It! Threshold Processing

Collectd is responsible for threshold processing in current versions of OpenNMS. Click here to review a tutorial about how to enable and configure thresholds.

Click here if you want more detailed information about data collection.