Welcome to Questions - Ask OpenNMS, where you can ask questions and receive answers from other members of the community.

XML data collection not working

0 votes
I have tried to get XML data collection working on my system, but my node is showing XMLTest not monitored. I followed the example in the forum at http://ask.opennms.eu/?qa=706/performance-try-collect-simple-counter-xml-file-new-opennms, with the exception I changed the path of my data.

xml-datacollection-config.xml has the following:

<xml-datacollection-config rrdRepository="/var/lib/opennms/rrd/snmp/" xmlns="http://xmlns.opennms.org/xsd/config/xml-datacollection">
    To understand how the XML Collector works, and how to configure it, please check the following link:
        <xml-source url="file:D:/Performance/data/test.xml">
    <xml-collection name="TestCollectionFile">
        <rrd step="300">
        <xml-source url="/etc/opennms/examples/test.xml">
            <xml-group name="srv-stats" resource-type="node" resource-xpath="/data/server">
                <xml-object name="ServerName" type="string" xpath="@name" />
                <xml-object name="ifInOctets" type="GAUGE" xpath="ifInOctets" />
                <xml-object name="ifOutOctets" type="GAUGE" xpath="ifOutOctets" />


and collectd-configuration.xml has the following:

    <package name="Test">
        <filter>IPADDR != ''</filter>
        <include-range begin="" end="" />

        <service name="XMLTest" interval="300000" user-defined="false" status="on">

          <parameter key="collection" value="TestCollectionFile"/>
          <parameter key="handler-class" value="org.opennms.protocols.xml.vtdxml.DefaultVTDXmlCollectionHandler"/>
          <parameter key="rrd-repository" value="/usr/share/opennms/share/rrd/test" />
          <parameter key="rrd-base-name" value="file" />


    <collector service="XMLTest" class-name="org.opennms.protocols.xml.collector.XmlCollector"/>


I added a service for XMLTest.

I am pretty sure that because it is not specified in poller-configuration.xml it is not being monitored. But what would I put in poller-configuration.xml? Or is that even the correct place.

Also, I don't get any data showing up in /usr/share/opennms/share/rrd/test which is what I would suspect should happen.

In poller.log

poller.log:2015-11-02 11:41:13,390 WARN  [Poller:PollerEventProcessor-Thread] o.o.n.p.Poller: Active service XMLTest on not configured for any package. Marking as Not Polled.
poller.log:2015-11-02 11:41:13,393 WARN  [Poller:PollerEventProcessor-Thread] o.o.n.p.Poller: Attempt to schedule service 2/ found no active service
OpenNMS version
Java version
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Operating system
Linux Ubuntu 12.04
PostgreSQL version
asked Nov 6, 2015 by mkessler_sw (180 points)

1 Answer

0 votes

OpenNMS has two functions:

  • Fault Management
  • Performance Management
Pollerd runs tests like ICMP, SSH or HTTP to figure out if they are working or not (UP/DOWN). Pollerd is responsible to feed data for availability calculation and response times and fits into the Fault Management part. You can see this as Blackbox tests against a service from user perspective.
Collectd is the Performance Management part and can gather performance metrics which are persisted over time. Collectd gathers metrics like InOctets/Outoctets or number of users in a system.
When you talking about XML data collection you have to debug Collectd. The status "Not Monitored" just means there is no Pollerd test configured which is checking for availability. Collectd will try to collect the configured performance metric associated with the service in the collectd-configuration, even when it shows "Not Monitored".
Hope this helps and clarifies a little for further debugging
answered Oct 10, 2016 by indigo (11,140 points)