Rrd4j and tools to read .rrd files

I understand that the rrd4j files are NOT binary compatible with rrdtools, but are there any command line tools that can read the output of the raw .rrd files?

I’m not aware of any official command line tools to do it. However, I’ve written Jython scripts to dump rrd4j values from the command line.

Anything you can share?


did you ever get anywhere with this? I have corrupt records in my temperature RRD files which need fixing. RRDTOOL looked perfect for the job, but as you say here, it doesnt work with RRD4J files. If anyone has any suggestions I am keen to try them out!

You could try the inspector within the library org.openhab.persistence.rrd4j/lib/rrd4j-2.1.1.jar.

java -cp rrd4j-2.1.1.jar org.rrd4j.inspector.RrdInspector

It worked good, I was able to remove bogus data from my rrd file.

Worked like a charm! I have been looking for an application like this for a long time.

Actually I just extracted rrd4j-2.1.1.jar from org.openhab.persistence.rrd4j-1.8.3.jar with WinZip and created a .cmd-file containing your command line. This way RrdInspector is easy to access like a “stand alone” application in Windows :slight_smile:

I want to add a Linux way to do it, if the rrd4j DB is running on another machine (e.g. a raspberry). Log into that Raspberry with the ssh -X <ip> option (mind uppercase) and simply call the RrdInspector as proposed from @csowada.

Anyway, sadly RrdInspector has no option to exporting any data.

There’s another thread accessing-rrd4j-info.

Concluding: Either a) use another persistence service than rrd4j (e.g. influxDB) or b) access the data using REST API (see rrd4j-rest-persistence).
In my OpenHAB2 case though, the following two REST API request gave me a 404 error:

  • http://IP:PORT/rest/persistence/rrd4j/ITEMNAME
  • http://IP:PORT/rest/persistence/ITEMNAME?servicename=rrd4j

The following URL worked for my OpenHAB2:

BTW: You may want to install the REST API (Doc) and play with it as explained in Accessing RRD4j info

@csowada : This didn’t worked for me. I always get the message that org.rrd4j.inspector.RrdInspector was not found.
Strange. If i unzip the Jar i see the RrdInspector.

Any hints? I tried it on windows, mac and on the raspi itself. Very strange.

Any help? The following doesn’t work for me, too.

java -cp rrd4j-2.1.1.jar org.rrd4j.inspector.RrdInspector

Did you follow this?