Trying desperately to get to grips with persistence on OH, I’ve got mapdb now set up for my restoreonstartup but I’m now trying to install influxdb and grafana for previous states and some graphs etc.
So, I have openhabian on Rasp Pi 3, I’ve gone into the config file and seen that influx and Grafana are listed as options in the optional components section. I’ve clicked on it and follwoed the instructions to install them.
So far so good, I then go to follow the instructions on: here and, quite frankly, don’t get very far!
I type in influx and get the response that it is connected to the influx install but when I go to create the database as shown, I get the following error…
I wondered if the openhabian install already added the db so tried the use command as noted in the error, but no joy there…anyone else had any similar issues / got any ideas?
It was only as a test to see if I could get this to work, it said about the authentication faiing so I though I’d just try it as ‘the boss’…it’s not my common practise…
Didn’t work, I tried it with both admin and user options but got the same
ERR: unable to parse authentication credentials etc…
I have been googling around and there seems to be a few posts regarding influxdb / grafana not installing properly on openhabian via their config method but none seem to address my problem so I’m not sure whether to start again totally or i it’s all ok just a simple case of finding the correct method to log in…
{: #passwords}
User password needed for SSH or sudo (e.g. "openhabian:openhabian")
Samba share password (e.g. "openhabian:openhabian")
openHAB remote console (e.g. "openhab:habopen")
Amanda backup password (no default, applied when installing)
Nginx reverse proxy login (no default, applied when installing) For manual configuration see here.
InfluxDB (No password set by default)
Grafana visualization ("admin:admin")
Yes the install says something like ‘setting up user admin, please provide a password’, once entered the next screen then says, ‘setting up user openhab, please provide a password’
I’ve reinstalled it a few times to see if different passwords make a difference, the latest test was admin / admin and openhab / openhab
I have looked through the influx docs to see if there is something I’ve missed, the issue is it seems openhabian does most of the initial steps and create the users but I can’t seem to use them…
sudo nano /etc/influxdb/influxdb.conf
in the file under http you find:
auth-enabled = true
change this to false
Did that, and then when I just typed in $ influx it went in and I could follow the instructions:
CREATE DATABASE openhab_db
CREATE USER myusername WITH PASSWORD 'mypassword' WITH ALL PRIVILEGES
CREATE USER openhab WITH PASSWORD 'myopenhabpassword'
CREATE USER grafana WITH PASSWORD 'mygrafanapassword'
GRANT ALL ON openhab_db TO openhab
GRANT READ ON openhab_db TO grafana
The only thing that failed was the create user admin as there it said there is already an admin username.
My worry is that it hasn’t quite worked as I was expecting to be challenged with a username / password next time I tried to go to $influx but it just goes straight in…maybe I need to change the auth-enabled back to true now?
I’m now trying to set up grafana so I can see if the influx_db is working but when I go to openhabianpi:3000 and try to log in with the apparently default admin:admin username and password I get ‘invalid username or password’. I’ve tried all other ones I can think of and also purged grafana and reinstalled it from command line to see if that helps but no joy…