InfluxDB persistence not working

service
influxdb
opehab2
Tags: #<Tag:0x00007f21283a0c00> #<Tag:0x00007f21283a0ac0> #<Tag:0x00007f21283a0980>

(Maciek) #1

I am trying to use persistence with InfluxDB service. I am running latest raspbian, and have installed everything following this guide influxdb-grafana-persistence-and-graphing. The only change I did, is to edit the strategy file:

Strategies {
    everyMinute : "0 * * * * ?"
    everyHour   : "0 0 * * * ?"
    everyDay    : "0 0 0 * * ?"
}

Items {
    LuminositySensor : strategy = everyChange, everyMinute
}

I have also installed InfluxDB (v 1.0) Persistence via PaperUI add-ons menu (after doing that, my services and persistence folders did not have config files in them, I had to create them manually).

Now, I am looking through logs tail -f /var/log/openhab2/openhab.log -f /var/log/openhab2/events.log, but I can’t see anything related to influxDB, but I can see action on my sensor though - 2017-10-29 18:15:56.200 [ItemStateChangedEvent ] - LuminositySensor changed from 0.00 to 30.83.

How can I debug this further?

Edit: Turns out, while PaperUI was showing influx as installed, in fact in openhab log there was an error during installation related to permissions. This link has solved my issue: https://community.openhab.org/t/openhab2-failed-installing-rrd4j-permission-denied/21712/2


(Alpoy) #2

(Dominique) #3

I don’t see anything related to influxDB in events.log either, so that’s certainly normal behaviour.

First try the following commands:

$ influx -username <admin_username> -password <admin_password> -host localhost

(or simply “influx” if you have not set authentification). And then

> USE openhab_db 

(replace openhab_db with your actual database name)

> SHOW series

Does it show LuminositySensor?


(Maciek) #4

Turns out, while PaperUI was showing influx as installed, in fact in openhab log there was an error during installation related to permissions. This link has solved my issue: OpenHAB2 - Failed installing rrd4j: Permission Denied


(Maciek) #5

Thanks. While this was not the cause of my problem, it will help me greatly with debugging my data.