…hard to say what the trend will be, but I consider VM a top contender and the logical choice for those who don’t want to deal with InfluxDB 2.
fwiw, I’ve been running both side by side on a pi4 with no performance issues. as far as I can tell the storage is comparable and I’ll be shutting down Influx in the near future and sticking with VM.
jchh
(my username is my initials (and my first name isn't John))
22
Same experience here, but switched Influx off a couple of weeks ago. Keeping the data as I don’t know how to import it into VM.
I didn’t like the bloated influxdb way anymore and Victoria Metrics was the logical choice. Tiny, fast, stable and reliable. Never had a problem on my pi4 since the switch to Victoria Metrics. So give it a try and i hope you will like it as much as i do.
Tiny, fast, stable and reliable. How Tiny?
Does anyone have any stats of how much memory /swap it uses.
I’m already struggling with the 1GB in my PI.
(Yes the obvious answer is a bigger PI, but as we all know they are in short supply!)
I will release new versions when someone needs it. @fulwusl THANKYOU (My of my friends is already using, its on my plans too, see above)
I’ve been at this for some time now… I used InfluxDB for a long time but got discouraged when 2.0 was released because i couldn’t figure it out. Now I’ve managed to both have Grafana work with InfluxQL and have the InfluxDB-integration in Home Assistant write directly to VitoriaMetrics, which means values are written at change instead of scraped
Write if you wanna know more.
jchh
(my username is my initials (and my first name isn't John))
28
Interesting. I would certainly like to knife more!
We can write immediately to VM with the influx integration in Home Assistant.
I just copied my previous Influx in configuration.yaml but chagned the port to 8428
(see “–httpListenAddr=:8428”)
#influxdb
influxdb:
api_version: 2
ssl: false
host: 192.168.1.59
port: 8086
token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
organization: xxxxxxx
bucket: HA
tags:
source: HA
tags_attributes:
- friendly_name
- device_class
default_measurement: units
#victoriametrics
influxdb:
api_version: 2
ssl: false
host: 192.168.1.59
port: 8428 #<-- port changed
token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
organization: xxxxxxx
bucket: HA
tags:
source: HA_VM
tags_attributes:
- friendly_name
- device_class
default_measurement: units
To read this in Grafana. Influx-Query Language
Add datasource → InfluxDB
URL: http://192.168.1.59:8428
Select Basic Auth
User: YOURUSER
Password: YOURPASSWORD I only use one user/pass and not different for each DB. Up to you.
Go to InfluxDB → “arrow pointing up in menu on the left” → API Tokens.
Generate a new token.
*Note, I also use this token in the compose file above.
Click Add header → Enter Authorization in the first field.
Enter Token YOUR VERY LONG TOKEN ← Note the space between Token and actual token.
Victoria Metrics
Add datasource → Prometheus
URL: http://192.168.1.59:8428
*I haven’t experimented with passwords for VM so there is not much more to do. Just click “Save and test”.
2 Likes
jchh
(my username is my initials (and my first name isn't John))
30
awesome - I also use Docker so will try this over the weekend - thanks!
Hey all,
I work as a DevRel over at InfluxData. Hearing your pain over the 1.X to 2.X move of InfluxDB OSS. If you have any questions or ideas to pass on happy to take them back to the team.
I would assume that since the filtering is done before pushing, and we only change where the data is pushed.
1 Like
jchh
(my username is my initials (and my first name isn't John))
35
I don’t have this line.
1 Like
jchh
(my username is my initials (and my first name isn't John))
36
I got it working!
Here is my docker and HA configuration.yaml for anyone else…
docker-compose.yaml - note: vmagent no longer needed…
# uses InfluxDb integration in HA to push changes to VM's listening port: 8428
victoriametrics: # http://dietpi:8428
container_name: victoriametrics
image: victoriametrics/victoria-metrics:latest
volumes:
- ./vm/vmdata:/storage
- /etc/localtime:/etc/localtime:ro # only for RPi (Docker Mac is a VM)
command:
- "--selfScrapeInterval=60s" # to enable self-monitoring ➜ Grafana
- "--retentionPeriod=3y" # default is "1m"
- "--storageDataPath=/storage"
- "--httpListenAddr=:8428" # Influx HA config must also use 8428
network_mode: host
restart: unless-stopped
configuration.yaml (HA) note: prometheus no longer needed
FYI, recent versions of VictoriaMetrics allow controlling the frequency of disk write operations with the -inmemoryDataFlushInterval command-line flag. This may help saving the lifetime for commodity SD cards with limited number of write cycles. See CHANGELOG · VictoriaMetrics for more details.
Thankyoufuslwusl for this add-on and thank-you @fuslwusl , @jchh and others for all the development to this topic and advice.
I upgraded to a raspberry PI4 (4GB) and now have Victoria Metrics and Grafna running, using the HA Influx integration. (Graphs on steriods and long term statistics here I come )
For anyone with some experience of HA, its a minimal effort. I have offered @fuslwusl some tweaks to the installation instructions based on my experience.
For the record: HA says the Victoria metrics add-on is using 1.1% “add-on RAM usage” that would be 4.5% of 1GB I guess.
And Grafna: 1.5% ie 6% of 1GB
The added CPU is apparently 0.3% (of a PI4)
(The whole rPI4 (4GB) is running at 31% RAM utilisation and zero swap file use, )
Hey, I’m trying to set up VictoriaMetrics now and I’m struggling to understand the token, organization and bucket settings. I cannot find any of these in any place in VM? I seem to remember these from way back when I meddled with Influxdb, but are these needed when working with VM?
VictoriaMetrics doesn’t need any of that, the setup is trivial in the VM side, there is no configuration at all, you just pass the retention period in the docker command line, that’s it, in the HA side you use the config for influx v1 without org, bucket, token ok r password, see the link below.
Thanks to this thread I discovered VM while researching options for long term storage, and I got VM/grafana running in 10 minutes, it’s fantastic. All in a raspberry pi with a just-installed crucial x6 ssd. Also running frigate with a coral accelerator, all dockerized.