Why is influxdb storing no data


my influx db is storing nothing. I have created a influxdb.persist with this:
Strategies {
everyMinute : “0 * * * * ?”
everyHour : “0 0 * * * ?”
everyDay : “0 0 0 * * ?”
default = everyChange

Items {
*: strategy = everyChange, restoreOnStartup

But nothin is stored. Where is the problem?

Btw: How is it possible to check if there is data inside the db ? I have checked it with:
sudo du -sh /var/lib/influxdb/
but there is always only 35mb

Checking if there is storec data can be done using the API Explorer. By specifying the persistence service, the item name and the desired timeframe you it will show what openHAB can get from that service.

The only difference to my .persist file ( in my case rrd4j) is your missing space after the “*”.

The next time you post file contents please use the code tags, that way your post gets better readable.

1 Like

hmm looks like it was the missing “space” …


nope … it wasnt the problem … if i unplug the power cable from raspberry all the data is lost.
How is this possible? Though the data was written to a database …

The persisting service is the best joke i have ever seen.

without zram its running fine!
But when the influx.persist file is saying that the measures are saved or persist on every change … why are the data is not written to disk (if zram is enabled and installed)

ZRAM stores data in RAM to reduce writes (and wear) on your SD card. If you pull the plug while the Raspberry Pi is running, then that data won’t be saved to the SD since you didn’t execute a controlled shutdown. Cutting power to an RPi can also damage your SD card. If you’ve been doing that a lot, then you may have trouble with your system sooner than later.

I see that this was discussed in another thread that you started. The answer remains the same: protect your system with a UPS.

1 Like

yes thanks. Found some intressting thread.
Answers exactly my problem:

It is not possible to prevent the openhab system to all failures. So in fact it can happen that the system interrupts. (btw.: its happen to me). So with ZRAM enabled the data is always lost because it isnt a clean reboot/shutdown. Thats really bad. I though like the other thread creator that zram stores the data from time to time on the disk and not always in ram.

Now i didnt use zram and save the data not on every change.