[SOLVED] Issue with rrd4j persistence + graph

Hi folks,

I’ve a strange issue with rrd4j. I see only the last value, via REST API I see datapoints “1” with the latest value. Any time the value of the item changes, it changes also there, but I can see always the latest one.

What should be the problem?

here my persist:

// Configuration file for "rrd4j" persistence module
Strategies {

	everyMinute	: "0 * * * * ?"
	everyHour 	: "0 0 * * * ?"
	everyDay	: "0 0 0 * * ?"
	default = everyChange


 * Each line in this section defines for which item(s) which strategy(ies) should be applied.
 * You can list single items, use "*" for all items or "groupitem*" for all members of a group
 * item (excl. the group item itself).

Items {
	gChart* : strategy =  everyMinute

thanks for the support


Sorry, Andrea but your question is not very clear.
Can you post your REST query and reply?

1 Like
curl -X GET --header "Accept: application/json" ""


  "name": "Netatmo_Outdoor_Temperature",
  "datapoints": "1",
  "data": [
      "time": 1547312151239,
      "state": "6.900000095367431640625"

what I mean is: the value in state is changing, the number of datapoints is always 1, and I see in my charts a beautiful horizontal line with just one value :slight_smile:

Now the REPLY is

  "name": "Netatmo_Outdoor_Temperature",
  "datapoints": "1",
  "data": [
      "time": 1547312758792,
      "state": "6.19999980926513671875"

state and time are changed … but …

Do you have a custom rrd4j.cfg? If yes, please post.

Did you do any changes on your rrd4j setup without restarting?

BTW: You are living in a hot surrounding!:wink:

eheheh, now is 4 C :slight_smile: but yes, Italy is not so cold these days.

Just restarted, but nothing happened. My rrd4j.cfg is default (all commented out)

edit: my persist strategy now is:

gChart* : strategy =  everyChange, everyMinute

You are persisting a Group (gChart), does the “Netatmo_Outdoor_Temperature” belong to that group?
Do all members of that group show the same behaviour?

… and I’m hoping that it is getting a bit warmer from tuesday to thursday. Going to stay near Catania then.

Good for you, Catania is beautiful. Unfortunately, Milan here :frowning:

“Netatmo_Outdoor_Temperature” is part of gChart.

And all member of that group (in facts, all items I would like to see in my rrd4j graphs, not only temps … but all numbers of course) have same issue

just to give you all details:

Number Netatmo_Outdoor_Temperature "Temperature [%.1f °C]" (gOutdoor, gWeather, gChart, gHistory)

gHistory is the group managed by another persistence (influxdb), working perfectly

by default, I use mapdb (restoreonstartup)

That really sounds strange!

As a wild guess, you could try this request in the browser:

That would look for older values and definitly for the rrd4j database.
While writing it ocured to me that you might have mapdb as the default persistence service. Omitting the persistence service in a REST call and in the chart setup will always call the default persistence service!




Aaahhhhh … OK

so I see mapdb via REST

That’s it!
To change either set rrd4j as the default persistence service or set rrd4j explicitly in each chart line.


Nice one young man

1 Like

that was the issue :slight_smile:

thanks @opus


You can also specify which persistence service to use in the chart elements in the sitemap:https://www.openhab.org/docs/configuration/sitemaps.html#element-type-chart

exactly what I did … and it works :slight_smile:


Just in other words.:wink:

Tes, of course, I read it differently.
I was thinking about the persistence methods here: https://www.openhab.org/docs/configuration/persistence.html#persistence-extensions-in-scripts-and-rules