Discussion:
[opennms-discuss] JRobin Help
Jay Christopherson
2008-10-08 17:22:26 UTC
Permalink
This might be more appropriate for another list, but since its ONMS I'm
working with I'm hoping that maybe I can get a quick answer here.

My issue is that I am trying to graph a singe datasource in ONMS, but it is
not graphing correctly. The datasource in question is spitting out whole
integers, but JRobin/ONMS seems to be storing the numbers as decimals.
Using jrobin-inspector, I can see that a number that was fetched as "6" (via
collectd logfile), is getting stored as a fraction in scientific notation.
I understand that this is how RRD/JRobin stores numbers, but I would expect
to be able to fetch and store whole integer. I've tried using both a LAST
and AVERAGE datasource definition. Here is my current definition:

jmx-datacollection:
<jmx-collection name="jsr160"
maxVarsPerPdu = "50">
<rrd step = "300">
<rra>RRA:AVERAGE:0.5:1:8928</rra>
<rra>RRA:AVERAGE:0.5:12:8784</rra>
<rra>RRA:MIN:0.5:12:8784</rra>
<rra>RRA:MAX:0.5:12:8784</rra>
</rrd>
...
<attrib name="Last5MinuteExpiredCount" alias="VrmL5mExpCount"
type="gauge"/>
...


snmp-graph.properties:

report.jvm.vrml5mexp.name=VRM Expired Count
report.jvm.vrml5mexp.columns=VrmL5mExpCount
report.jvm.vrml5mexp.type=interfaceSnmp
report.jvm.vrml5mexp.command=--title="VRM Last5MinuteExpiredCount" \
DEF:vrml5mexp={rrd1}:VrmL5mExpCount:AVERAGE \
AREA:vrml5mexp#99ff00:"VRM_L5M" \
GPRINT:vrml5mexp:LAST:"ExpiredCount (Current) : %8.2lf %s\\n"

Example from collectd.log:

collectd.log.4:2008-10-08 07:33:54,631 INFO [CollectdScheduler-50
Pool-fiber2] RrdUtils: updateRRD: updating RRD file
/opt/opennms/share/rrd/snmp/76/jvm/VrmL5mExpCount.jrb with values
'1223476435:6'


When I would expect to see a "6.0" on the graph (and printed out), I see
some sort of decimal like "3.45". I am sure the issue is my understanding
of how JRobin/RRDTool works, but I am having trouble understanding exactly
what is going on here.

Thanks!
Jay
Jay Christopherson
2008-10-08 21:07:20 UTC
Permalink
Ok, let me rephrase this question:

Can someone tell me how to define a datasource/graph definition that will
display exact values, rather than consolidate rates?

Thanks!
Jay
DJ Gregor
2008-10-09 20:03:25 UTC
Permalink
If you really want to be able to see the exact value that was collected,
then the solution is to not use RRDTool.

RRDTool is not meant for preserving the exact input values, but instead
to provide an accurate representation of time-series data, well, over
time. To do this, it does data normalization, which splits input data
into one or more internal time buckets based on when the data was
received. For example, if the "bucket" size (known as the RRD "step")
is 300 seconds, or 5 minutes, you'll have one bucket from 00:00 - 00:05,
another from 00:05 - 00:10, etc.. Now, if you insert a piece of data
into the RRD at 00:02:30 and again five minutes later at 00:07:30, what
should RRD do with that data? The answer is that it normalizes it, and
in this case, half of the value is added to the 00:00 - 00:05 bucket and
the other half of the value is added to the 00:05 - 00:10 bucket.

Google for "rrd normalization" to get more details.

With OpenNMS you can store the most recent value as a text string if you
make the type "string" instead of "gauge". It will end up in a
properties file instead of in RRDTool, but no history is stored. If you
search for "hrStorageDescr" in datacollection-config.xml and
snmp-graph.properties, you can see a working example.


- djg

On Wed, 8 Oct 2008 10:22:26 -0700, "Jay Christopherson"
Post by Jay Christopherson
This might be more appropriate for another list, but since its ONMS I'm
working with I'm hoping that maybe I can get a quick answer here.
My issue is that I am trying to graph a singe datasource in ONMS, but it is
not graphing correctly. The datasource in question is spitting out whole
integers, but JRobin/ONMS seems to be storing the numbers as decimals.
Using jrobin-inspector, I can see that a number that was fetched as "6" (via
collectd logfile), is getting stored as a fraction in scientific notation.
I understand that this is how RRD/JRobin stores numbers, but I would expect
to be able to fetch and store whole integer. I've tried using both a LAST
<jmx-collection name="jsr160"
maxVarsPerPdu = "50">
<rrd step = "300">
<rra>RRA:AVERAGE:0.5:1:8928</rra>
<rra>RRA:AVERAGE:0.5:12:8784</rra>
<rra>RRA:MIN:0.5:12:8784</rra>
<rra>RRA:MAX:0.5:12:8784</rra>
</rrd>
...
<attrib name="Last5MinuteExpiredCount" alias="VrmL5mExpCount"
type="gauge"/>
...
report.jvm.vrml5mexp.name=VRM Expired Count
report.jvm.vrml5mexp.columns=VrmL5mExpCount
report.jvm.vrml5mexp.type=interfaceSnmp
report.jvm.vrml5mexp.command=--title="VRM Last5MinuteExpiredCount" \
DEF:vrml5mexp={rrd1}:VrmL5mExpCount:AVERAGE \
AREA:vrml5mexp#99ff00:"VRM_L5M" \
GPRINT:vrml5mexp:LAST:"ExpiredCount (Current) : %8.2lf %s\\n"
collectd.log.4:2008-10-08 07:33:54,631 INFO [CollectdScheduler-50
Pool-fiber2] RrdUtils: updateRRD: updating RRD file
/opt/opennms/share/rrd/snmp/76/jvm/VrmL5mExpCount.jrb with values
'1223476435:6'
When I would expect to see a "6.0" on the graph (and printed out), I see
some sort of decimal like "3.45". I am sure the issue is my
understanding
of how JRobin/RRDTool works, but I am having trouble understanding exactly
what is going on here.
Thanks!
Jay
Will Fraley
2008-10-09 22:00:22 UTC
Permalink
I do something like this to please the folks that don't understand why there
are decimals in collected integer values on graphs:

CDEF:myvar_int=myvar,1,%,0.5,GE,myvar,CEIL,myvar,FLOOR,IF \

It will give you integer values on the graph. It doesn't however address
storing them as integers directly, buy DJ covered that below.

-Will
Post by DJ Gregor
If you really want to be able to see the exact value that was collected,
then the solution is to not use RRDTool.
RRDTool is not meant for preserving the exact input values, but instead
to provide an accurate representation of time-series data, well, over
time. To do this, it does data normalization, which splits input data
into one or more internal time buckets based on when the data was
received. For example, if the "bucket" size (known as the RRD "step")
is 300 seconds, or 5 minutes, you'll have one bucket from 00:00 - 00:05,
another from 00:05 - 00:10, etc.. Now, if you insert a piece of data
into the RRD at 00:02:30 and again five minutes later at 00:07:30, what
should RRD do with that data? The answer is that it normalizes it, and
in this case, half of the value is added to the 00:00 - 00:05 bucket and
the other half of the value is added to the 00:05 - 00:10 bucket.
Google for "rrd normalization" to get more details.
With OpenNMS you can store the most recent value as a text string if you
make the type "string" instead of "gauge". It will end up in a
properties file instead of in RRDTool, but no history is stored. If you
search for "hrStorageDescr" in datacollection-config.xml and
snmp-graph.properties, you can see a working example.
- djg
On Wed, 8 Oct 2008 10:22:26 -0700, "Jay Christopherson"
Post by Jay Christopherson
This might be more appropriate for another list, but since its ONMS I'm
working with I'm hoping that maybe I can get a quick answer here.
My issue is that I am trying to graph a singe datasource in ONMS, but it
is
not graphing correctly. The datasource in question is spitting out whole
integers, but JRobin/ONMS seems to be storing the numbers as decimals.
Using jrobin-inspector, I can see that a number that was fetched as "6"
(via
collectd logfile), is getting stored as a fraction in scientific
notation.
I understand that this is how RRD/JRobin stores numbers, but I would
expect
to be able to fetch and store whole integer. I've tried using both a
LAST
<jmx-collection name="jsr160"
maxVarsPerPdu = "50">
<rrd step = "300">
<rra>RRA:AVERAGE:0.5:1:8928</rra>
<rra>RRA:AVERAGE:0.5:12:8784</rra>
<rra>RRA:MIN:0.5:12:8784</rra>
<rra>RRA:MAX:0.5:12:8784</rra>
</rrd>
...
<attrib name="Last5MinuteExpiredCount" alias="VrmL5mExpCount"
type="gauge"/>
...
report.jvm.vrml5mexp.name=VRM Expired Count
report.jvm.vrml5mexp.columns=VrmL5mExpCount
report.jvm.vrml5mexp.type=interfaceSnmp
report.jvm.vrml5mexp.command=--title="VRM Last5MinuteExpiredCount" \
DEF:vrml5mexp={rrd1}:VrmL5mExpCount:AVERAGE \
AREA:vrml5mexp#99ff00:"VRM_L5M" \
GPRINT:vrml5mexp:LAST:"ExpiredCount (Current) : %8.2lf %s\\n"
collectd.log.4:2008-10-08 07:33:54,631 INFO [CollectdScheduler-50
Pool-fiber2] RrdUtils: updateRRD: updating RRD file
/opt/opennms/share/rrd/snmp/76/jvm/VrmL5mExpCount.jrb with values
'1223476435:6'
When I would expect to see a "6.0" on the graph (and printed out), I see
some sort of decimal like "3.45". I am sure the issue is my
understanding
of how JRobin/RRDTool works, but I am having trouble understanding
exactly
what is going on here.
Thanks!
Jay
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
http://www.opennms.org/index.php/Mailing_List_FAQ
opennms-discuss mailing list
To *unsubscribe* or change your subscription options, see the bottom of this
https://lists.sourceforge.net/lists/listinfo/opennms-discuss
Continue reading on narkive:
Loading...