I use rrd4j to log certain number items and I configured them to use the everyMinute strategy. Here is an extract of my rrd4j.persist:
// for rrd charts, we need a cron strategy
everyMinute : “0 * * * * ?”
WZ_Innr_POWER : strategy = everyMinute
However, if I query the persistence layer in order to get a json with the logged values via
I only get a json with an entry every four minutes, thus resulting in 360 entries for 24h instead of 1440 entries which I would assume:
I didn’t configured anything in the services/rrd4j.cfg so it still looks like this:
# please note that currently the first archive in each RRD defines the consolidation
# function (e.g. AVERAGE) used by OpenHAB, thus only one consolidation function is
# fully supported
# default_numeric and default_other are internally defined defnames and are used as
# defaults when no other defname applies
#<defname>.items=<list of items for this defname>
Do you have an idea what is going wrong here? What do I need to change in order to get minute-wise logs?
@opus, what are the default settings of rrd4j?
I have the same result as the OP
Even the last events:
When using the REST call without any time setting the data for the last 2r hours are fetched. Using the default setup this timeframe is NOT covered in the archive 1, which is the only one keeping values for every minute.
Please look into this Thread
In other words, do a REST call which covers no more then the LAST 8 hours and you will see the minute values.
Can you tell me what I need to do in order to cover 24 hours with 1 minute resolution?
Would this work?
The first archive does do that, however the second does cover 24 hours as well. I’d delete it and keep the following ( if you want to keep values for longer then 24 houres).
When changing the archives I think you need to stop openhab, de,ete the old .rrd files and start again.
This is my archive setting for values by day, week, month and year.
Is it sufficient to only set the .archives in the rrd4j.cfg or do I need to define the .def and .items as well in this file?
Edit: yes, they seem to be necessary. Now, I don’t understand what the config in rrd4j.persist is necessary for. The documentation of this service isn’t that good.
I have that on my personell todo list. It moved up now.
Done the change, lets see when (and if) it gets merged.
[Edit] If your problem is solved, please mark this thread as solved by selecting the checkmark (icon on the lower boundary of each post) on the answer that holds the solution.