Complete guide on setting up Grafana/InfluxDB with Home assistant using official Docker images

To be honest I don’t remember. I seem to remember I had to set org and bucket info, but can’t remember how I did it I’m afraid. I followed instructions on the link provided above and all went well

Keep in mind that, if you upgrade InfluxDB to version 2.0, you need to update your configuration for InfluxDB in your HA config as well. Refer to the docs here for more info.

Is there any good tutorial or workaround how I can move out influxDB and grafana away from mi Raspberry Pi with SD-Card? I am scared, that I will kill it. But on which machine in my home can I move these programs?
I want to use influxDB and grafana to look at my temperature Data, but I am a little bit puzzeled, where to install these two add-ons instead.

Basically any linux machine that is running 24/7. A NAS is a good option.

You wouldn’t install the add-ons, you’d install the software through docker or bare metal on the other machine and the configure HA to point to this machine.

1 Like

Thank you very much for your answer!
Okay. Wow. I though it is enough just to have only one machine running 24/7. For that purpose I have bought the Raspberry Pi 4. :smiley:

Is there any other possibility to “prevent” my SD-Card of the Pi getting broken too early? I have two other ideas (dont know if they make any sense):

  1. to plug a HDD to the Pi, and let the Database stuff running there.
  2. to just sync the Data from the Pi to another machine every week or so (samba share?). And on this machine I can install InfluxDB and Grafana.

The problem is, that too many savings on the SD Card will kill it, correct?

Option 1 is the better solution,but I’d suggest an SSD instead of a HDD.

Ok, so I can install Graphana and InfluxDB on an Harddrive plugged in the Raspberry Pi. Thats cool! Thanks!

Two more things:
3. I thought an SSD would have the same problems as an SD card. Since both are flash memory. Or do I see that wrong?
4. if an SSD works, a USB stick would also work. Correct?

You see it wrong, they are different types of memory.

Yes, but a USB Thumb drive will eventually die just takes a little longer than the SD cards.

1 Like

There is another option for SD card failures. You can move the storage location of the db to the ram. A very easy fix. The constant read/write to the db is what causes the failure. One benefit other than saving your SD, this will give you a speed boost. The down side is that when you reboot, you will lose history.

Add this to your configuration.yaml

recorder:
db_url: sqlite:///:memory

1 Like

That was definitely an option until not so long ago, when the DB basically only contained "transient’ information.
It’s not quite the case anymore, as the DB also holds long-tern statistics, which will obviously be lost at each, not only reboot, but restart of HA.

when I do this command docker exec -it influxdb influx
nothing happens. I only get a list op command to use… influxdb doesnt open …

What are you expecting?
This should open influxdb command-line client, nothing more, nothing less.

well, I don’t think it does open the client…

i cant create a database

Tad nebulous. Screenshot, please

Works for me (on a custom container)

So what could be the problem ?

IDK. Maybe the influxdb proper is not actually running in the container (on http://localhost:8086)?

Maybe try a curl inside the container

image

Naamloos-1

i cannot use localhost (that does not work), but with my local ip, it works. In the docker influxdb is active. And I can go to the webapp. so it is running. but I cannot “open” it and make a database

Ah, you installed influxdb 2.X.
This guide is for influxdb 1.x. A bazillion of things have changed between the 2 versions. You don’t even have a notion of database anymore.