Hi,
i used openhabian-config to install Grafana and influxDB to openhabian 1.5. (raspb.3)
Sadly i forgot that i had my old influxdb.cfg lying around.
After the installation from oh-config i got this message:
the process ended with
Connection Grafana to InfluxDB...{"datasource":{"id":1,"orgId":1,"name":"openhab_home","type":"influxdb","typeLogoUrl":"","access":"proxy","url":"http://localhost:8086","password":"xxxxxx","user":"grafana","database":"openhab_db","basicAuth":true,"basicAuthUser":"grafana","basicAuthPassword":"xxxxxxxx","withCredentials":false,"isDefault":false,"jsonData":{},"secureJsonFields":{},"version":1,"readOnly":false},"id":1,"message":"Datasource added","name":"openhab_home"}Adding openHAB dashboard tile for Grafana... 2019-12-03_04:05:46_CET [openHABian] Adding an openHAB dashboard tile for 'grafana'... OK
Adding install InfluxDB with database configuration to openHAB
$ touch /etc/openhab2/services/influxdb.cfg
2019-12-03_04:07:42_CET [openHABian] Checking for default openHABian username:password combination... OK
2019-12-03_04:07:42_CET [openHABian] We hope you got what you came for! See you again soon ;)
i’ve seen the changes made to my influxdb.cfg and corrected them,
(the new config got added at the bottom of the .cfg file and i deleted my old stuff above)
now my .cfg looks like this:
url=http://localhost:8086
user=openhab
password=xxxxxxxx
db=openhab_db
retentionPolicy=autogen
i then stopped OH and cleaned the cache and rebooted.
sudo systemctl status influxdb
InfluxDB seems to run and grafana is also working on http://openhab:3000/
i then followed these steps
[04:12:15] openhabian@openhab:~$ sudo chown -hR openhab:openhab /etc/openhab2
[04:18:54] openhabian@openhab:~$ sudo chown openhab:openhabian /etc/openhab2/services/influxdb.cfg
[04:19:35] openhabian@openhab:~$ influx -port 8086 -username admin -password xxxx -host localhost
Connected to http://localhost:8086 version 1.7.9
InfluxDB shell version: 1.7.9
> CREATE DATABASE openhab_db
ERR: error authorizing query: create admin user first or disable authentication
Warning: It is possible this error is due to not setting a database.
Please set a database with the command "use <database>".
> use openhab_db
WARN: error authorizing query: create admin user first or disable authentication
Using database openhab_db
> CREATE USER admin WITH PASSWORD 'xxxxxxx' WITH ALL PRIVILEGES
> CREATE USER openhab WITH PASSWORD 'xxxxxxx'
> CREATE USER grafana WITH PASSWORD 'xxxxxx'
> CREATE DATABASE openhab_db
> GRANT ALL ON openhab_db TO openhab
> GRANT READ ON openhab_db TO grafana
> use openhab_db
Using database openhab_db
but i dont get any data so far.
could someone help me to get some data pls ?
how can i check if its correctly running ?
thank you!
Additional Screenshots: