Hi, in HA log I get an error where Influx is referenced with double port references (:8086:8086)
ERROR (SyncWorker_12) [homeassistant.components.influxdb.sensor] Cannot connect to InfluxDB due to 'Failed to parse: http://my_local_ip_address:8086:8086/query'. Please check that the provided connection details (host, port, etc.) are correct and that your InfluxDB server is running and accessible.
I have jumped back and forward among the configs now, and do not understund where this double reference to the port, comes from!
Anyone having an idea, that can help me find the source to the error?
If you use Home Assitant OS, there is the influxdb add-on (that this thread is about). You can use this add-on to setup and run Influxdb under the Home Assistant OS.
Otherwise, you can setup influxdb on whatever server (or the machine running Home Assistant) and then use the influxdb integration to connect.
But, as far as I know, the add-on is not maintained anymore, and it is using an outdated version of influxdb. It should still work though.
I use HAOS and would like to set up a more current version of influxdb. I see two options
Just set influxdb up on another machine
Create my own add-on with the newest version of influxdb and run it in Home Assistant OS
I’m starting to lean towards option 2, but it might be out of my league
It is 100% compatible with InfluxDB and Prometheus and has many advantages like 20x better compression, lower RAM usage and higher performance. It is also directly usable in Grafana with Prometheus or InfluxDB Data source - so it is a drop-in replacement for Prometheus and InfluxDB.
In Home Assistant OS / Supervisor you can backup the victoria-metrics-data folder located in the shared folder.
Thank you for making this add-on. I think it would deserve it’s own thread here. Haven’t tried it yet but super interested.
Edit: because the add-on is so new and seemingly not used by many yet I tried to verify the contents. However when I diffed the victoriametrics inside the addon against the release I got a mismatch. Could you please specify which release was used in this add-on? I probably just chose the wrong release package…
I used WinMerge to check the victoria-metrics-prod file in this add-on versus the release victoria-metrics-linux-arm64-v1.81.2.tar.gz but they are different. Also checked some other versions but none matched.
Did you compile victoriametrics yourself or can you point to the binary version being used?
I am using the victoriametrics version from the original dockerhub image “victoriametrics/victoria-metrics:v1.81.2”. I copied the binary from this docker image after running the container successfully on an ARM MacBook Pro M1. This binary is running on my Raspberry 4 without problems.
Do you think I should use another binary?
I updated the image a minute ago. Now the Add-on uses InfluxDB integration to get data from home assistant. The integration has an option to use the entity_id as metric name - this is great when using Grafana - just one click and you get the data you want.
With the influxdb integration homeassistant pushes every change directly to the database. This is an advantage because you get every change and not only the states every 20 seconds when scraping was used. GitHub: HASSIO VictoriaMetrics Add-On
It seems the victoriametrics-prod file in the official docker image is different from the official arm64 image then. Need to investigate how to hash that now.
Use what image you want, no problem. It is just me trying to verify what I install
I thought the official docker image would be a good choice. But i could change the binary to the one you recommended. I just wanted to avoid compile sessions and missed the binary downloads.
You meant these binary versions i think: Releases · VictoriaMetrics/VictoriaMetrics · GitHub
After some research i am still at a loss and partly confused. Hopefully one of you can help.
I am running Home Assistant OS on a Raspberry pi 4, collecting data for almost a year with the current InfluxDB add-on V4.5.0. I finally wanted to set up a visualization with grafana, but got the same view and stumbled upon the same problems as Dingle:
So, as Dingle, I’m really keen to move to InfluxDB 2.x but haven’t figured out how to set this up with my Home Assistant OS environment and without losing the data I already collected in my InfluxDB V1.x database.
It seems there are (at least) two options to proceed for me:
Option 1: Continue using the community InfluxDB add-on and switch from api_version 1 to api_version 2
As far as I understood, the InfluxDB add-on has the ability to run as InfluxDB 2.x installation. Key is the switch api_version which has to be set from 1 to 2 (and some other parameters). But I found no guidance to perform an upgrade/migration in case a InfluxDB 1.x installation is already been used.
Jan himself stated that the reason for this new add-on was that, with regard to the community InfluxDB add-on, “The upgrade path from V1.x to V2.x requires access to the command line and isn’t a very user friendly process“. It almost looks as if jan’s addon would pick up my situation precisely…
What I don’t get: Is the InfluxDB2 add-on a standalone add-on, means I can later remove the InfluxDB community add-on? Or does the InfluxDB2 add-on still require a running InfluxDB add-on and database?
I’m pretty sure that I too would get this addon to work at some point. But of course I also ask myself how do I migrate the data of my current database to use with this addon?
Maybe someone has already gone through the same topic and can give me a few hints.
Anyone figure out how to solve the InfluxDB add-on running out of memory?
runtime: out of memory: cannot allocate 8192-byte block (564428800 in use)
fatal error: out of memory
goroutine 1357 [running]:
runtime.throw(0xfebdde, 0xd)
/usr/local/go/src/runtime/panic.go:774 +0x5c fp=0x47f9324 sp=0x47f9310 pc=0x41644
The memory in use, assuming 564363264 is in bytes not blocks, is only 0.525GB.
I’ve increased swap to 6GB, so I have over 5GB of swap available but it still fails allocating at that point.
Is the add-on limiting the amount of memory available to the container?
I tried changing the index from the default inmem to tsi1 by adding the following envvar to the add-on config. But I can’t tell whether it actually changed anything as Influx still dies on the same out of memory error.
Great Addon - makes it much easier for rookies like myself
Some questions though:
On the Admin board I just see the _internal DB. Is this the influx internal or the homeassistant internal (SQlite)?
Means: Do I need to create a DB manually and if so, where is this to be found (path)?
EDIT:
One more question:
Is the configuration in configuration.yaml still needed or is this hidden somewhere in the background by the Community AddOn?
EDIT II:
Sorry for my RTFM question.
I will check out the docs and might come back with reasonable questions.
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.
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.