Home Assistant Community Add-on: InfluxDB

Pretty new to HA, so this might be something very basic, but I can’t seem to get influxdb to install. Can anyone see from the log what goes wrong?
Sorry if this is postet in the wrong thread.

[s6-init] making user provided files available at /var/run/s6/etc…exited 0.
[s6-init] ensuring user provided files have correct perms…exited 0.
[fix-attrs.d] applying ownership & permissions fixes…
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts…
[cont-init.d] 00-banner.sh: executing…

Add-on: InfluxDB
Scalable datastore for metrics, events, and real-time analytics

Add-on version: 4.3.0
You are running the latest version of this add-on.
System: Home Assistant OS 6.6 (aarch64 / raspberrypi3-64)
Home Assistant Core: 2021.11.5
Home Assistant Supervisor: 2021.12.1

Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.

[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing…
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] create-users.sh: executing…
[cont-init.d] create-users.sh: exited 0.
[cont-init.d] influxdb.sh: executing…
[cont-init.d] influxdb.sh: exited 0.
[cont-init.d] kapacitor.sh: executing…
[cont-init.d] kapacitor.sh: exited 0.
[cont-init.d] nginx.sh: executing…
[cont-init.d] nginx.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[14:46:01] INFO: Chronograf is waiting until InfluxDB is available…
[14:46:01] INFO: Kapacitor is waiting until InfluxDB is available…
[14:46:02] INFO: Starting the InfluxDB…
[14:47:12] INFO: Starting Chronograf…
[14:47:12] INFO: Starting the Kapacitor
‘##:::’##::::’###::::’########:::::’###:::::’######::’####:’########::’#######::’########::
##::’##::::’## ##::: ##… ##:::’## ##:::’##… ##:. ##::… ##…::’##… ##: ##… ##:
##:’##::::’##:. ##:: ##:::: ##::’##:. ##:: ##:::…::: ##::::: ##:::: ##:::: ##: ##:::: ##:
#####::::’##:::. ##: ########::’##:::. ##: ##:::::::: ##::::: ##:::: ##:::: ##: ########::
##. ##::: #########: ##…::: #########: ##:::::::: ##::::: ##:::: ##:::: ##: ##… ##:::
##:. ##:: ##… ##: ##:::::::: ##… ##: ##::: ##:: ##::::: ##:::: ##:::: ##: ##::. ##::
##::. ##: ##:::: ##: ##:::::::: ##:::: ##:. ######::’####:::: ##::::. #######:: ##:::. ##:
…::::…::…:::::…::…:::::::::…:::::…:::…:::…:::::…::::::…:::…:::::…::
2021/12/10 14:47:14 Using configuration at: /etc/kapacitor/kapacitor.conf
ts=2021-12-10T14:47:14.792+01:00 lvl=error msg=“encountered error” service=run err=“create server: invalid UUID length: 0”
run: create server: invalid UUID length: 0
[tcp] 2021/12/10 14:47:14 tcp.Mux: Listener at 127.0.0.1:8088 failed failed to accept a connection, closing all listeners - accept tcp 127.0.0.1:8088: use of closed network connection
[cont-finish.d] executing container finish scripts…
[cont-finish.d] 99-message.sh: executing…
[cont-finish.d] 99-message.sh: exited 0.
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.

The Userid for the process is not set correctly.

Hi all, is there an upgrade to InfluxDB 2.1 in the pipe ?
(1.8 is really outdated now…)

1 Like

AIUI, V2 is quite different to V1 so it might actually need to be a completely new addon to avoid compatibility issues.

I have looked at upgrading by database instance outside of HA and am very reluctant as I fear quite a bit of stuff might break.

There is an upgrade mode that works very well. You just need to add some dbrp mapping if you want to use InfluxQL instead of Flux. But you are right, a separated add-on is probably the better option… I think I will soon work on it if it does not already exist somewhere.

I’m not thinking the upgrade of the DB itself will be an issue, it is the things that I connect to it I worry about. Chronograf, Grafana and Node-RED nodes :frowning:.

Chronograf doesn’t exist in InfluxV2 => the UI is now accessible on the 8086 default port (chronograf like).
No change for Grafana expect the dbrp mapping to add for old InfluxQL queries.
Ok for Node-Red I have never used it.
I will probably work on a V2 addon (reusing 99% of the current one…)

3 Likes

I am unable to find this add-on in my store? Would anyone be able to help please?

I’ve been checking periodically - hoping we’d see v2 as an addon. Good luck to you!

3 Likes

I’ve just started playing around with Grafana and InfluxDB and I pretty quickly realized that I don’t want to be setting up my dashboards using FluxQL queries: it’s no longer being developed and therefore missing some newer features that are available in Flux such as grouping by calendar months. However, when I got to building my dashboards with Flux instead, I realized that the Flux version shipped with InfluxDB 1.8.10 from the addon is an early version, missing some of the newer features and not even not compatible with the Raspberry Pi’s ARM architecture (some commonly used aggregate functions such as mean and sum don’t work).

So I’m really keen to move to InfluxDB 2.x but I haven’t figured out how to set this up on my Home Assistant supervisor environment. Are there any guides? As far as I can tell the upgrade feature is not available for the docker image of this addon so it would have to be a new build but then the data has to be migrated as well. Any recommendations would be much appreciated!

Question. I tried to disable the _internal monitoring database (as recommended for normal production use). I added the correcponding envvar to the add-on configuration:

auth: true
certfile: fullchain.pem
envvars:
  - name: INFLUXDB_MONITOR_STORE_ENABLED
    value: 'false'
keyfile: privkey.pem
reporting: true
ssl: true

Is this the way to configure this? How can I verify the setting is effective? I don’t see any change in the loggings

Regards
Eric

i’m working on it but i don’t have much time :’(

https://docs.influxdata.com/platform/monitoring/influxdata-platform/tools/measurements-internal/
Here is the official documentation, don’t know if this option is accessible with the HA add-on (I don’t use it…)

https://docs.influxdata.com/influxdb/v2.1/upgrade/v1-to-v2/automatic-upgrade/

I tried but indeed it’s not available in the add on container.

I’m positive the internal measurements are disabled. The memory usage dropped ca 1% (40mb). Querying the internals database doesn’t show new values since the change.
Thx!

So is it possible to upgrade from 1.8 to 2.x using the automated-upgrade directions linked above? I have HA installed on a bare metal server running Ubuntu. When I look for influxdb, I see this mess:

So which one is the install directory from which I can perform the automated-upgrade from? Or is that just not possible?

I dug into this some more and installed portainer so that I could see my existing containers. Here’s what I got:

I then added the latest influxdb image as a new container:

But the environment looks a lot different and there are no labels compared to my existing hass add-on influxdb container:

So even if I was somehow able to migrate my data to this new container, I doubt I would be able to get hass/Grafana to work with it.

Amazing there are no guides on how to upgrade the hass influxdb add-on from 1.8 to 2.x…

The link posted above is for automatically upgrading from 1.8 to 2.3 when NOT using docker.

I think this is the link to use when influxdb is running in a container:

https://docs.influxdata.com/influxdb/v2.1/upgrade/v1-to-v2/docker/

Which is what I did, but like I said, I don’t think hass is going to like it.

Hi,
I need to use an https connection for some external request. I’ve already a secured connection with my HA with letsencrypt. When I add this lines in the influxdb conf file > envvars, I can use the httpS request via web browser (:8086) during 5 minutes and then it stop.

- name: INFLUXDB_HTTP_HTTPS_ENABLED
  value: 'true'
- name: INFLUXDB_HTTP_HTTPS_CERTIFICATE
  value: /ssl/fullchain.pem
- name: INFLUXDB_HTTP_HTTPS_PRIVATE_KEY
  value: /ssl/privkey.pem

Influxdb can’t really start. I can’t access to the configuration page.

[23:04:20] INFO: Chronograf is waiting until InfluxDB is available...
[23:04:20] INFO: Kapacitor is waiting until InfluxDB is available...
[23:04:20] DEBUG: Setting Env Variable INFLUXDB_HTTP_HTTPS_ENABLED to true
[23:04:20] DEBUG: Setting Env Variable INFLUXDB_HTTP_HTTPS_CERTIFICATE to /ssl/fullchain.pem
[23:04:20] DEBUG: Setting Env Variable INFLUXDB_HTTP_HTTPS_PRIVATE_KEY to /ssl/privkey.pem
[23:04:20] INFO: Starting the InfluxDB..

And then it stops and the httpS request isn’t available anymore.

Do you have an idea why the daemon can’t start when https connection is activated?

Is anyone else having issues with creating backups of the InfluxDB addon?