Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-6895

The XML Collector can't save counter metrics on RRDs (using RRDtool)

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.12.9, 1.13.4
    • Fix Version/s: 14.0.0
    • Component/s: Data Collection - XML
    • Security Level: Default (Default Security Scheme)
    • Labels:
      None
    • Environment:
      CentOS 6.x, opennms installed via yum, openjdk 1.7

      Description

      Xml data collection/persistence works with jrobin, fails with rrdtool, storeByGroup.

      Collectd-configuration.xml has:

      <service name="FSMLGeneratorStats" interval="300000" user-defined="false" status="on">
          <parameter key="collection" value="generator-stats"/>
          <parameter key="retry" value="1"/>
          <parameter key="timeout" value="3000"/>
          <parameter key="url" value="/stats"/>
      </service>
      ...
      <collector service="FSMLGeneratorStats" class-name="org.opennms.protocols.xml.collector.XmlCollector"/>
      

      xml-datacollection-config.xml has:

      <xml-collection name="generator-stats">
          <rrd step="300">
              <rra>RRA:AVERAGE:0.5:1:2016</rra>
              <rra>RRA:AVERAGE:0.5:12:1488</rra>
              <rra>RRA:AVERAGE:0.5:288:366</rra>
              <rra>RRA:MAX:0.5:288:366</rra>
              <rra>RRA:MIN:0.5:288:366</rra>
           </rrd>
           <xml-source url="http://{ipaddr}:4004/stats">
                <xml-group name="generatorstats" resource-type="node" resource-xpath="/stats/generators">
                    <xml-object name="genCurrent" type="GAUGE" xpath="current"/>
                    <xml-object name="genSuccess" type="COUNTER" xpath="results/success"/>
                    <xml-object name="genCancelled" type="COUNTER" xpath="results/cancelled"/>
                    <xml-object name="genTimeout" type="COUNTER" xpath="results/timeout"/>
                    <xml-object name="genErrors" type="COUNTER" xpath="results/errors"/>
                    <xml-object name="genExceptions" type="COUNTER" xpath="results/exceptions"/>
                </xml-group>
           </xml-source>
      </xml-collection>
      

      And the relevant chunk of data might look like:

      <stats>
        <generators>
          <current>92</current>
          <results>
            <success>8431809</success>
            <cancelled>561</cancelled>
            <timeout>86</timeout>
            <errors>58132</errors>
            <exceptions>0</exceptions>
          </results>
         </generators>
      </stats>
      

      Jrobin works with/without storeByGroup. Rrdtool with storeByGroup shows NAN for all values. Without storeByGroup it persists values for genCurrent (a GAUGE) value updates and also genExceptions (a COUNTER, but in my test run, always zero). rrdtool info shows values being updated in the 'last_ds" but not converted to rates for the time sample.

        Attachments

        1. collectd.log
          38 kB
        2. org.opennms.protocols.xml-14.0.1.jar
          86 kB
        3. stats.cgi
          1.0 kB
        4. xmlcollector.log
          38 kB

          Activity

            People

            • Assignee:
              agalue Alejandro Galue
              Reporter:
              lesmikesell@gmail.com Les Mikesell
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: