Skip to content

Influxdb to Victoriametrics

Hanoh Haim edited this page Jul 14, 2023 · 3 revisions

Why?

  1. Influxdb 2.x has a new query language
  2. VM is much more efficient and backward compatible with the ingestion protocol. 2.1 In my case same DB (after conversion) in VM is 100M while in InfluxDB it is 3GB (x30 better)
  3. The PromQL has more function than the old unsupported 1.x influx query language
  4. Much faster query time

How?

  1. run this to move the data

sudo docker run victoriametrics/vmctl:stable --influx-addr {url} --influx-user {user} --influx-password {passwrd} --influx-database hass_db --vm-addr {vm-url}

  1. change the port of the influx to the new DB (8248)
  2. remove the old influxDB DB

see https://github.com/hhaim/hass/commit/dfe646271338e6bcd2493d466db70d33820eb343 https://github.com/hhaim/hass/commit/a60df2473de268f11f578d360c53bc5c93ea2a0b