When using rrd files, statsd is unable to parse Nan values.

Description

None

Environment

Operating System: All Platform: All

Acceptance / Success Criteria

None

Attachments

1

Lucidchart Diagrams

Activity

Show:

Jean-Marie Kubek February 2, 2008 at 12:03 PM

(In reply to comment #5)
> did this work for you?
>
Yes it did.

Benjamin Reed January 17, 2008 at 7:30 PM

did this work for you?

DJ Gregor January 10, 2008 at 12:28 AM

Jean-Marie,

Please give revision 8142 or later a try and see if it works for you. There are even some unit tests in there to test for NaN and nan, now.

  • r8142 /opennms/trunk/opennms-dao/src/ (2 files in 2 dirs):
    Improve error checking on print values in getPrintValue and add some more tests.
    See .

DJ Gregor January 9, 2008 at 6:50 PM

$ rrdtool create /tmp/test.rrd DS:test:GAUGE:1000:U:U RRA:AVERAGE:test && rrdtool graph /dev/null DEF:ds=/tmp/test.rrd:test:AVERAGE PRINT:ds:AVERAGE:%le
0x0
nan

jmk points out:
rrdfetch man page says that : <<UNKNOWN data representation depends on the OS's printf function>>

DJ Gregor January 4, 2008 at 10:18 PM

What is the value that can't be parsed by Double.parseDouble? Also, I'm not sure if using NaN if we hit any exceptions with Double.parseDouble is a good idea... it might hide errors where something other than a value equivalent to NaN is spit out by rrdtool and friends.

I did a quick test with bean shell (bsh), and it was able to happily parse NaN:

bsh % System.out.println(Double.parseDouble("NaN"));
NaN
bsh %

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

PagerDuty

Created January 4, 2008 at 11:49 AM
Updated January 27, 2017 at 4:31 PM
Resolved August 31, 2010 at 4:16 PM