Transformation from RRD to CSV

bontade picture bontade · May 3, 2012 · Viewed 9.4k times · Source

I use JavaMelody tool to monitoring my application, but the available timeline settings aren't suitable. It means I want to get monitoring scores for only quick timeline, like 30 minutes, but the lowest time range in JavaMelody is 1 day. Probably this feature can be solved by writing custom plugin, but I'm familiarized with that tool API.

JavaMelody generates output files in RRD format. I want to transform that files to more common format, like CSV, and generate chart with Excel. I've tried to use 'rrdtool dump' command under Linux, but with no effects. I've got errors like: is not an RRD file.

Do you know any solution to transform from RRD to CSV?


UPDATE

  adam@adam-desktop:/tmp/javamelody/car-rental_adam-desktop$ rrdtool dump usedMemory.rrd > filename.xml
  ERROR: 'usedMemory.rrd' is not an RRD file
  adam@adam-desktop:/tmp/javamelody/car-rental_adam-desktop$ rrdtool dump usedMemory.rrd > filename.csv
  ERROR: 'usedMemory.rrd' is not an RRD file

My *.rrd files are generated by JavaMelody tool so I think that are correctly saved.


UPDATE 2

00000000  00 4a 00 52 00 6f 00 62  00 69 00 6e 00 2c 00 20  |.J.R.o.b.i.n.,. |
00000010  00 76 00 65 00 72 00 73  00 69 00 6f 00 6e 00 20  |.v.e.r.s.i.o.n. |
00000020  00 30 00 2e 00 31 00 20  00 00 00 00 00 00 00 3c  |.0...1. .......<|
00000030  00 00 00 01 00 00 00 08  00 00 00 00 4f b9 47 0f  |............O.G.|
00000040  00 75 00 73 00 65 00 64  00 4d 00 65 00 6d 00 6f  |.u.s.e.d.M.e.m.o|
00000050  00 72 00 79 00 20 00 20  00 20 00 20 00 20 00 20  |.r.y. . . . . . |
00000060  00 20 00 20 00 20 00 20  00 47 00 41 00 55 00 47  |. . . . .G.A.U.G|
00000070  00 45 00 20 00 20 00 20  00 20 00 20 00 20 00 20  |.E. . . . . . . |
00000080  00 20 00 20 00 20 00 20  00 20 00 20 00 20 00 20  |. . . . . . . . |
00000090  00 00 00 00 00 00 00 78  00 00 00 00 00 00 00 00  |.......x........|
000000a0  7f f8 00 00 00 00 00 00  41 93 36 05 40 00 00 00  |........A.6.@...|
000000b0  41 e5 03 15 be 00 00 00  00 00 00 00 00 00 00 00  |A...............|
000000c0  00 41 00 56 00 45 00 52  00 41 00 47 00 45 00 20  |.A.V.E.R.A.G.E. |
000000d0  00 20 00 20 00 20 00 20  00 20 00 20 00 20 00 20  |. . . . . . . . |
000000e0  00 20 00 20 00 20 00 20  3f d0 00 00 00 00 00 00  |. . . . ?.......|
000000f0  00 00 00 01 00 00 05 a0  7f f8 00 00 00 00 00 00  |................|
00000100  00 00 00 00 00 00 00 00  00 00 00 21 41 89 70 79  |...........!A.py|
00000110  00 00 00 00 41 92 ae 5a  55 55 55 55 41 8f 9f 49  |....A..ZUUUUA..I|
00000120  95 55 55 55 41 96 43 4d  00 00 00 00 7f f8 00 00  |.UUUA.CM........|
00000130  00 00 00 00 7f f8 00 00  00 00 00 00 7f f8 00 00  |................|

Answer

chifangjang picture chifangjang · Feb 3, 2018

I also got the same error is not an RRD file.
But I can dump usedMemory.rrd to XML now under the below steps.

  1. download the project from https://github.com/OpenNMS/jrobin
    and execute maven pagckage for generate jrobin-1.6.1-SNAPSHOT.jar
    Java version: 1.8.0_131 && Apache Maven 3.5.2
  2. java -jar jrobin-1.6.1-SNAPSHOT.jar rrdtool dump usedMemory.rrd > test.xml