Tutorial Data Collection
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).
Here is how a package looks:
<package name="example1"> <filter>IPADDR != '0.0.0.0'</filter> <include-range begin="184.108.40.206" end="254.254.254.254"/> <service name="SNMP" interval="300000" user-defined="false" status="on"> <parameter key="collection" value="default"/> <parameter key="thresholding-enabled" value="true"/> </service> </package>
The package example1 will be applied to all nodes that pass the filter (IPADDR != '0.0.0.0'), contain an IP address in the range (From 220.127.116.11 to 254.254.254.254), 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.
Click here if you want more detailed information about data collection.