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

Inconsistencies with the Measurements API when using Newts

    Details

    • Sprint:
      Horizon - Nov 2nd, Horizon - Nov 9th

      Description

      IMPORTANT: THE FOLLOWING WON'T HAPPEN WHEN USING RRDTOOL.

      The following was verified with latest foundation-2016 and latest snapshot for Meridian-2016.1.0:

      1) When using MIN or MAX as the aggregation function when calling the following ReST end-point, weird values are returned:

      /opennms/rest/measurements/{resourceId}/{metricId}
      

      Here are examples:

      /rest/measurements/nodeSource%5BKME:OI-68EFE924426240239D42BE1F053AD80D%5D.nodeSnmp%5B%5D/avgBusy5?start=-200000&step=30000&aggregation=MAX
      <query-response end="1465829299271" start="1465829099271" step="30000">
      <columns>
      <values>4.9E-324</values>
      <values>4.9E-324</values>
      <values>4.9E-324</values>
      <values>4.9E-324</values>
      <values>4.9E-324</values>
      <values>4.9E-324</values>
      <values>4.9E-324</values>
      <values>4.9E-324</values>
      <values>4.9E-324</values>
      </columns>
      <labels>avgBusy5</labels>
      <timestamps>1465829070000</timestamps>
      <timestamps>1465829100000</timestamps>
      <timestamps>1465829130000</timestamps>
      <timestamps>1465829160000</timestamps>
      <timestamps>1465829190000</timestamps>
      <timestamps>1465829220000</timestamps>
      <timestamps>1465829250000</timestamps>
      <timestamps>1465829280000</timestamps>
      <timestamps>1465829310000</timestamps>
      </query-response>
      
      rest/measurements/nodeSource%5BKME:OI-68EFE924426240239D42BE1F053AD80D%5D.nodeSnmp%5B%5D/avgBusy5?start=-100000&step=1&aggregation=MIN
      <query-response end="1465831042024" start="1465830942024" step="30000">
      <columns>
      <values>1.7976931348623157E308</values>
      <values>1.7976931348623157E308</values>
      <values>1.7976931348623157E308</values>
      <values>1.7976931348623157E308</values>
      <values>1.7976931348623157E308</values>
      </columns>
      <labels>avgBusy5</labels>
      <timestamps>1465830930000</timestamps>
      <timestamps>1465830960000</timestamps>
      <timestamps>1465830990000</timestamps>
      <timestamps>1465831020000</timestamps>
      <timestamps>1465831050000</timestamps>
      </query-response>
      

      2) According with the documentation, step=1 means:

      Requested time interval between rows. Actual step may differ. Set to 1 for maximum accuracy.

      When using Newts, it uses whatever value is configured for org.opennms.newts.query.minimum_step in opennms.properties instead the configured step on collectd-configuration.xml. This is kind of confusing as this is not the case when using RRDtool.

      For now, you have to provide a more precise step, which is problematic if you have different collection step for different devices on collectd-configuration.xml, specially when the final user of this ReST end point doesn't know the collection interval for a given device.

        Attachments

          Activity

            People

            • Assignee:
              j-white Jesse White
              Reporter:
              agalue Alejandro Galue
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: