HowTo Change values in an rrd4j database

Note 1: Due to the setup of rrd4j databases a wrong value saved in archive 1 will also affect corresponding values in further archives. The way the other archives are effected depends on the consolidation function used. One should consider to check/update all archives when trying to remove a false value.

Note 2: In order not to work on the database in question while it is written too, openHAB should be stopped.

The file “rrd4j-2.1.1.jar” which is used by openHAB is needed ( on my openhabian installation to be found in folder “/var/lib/openhab2/cache/org.eclipse.osgi/222/.cp/lib”).
If openHAB is running on a headless raspberry, one should copy the .jar and the the .rrd file to another system that has Java installed.

Having both (the .jar and the .rrd) in the same directory the rrdInspector is started on the console with (on a windows system the console has to be started as Adminstrator!):

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

Select your .rrd file and open the Archive for editing.
Change all false values by selecting the value under the “Archive Data” tab. Finding the values is easy since DateTime is given in a readable format.
Close the inspector.
Copy the changed .rrd back to your openHAB system and restart openHAB.

[Edit:] The actually used rrd4j*.jar (atm version 3.1.1) doesn’t include the RrdInspector anymore, trying to start it as posted above would give this message: Fehler: Hauptklasse org.rrd4j.inspector.RrdInspector konnte nicht gefunden oder geladen werden (in english: Error: the main class org.rrd4j.inspector.RrdInspector could not be found or loaded).
Solution: Use Google to find a rrd4j*.jar including the rrdInspector (I used this)


I was not able to open my openhab2 rrdfile with (Nullpointer)

Used the 3.3.1 inspector from here:


and now with OH 3.2.0 and rrd4j Version 3.4 you must use this:

1 Like

When I start the inspector and try to open an .rrd file from OH3, I am getting a “No valid RRD file specified” message. I have tried with multiple versions of the inspector (3.2, 3,4, etc…) and I always get the same message.
Java 17.0.2 SDK on macOS Catalina.
What am I doing wrong ?

I’d use the same java- version as your openhAB is running on.

Good point, just tried it.
Running 11.0.13 on the Openhab Synology virtual machine, I removed the Java 17 SDK and installed the 11.0.14 sdk on my Mac (can’t find the 11.0.13).
I stopped the OpenHab service, copied a temperature .rrd file, and opened the 3.4 and 3.2 inspectors but no luck, same message…

I managed to switch to the 11.0.13 jdk and ran from the terminal. When I open the .rrd file, I get this:

Philippe-Eth Downloads % java -cp rrd4j-3.4-inspector.jar org.rrd4j.inspector.RrdInspector
Exception in thread “AWT-EventQueue-0” java.lang.NoClassDefFoundError: org/rrd4j/core/RrdDb
at org.rrd4j.inspector.MainTreeModel.setFile(
at org.rrd4j.inspector.InspectorModel.setFile(
at org.rrd4j.inspector.RrdInspector.loadFile(
at org.rrd4j.inspector.RrdInspector.selectFile(
at org.rrd4j.inspector.RrdInspector.access$100(
at org.rrd4j.inspector.RrdInspector$2.actionPerformed(
at java.desktop/javax.swing.AbstractButton.fireActionPerformed(
at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(
at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(
at java.desktop/javax.swing.DefaultButtonModel.setPressed(
at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(
at java.desktop/java.awt.Component.processMouseEvent(
at java.desktop/javax.swing.JComponent.processMouseEvent(
at java.desktop/java.awt.Component.processEvent(
at java.desktop/java.awt.Container.processEvent(
at java.desktop/java.awt.Component.dispatchEventImpl(
at java.desktop/java.awt.Container.dispatchEventImpl(
at java.desktop/java.awt.Component.dispatchEvent(
at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(
at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(
at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(
at java.desktop/java.awt.Container.dispatchEventImpl(
at java.desktop/java.awt.Window.dispatchEventImpl(
at java.desktop/java.awt.Component.dispatchEvent(
at java.desktop/java.awt.EventQueue.dispatchEventImpl(
at java.desktop/java.awt.EventQueue$
at java.desktop/java.awt.EventQueue$
at java.base/ Method)
at java.base/$JavaSecurityAccessImpl.doIntersectionPrivilege(
at java.base/$JavaSecurityAccessImpl.doIntersectionPrivilege(
at java.desktop/java.awt.EventQueue$
at java.desktop/java.awt.EventQueue$
at java.base/ Method)
at java.base/$JavaSecurityAccessImpl.doIntersectionPrivilege(
at java.desktop/java.awt.EventQueue.dispatchEvent(
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(
at java.desktop/java.awt.EventDispatchThread.pumpEvents(
at java.desktop/java.awt.EventDispatchThread.pumpEvents(
at java.desktop/
Caused by: java.lang.ClassNotFoundException: org.rrd4j.core.RrdDb
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(
at java.base/java.lang.ClassLoader.loadClass(
… 41 more

I did hit the same wall (although I only got the NoClassDefFounderror). Reading here did help. I ADDED the


(without the inspector) to the directory and then the file was opened.

Man, it worked ! Many thanks for the insight…