Rrd4j persists only few data

I tried to setup rrd4j to persist my sensor data and use this data for charts. In general it works, but rrd4j seems to record data only for 1,5 days (the chats show only 1.5 days of data).

My config in openhab.conf is:

How I understood the documentation:
a) “rrd4j:tpTemp.def=GAUGE,900,U,U,10” takes a value every 10sec.
b) “AVERAGE,0.5,6,600” takes 6 consecutive values from a) (=> 1min), averages them and stores 600 of these average values, => 10hrs with 1min resolution
c) “AVERAGE,0.5,5,480” takes 5 consecutive values from b), average, store 480 => 40 hrs with 5min resolution
d) “AVERAGE,0.5,3,960” takes 3 … => 10 days with 15min resolution
e) …

=> There must be enough data for a 1 week chart, but I get only round about 1.5 days.

Is my understanding of the rrd4j configuration correct?

Why does the chart show only 1.5 days of data?


Hello I think you need to post the sitemap code used to generate the plot as well as the persistence file contents that would make it easier to help you

I think you did misinterpreted the .Archive settings. Each archive is declared by its own. The second does not persist the x values of the first archive, it works on the same data as the first archive.
In other words “AVERAGE,0.5,5,480” persists a period of 510 seconds 480!
As of my calculation you can not have data for 1.5 days since the maximum period is 2*10 seconds *3650. Which is something like 20 h 20’’.

Text label=“Wohnzimmer Temperatur” icon=“temperature”{
Chart item=nH1WzTemp label=“Wohnzimmer 12h” period=12h refresh=60000
Chart item=nH1WzTemp label=“Wohnzimmer Tag” period=D refresh=60000
Chart item=nH1WzTemp label=“Wohnzimmer Woche” period=W refresh=60000
Chart item=nH1WzTemp label=“Wohnzimmer Monat” period=M refresh=60000
Strategies {
everyMinute : "0 * * * * ?"
sec10: “0,10,20,30,40,50 * * * * ?”

Items {

gHaus1* , gHaus2* : strategy = sec10, restoreOnStartup


That’s weird. The chart posted is obviously for a week, however the longest period for rrd4j persistence is in the last Archive with 20 houres 20 minutes. If that are all archives I’m out of ideas.

Did some more reading (https:// github.com/rrd4j/wiki/AboutRRD4J).
Still can’take figure out why you get more then 20 h 20 minutes of data displayed.
However, your understanding of the archives was incorrect as stated above.

Thank’s for your input, I read the docu again and found a solution for my problem. I defined special items that belong to the time intervals (day, week, month, year) with the appropriate resolution and make the charts out of it, now it seems to work well.

Your welcome!
If I understand correctly, you used several items in order to store for different intervals, correct?
I think that is not needed, I use one Item for different archives.
My rrd4j.cfg looks like:


That gives me 3 different intervalls ( 1 Day with every minute, 7 days with every 5 minutes and 28 days with every 15 minutes)