And the Debug Log says this: o.o.n.j.m.MeasurementQueryExecutor: Create datasource for query '<query-request step="1" start="1457564400000" end="1457650800000" maxrows="0"> <source aggregation="AVERAGE" label="IfHCInOctets" attribute="ifHCInOctets" transient="false" resourceId="nodeSource[Switches:1404393057866].interfaceSnmp[Ethernet127_1_48-mac]"/> <source aggregation="AVERAGE" label="IfHCOutOctets" attribute="ifHCOutOctets" transient="false" resourceId="nodeSource[Switches:1404393057866].interfaceSnmp[Ethernet127_1_48-mac]"/> </query-request>'
If I print the Field Step on the Output, I get only "null".
Environment
Customer identified in ticket https://mynms.opennms.com/Ticket/Display.html?id=4403
Acceptance / Success Criteria
None
Lucidchart Diagrams
Activity
Show:
Markus von Rüden March 17, 2016 at 6:19 AM
The Measurements Datasource works as expected.
Markus von Rüden March 17, 2016 at 6:18 AM
Edited
I investigated and I could not find any issue related to this issue. I noticed two things:
1. As originally stated the Field "Step" does not exist, it must be "step". In addition it must be of type "java.lang.Long" instead of type "java.lang.Double":
can you please provide the rrd data from demo.opennms.org? I do not have any data which the measurement api can provide and I do not have access to demo.opennms.org.
Jeff Gehlbach March 16, 2016 at 1:21 AM
Report template now available on ticket (see above for link).
From support ticket:
noformat
in the Report the Request locks like:
<queryString language="measurement">
<![CDATA[<query-request step="1" start="$P{startDateTime}" end="$P{endDateTime}" maxrows="0">
<source aggregation="AVERAGE" label="IfHCInOctets" attribute="ifHCInOctets" transient="false" resourceId="$P{nodeResourceDescriptor}.interfaceSnmp[$P{interface}]"/>
<source aggregation="AVERAGE" label="IfHCOutOctets" attribute="ifHCOutOctets" transient="false" resourceId="$P{nodeResourceDescriptor}.interfaceSnmp[$P{interface}]"/>
</query-request>]]>
</queryString>
<field name="Step" class="java.lang.Double">
<fieldDescription><![CDATA[Step]]></fieldDescription>
</field>
<field name="IfHCInOctets" class="java.lang.Double">
<fieldDescription><![CDATA[IfHCInOctets]]></fieldDescription>
</field>
<field name="IfHCOutOctets" class="java.lang.Double">
<fieldDescription><![CDATA[IfHCOutOctets]]></fieldDescription>
</field>
And the Debug Log says this:
o.o.n.j.m.MeasurementQueryExecutor: Create datasource for query '<query-request step="1" start="1457564400000" end="1457650800000" maxrows="0">
<source aggregation="AVERAGE" label="IfHCInOctets" attribute="ifHCInOctets" transient="false" resourceId="nodeSource[Switches:1404393057866].interfaceSnmp[Ethernet127_1_48-mac]"/>
<source aggregation="AVERAGE" label="IfHCOutOctets" attribute="ifHCOutOctets" transient="false" resourceId="nodeSource[Switches:1404393057866].interfaceSnmp[Ethernet127_1_48-mac]"/>
</query-request>'
If I print the Field Step on the Output, I get only "null".