Home Assistant Community Add-on: InfluxDB

This add-on will run influxdb on your Home Assistant OS. You could also run influxdb on another server machine somewhere. In that case you don’t need this add-on and can just install influxdb on the other server using influxdb’s own installation instructions.

In any case, you need to put the influxdb integration in configuration.yaml in order to send data from Home Assistant to influxdb.

The database should be created by influxdb itself (whether it is running in the add-on or on it’s own somewhere).

I have not used influxdb myself though so take this with a grain of salt.

Got it.
So basically, the add on does the (linux) installation, but the activation / configuration is up to the HA admin.
Thank you!

1 Like

Hi all,

Anyone know how i can enable RPC service in influxdb addon? i have HAOS with some addons, one of them is influxdb.
I’m trying making a remote database backup, but connection is refused because rpc port is closed.

Regards!

I am noticing my influx add on is in a continuous crash and restart cycle. Logs set to debug I see the entries below. Also, when in influx web ui I will routinely see pink popup saying influxdb is not running running.

I have attempted to change local host to the home assistant (linux VM on UNRAID) IP address to no avail.

image

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/00-banner.sh
-----------------------------------------------------------
 Add-on: InfluxDB
 Scalable datastore for metrics, events, and real-time analytics
-----------------------------------------------------------
 Add-on version: 4.5.0
 You are running the latest version of this add-on.
 System: Home Assistant OS 9.4  (amd64 / qemux86-64)
 Home Assistant Core: 2022.12.6
 Home Assistant Supervisor: 2022.11.2
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
cont-init: info: /etc/cont-init.d/00-banner.sh exited 0
cont-init: info: running /etc/cont-init.d/01-log-level.sh
Log level is set to DEBUG
cont-init: info: /etc/cont-init.d/01-log-level.sh exited 0
cont-init: info: running /etc/cont-init.d/02-set-timezone.sh
[09:33:43] INFO: Configuring timezone
cont-init: info: /etc/cont-init.d/02-set-timezone.sh exited 0
cont-init: info: running /etc/cont-init.d/create-users.sh
cont-init: info: /etc/cont-init.d/create-users.sh exited 0
cont-init: info: running /etc/cont-init.d/influxdb.sh
cont-init: info: /etc/cont-init.d/influxdb.sh exited 0
cont-init: info: running /etc/cont-init.d/kapacitor.sh
cont-init: info: /etc/cont-init.d/kapacitor.sh exited 0
cont-init: info: running /etc/cont-init.d/nginx.sh
[09:33:43] DEBUG: Requested API resource: http://supervisor/dns/info
[09:33:43] DEBUG: Request method: GET
[09:33:43] DEBUG: Request data: {}
[09:33:43] DEBUG: API HTTP Response code: 200
[09:33:43] DEBUG: API Response: {"result": "ok", "data": {"version": "2022.04.1", "version_latest": "2022.04.1", "update_available": false, "host": "172.30.32.3", "servers": [], "locals": ["dns://192.168.1.1"], "mdns": true, "llmnr": true, "fallback": true}}
cont-init: info: /etc/cont-init.d/nginx.sh exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun chronograf (no readiness notification)
services-up: info: copying legacy longrun influxdb (no readiness notification)
services-up: info: copying legacy longrun kapacitor (no readiness notification)
services-up: info: copying legacy longrun nginx (no readiness notification)
s6-rc: info: service legacy-services successfully started
[09:33:43] INFO: Kapacitor is waiting until InfluxDB is available...
[09:33:43] INFO: Chronograf is waiting until InfluxDB is available...
[09:33:43] INFO: Starting the InfluxDB...
[09:33:59] INFO: Starting Chronograf...
[09:33:59] INFO: Starting the Kapacitor
'##:::'##::::'###::::'########:::::'###:::::'######::'####:'########::'#######::'########::
 ##::'##::::'## ##::: ##.... ##:::'## ##:::'##... ##:. ##::... ##..::'##.... ##: ##.... ##:
 ##:'##::::'##:. ##:: ##:::: ##::'##:. ##:: ##:::..::: ##::::: ##:::: ##:::: ##: ##:::: ##:
 #####::::'##:::. ##: ########::'##:::. ##: ##:::::::: ##::::: ##:::: ##:::: ##: ########::
 ##. ##::: #########: ##.....::: #########: ##:::::::: ##::::: ##:::: ##:::: ##: ##.. ##:::
 ##:. ##:: ##.... ##: ##:::::::: ##.... ##: ##::: ##:: ##::::: ##:::: ##:::: ##: ##::. ##::
 ##::. ##: ##:::: ##: ##:::::::: ##:::: ##:. ######::'####:::: ##::::. #######:: ##:::. ##:
..::::..::..:::::..::..:::::::::..:::::..:::......:::....:::::..::::::.......:::..:::::..::
2022/12/16 09:33:59 Using configuration at: /etc/kapacitor/kapacitor.conf
[09:34:09] INFO: InfluxDB stopped, restarting...
[09:34:10] INFO: Starting the InfluxDB...
time="2022-12-16T09:34:14-05:00" level=info msg="Reporting usage stats" component=usage freq=24h reporting_addr="https://usage.influxdata.com" stats="os,arch,version,cluster_id,uptime"
time="2022-12-16T09:34:14-05:00" level=info msg="Serving chronograf at http://127.0.0.1:8889" component=server
[09:34:14] INFO: Starting NGINX...
time="2022-12-16T09:34:20-05:00" level=debug msg=Request component=server method=GET remote_addr="127.0.0.1:54572" url=/api/hassio_ingress/jr3n9Y43gGgPb3XEnsM7_35wVwPT9RBZoPOnc52dBhc/chronograf/v1/me
time="2022-12-16T09:34:20-05:00" level=info msg="Response: OK" component=server method=GET remote_addr="127.0.0.1:54572" response_time="408.489µs" status=200
time="2022-12-16T09:34:31-05:00" level=debug msg=Request component=server method=GET remote_addr="127.0.0.1:43836" url=/api/hassio_ingress/jr3n9Y43gGgPb3XEnsM7_35wVwPT9RBZoPOnc52dBhc/chronograf/v1/me
time="2022-12-16T09:34:31-05:00" level=info msg="Response: OK" component=server method=GET remote_addr="127.0.0.1:43836" response_time=1.850602ms status=200
[09:34:35] INFO: InfluxDB stopped, restarting...
[09:34:35] INFO: Starting the InfluxDB...
time="2022-12-16T09:34:42-05:00" level=debug msg=Request component=server method=GET remote_addr="127.0.0.1:44554" url=/api/hassio_ingress/jr3n9Y43gGgPb3XEnsM7_35wVwPT9RBZoPOnc52dBhc/chronograf/v1/me
time="2022-12-16T09:34:42-05:00" level=info msg="Response: OK" component=server method=GET remote_addr="127.0.0.1:44554" response_time=2.820991ms status=200
time="2022-12-16T09:34:53-05:00" level=debug msg=Request component=server method=GET remote_addr="127.0.0.1:49644" url=/api/hassio_ingress/jr3n9Y43gGgPb3XEnsM7_35wVwPT9RBZoPOnc52dBhc/chronograf/v1/me
time="2022-12-16T09:34:53-05:00" level=info msg="Response: OK" component=server method=GET remote_addr="127.0.0.1:49644" response_time="502.598µs" status=200
[09:34:57] INFO: InfluxDB stopped, restarting...
[09:34:57] INFO: Starting the InfluxDB...
ts=2022-12-16T09:34:59.454-05:00 lvl=error msg="failed to connect to InfluxDB, retrying..." service=influxdb cluster=default err="Get \"http://localhost:8086/ping\": dial tcp 127.0.0.1:8086: connect: connection refused"
ts=2022-12-16T09:34:59.860-05:00 lvl=error msg="failed to connect to InfluxDB, retrying..." service=influxdb cluster=default err="Get \"http://localhost:8086/ping\": dial tcp 127.0.0.1:8086: connect: connection refused"
ts=2022-12-16T09:35:00.450-05:00 lvl=error msg="failed to connect to InfluxDB, retrying..." service=influxdb cluster=default err="Get \"http://localhost:8086/ping\": dial tcp 127.0.0.1:8086: connect: connection refused"
ts=2022-12-16T09:35:02.003-05:00 lvl=error msg="failed to connect to InfluxDB, retrying..." service=influxdb cluster=default err="Get \"http://localhost:8086/ping\": dial tcp 127.0.0.1:8086: connect: connection refused"
ts=2022-12-16T09:35:03.135-05:00 lvl=error msg="failed to connect to InfluxDB, retrying..." service=influxdb cluster=default err="Get \"http://localhost:8086/ping\": dial tcp 127.0.0.1:8086: connect: connection refused"
time="2022-12-16T09:35:04-05:00" level=debug msg=Request component=server method=GET remote_addr="127.0.0.1:38726" url=/api/hassio_ingress/jr3n9Y43gGgPb3XEnsM7_35wVwPT9RBZoPOnc52dBhc/chronograf/v1/me
time="2022-12-16T09:35:04-05:00" level=info msg="Response: OK" component=server method=GET remote_addr="127.0.0.1:38726" response_time=2.397502ms status=200
ts=2022-12-16T09:35:04.865-05:00 lvl=error msg="failed to connect to InfluxDB, retrying..." service=influxdb cluster=default err="Get \"http://localhost:8086/ping\": dial tcp 127.0.0.1:8086: connect: connection refused"

I’m having problems with database entries. After some time HA stops writing and the log shows this error

Logger: root
Source: components/influxdb/init.py:437
First occurred: 22:00:19 (1 occurrences)
Last logged: 22:00:19

Is there any rate limitating happening within the Influxdb addon?

I have a sensor sending an mqtt message every 5 seconds which I can see being received correctly in mqtt explorer and the HA mqtt integration. However when I use explore in influxdb I only see data shown in the database every 30 seconds. I have displayed this as a table so I can see this being updated in real time but this shows I am loosing 5 sensor values out of 6

Is this a limitation of influxdb on HA or am I missing something obvious?

newbie question. is there a way to send data to the Influx add-on database from outside of home assistant supervised system? I have unpoller setup on another device but can’t figure out the address on my lan of the influx db. is this even possible?

I guess if not i can move influx to the other host also, and then HA can send its data to that. that is a bit of a rebuild of graphana and my dashboards i was hoping to avoid. tia.

look at zerotier. if your remote sensor can install the zerotier package this maybe an option. HA supports zerotier and it is the easiest vpn solution i have ever used.

Can anyone help with high CPU usage for InfluxDB here? I posted an issue in the GitHub page (Sudden high CPU load · Issue #265 · hassio-addons/addon-influxdb · GitHub), but no one seems to be there.

In short, I suddenly see high CPU usage (~60 % on a RPi4) with InfluxDB. If I disable InfluxDB the CPU usage drops to 2-3 %.

I already tried some of the other posts about this (adding “store-enabled = false” to the config file etc.) to no avail.

Can someone point me in the right direction for debugging this?

Thanks.

Is the InfluxDB add-on, version 4.5.0, still maintained and supported? I’d rather stay away and not get hooked if it isn’t.

Screenshot 2023-02-07 145926

I am trying to get started on influxDB.

I have installed the add-on and can access the web-UI. However there is nothing there apart from the connection status.

Following this:

It says create a database:
“You will still need to create a database named home_assistant via InfluxDB’s command-line interface. For instructions on how to create a database check the InfluxDB documentation relevant to the version you have installed.”

That link doesn’t work however the documentation says to go to the influx CLI.

Can I no create a database from within HA?

Followed this video by @frenck . I reach the step where I connect Glances database to Grafana.
I keep getting this error.

This is the error in error connecting influxDB influxQL
What am I doing wrong?

Home Assistant 2023.2.4
Supervisor 2023.01.1
Operating System 9.5
Frontend 20230202.0 - latest
Glances Current version: 0.17.2.
Influxdb Current version: 8.1.0
Grafana Current version: 8.1.0

Update: database and info proccessing options were disabled under the addon config.
** working now!!!**

Hi, how did you enable the options? I can’t find it.

My Grafana that was working since ever started to show no data…

Actually I just noticed the same thing. Is it relevant to install an add-on no longer maintained since 2021?

If i delete the whole integration, is there then no data left behind?

Where does it store the data?

possibly not the right place to ask, so sorry for that. i am trying to get the second (or n-th) value of the day for a certain measurement and i really can’t figure out how. first/last are quite obvious, using the built-in functions. thank you for any suggestions.

Like @Cococabana above, I wanted to move from the internal 1.x version to an external 2.7 on a Synology NAS (in Docker). Because v1 and v2 handle the data in different ways, there does not appear to be a beginner friendly way of transferring the data, so I just cut my losses and went for the new install and stopped collecting the data internally.

My InfluxDB database takes up more than half my backups, so I wanted to find an alternative storage.

What I would really like is a way to use the add-on, but store the data on my NAS. Is that possible?
(I’m not holding my breath - and sadly this thread is more questions than solutions these days.)

My InfluxDB and Grafana addons keep crashing recently. The logs show the exact same error message:

s6-rc: warning: unable to start service base-addon-timezone: command exited 2

However the base-addon-timezone seems to be working for all other addons in my installation.

Except for updates I’m not aware that I’ve changed anything recently.

Things I tried without success:

  • rebooting
  • increasing the VM’s RAM to 3 GB
  • removing the InfluxDB addon and re-installed it from scratch
  • setting logging to debug

Do you have any advice on how to access the in-contailer logging mentioned in the error message. I could not figure out how to access those for a crashing container…

The full logs are:

Add-on: InfluxDB
 Scalable datastore for metrics, events, and real-time analytics
-----------------------------------------------------------
 Add-on version: 4.7.0
 You are running the latest version of this add-on.
 System: Home Assistant OS 10.2  (amd64 / qemux86-64)
 Home Assistant Core: 2023.6.2
 Home Assistant Supervisor: 2023.06.2
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-timezone: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
[17:19:06] INFO: Configuring timezone (Europe/Berlin)...
s6-rc: info: service base-addon-log-level successfully started
s6-rc: warning: unable to start service base-addon-timezone: command exited 2
/run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information.
/run/s6/basedir/scripts/rc.init: fatal: stopping the container.
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service base-addon-log-level: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service base-addon-log-level successfully stopped
s6-rc: info: service base-addon-banner: stopping
s6-rc: info: service base-addon-banner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting