Setup influxdb and grafana

Hi,

I’m having troubles setting up influx db. I red threw the documentation and some posts but that did not help.

I installed influxdb with the hassio add-on manager. I changed nothing in the influx config.

I added “influxdb:” to my configuration.yaml file. No host, because the documantation says localhost is default.
I tried other hostnames. Local Ip etc.
Maybe I should mention that I have duckdns and letsencrypt running, because of httpS.

I added a database to chronograph called “home_assistant”.

I restartet HA, but no data gets transferred to influxdb. Also I get a invalid config message within the HA gui

I’d really like to see my data in grafana. But don’t get over the first step “influxdb”. Hope someone can help.

Errors:
Setup failed for influxdb: Component failed to initialize.
Database host is not accessible due to '401: {“error”:“authorization failed”}
', please check your entries in the configuration file (host, port, etc.) and verify that the database exists and is READ/WRITE

Did you follow this guide? Complete guide on setting up Grafana/InfluxDB with Home assistant using official Docker images

1 Like

@h4nc Please read the add-on documentation, since it provides step-by-step setup instructions:

https://github.com/hassio-addons/addon-influxdb#integrating-into-home-assistant

3 Likes

I’ve tried these steps, step-by-step, and still keep getting the Database host is not accessible due to '401: {“error”:“authorization failed”} error.

Here’s my entry for it in my configuration:
influxdb: host: a0d7b954-influxdb port: 8086 database: *redacted* username: *redacted* password: <*redacted*> max_retries: 3 default_measurement: state

I suspect it’s the brackets around my password, but what have I done wrong here?

Did you find the problem? I just set this up for the first time and got the same error. My problem turned out to be in Influx. When I create my database user in Influx I needed to set the permissions to “all” for that user and it fixed that error. I

Wow, it took me a while to stumble on this. How is this not part of the hassio documentation at https://www.home-assistant.io/integrations/influxdb/

Hi do not know if this is the right way to go - but I figured it might be better to hi-jack this post than posting a new one. Please let me know if I should do it the other way around.

I tried to follow this Frenck video to install influxdb and Grafana (https://www.youtube.com/watch?v=m9qIqq104as). I just want the HA data from my z-wave devices to flow to a db and be able to visualize / analyze.

In influxdb, I have created a db and two users, both with ALL permissions.

In Grafana, I have created a datasource and connected it with the influxdb database. On pressing Save & Test, I get: “Data source is working”. SSL is disabled.

I added this to the configuration.yaml

influxdb:
host: a0d7b954-influxdb
port: 8086
database: homeassistantdb
username: HAuser
password: mycorrectpw
max_retries: 3
default_measurement: state

But, there is no data flowing to influxdb from HA. Under the Explore tab, I see nothing under Measurements and Tags. And, it just says No Database selected.

Then, in the Developer Tools → Logs, I see notice this one:

Log Details (WARNING)

Logger: homeassistant.components.influxdb
Source: components/influxdb/init.py:180
Integration: InfluxDB (documentation, issues)
First occurred: June 2, 2020, 8:25:17 PM (3872 occurrences)
Last logged: 2:00:48 PM

Database host is not accessible due to '401: {“error”:“authorization failed”} ', please check your entries in the configuration file (host, port, etc.) and verify that the database exists and is READ/WRITE. Retrying again in 60 seconds.

The database host is not accessible?

Any ideas?