VictoriaMetrics / vmctl

Victoria Metrics command line tool
36 stars 8 forks source link

Influx mode: support for Prometheus data written via remote_write #8

Closed mback2k closed 2 years ago

mback2k commented 4 years ago

Prometheus data written via remote_write has a specific schema documented here: https://docs.influxdata.com/influxdb/v1.7/supported_protocols/prometheus/#how-prometheus-metrics-are-parsed-in-influxdb

Therefore it would be great to have a migration mode that enables to move data from InfluxDB into VictoriaMetrics which is then converted back into the original Prometheus format, e.g. no db label and no _value suffix on the timeseries.

At the end the data should look like it was directly written from Prometheus into VictoriaMetrics, just like the step over InfluxDB has never happened.

hagen1778 commented 4 years ago

Hi @mback2k! Hm, so such conversion could happen if influx measurement:

Then this metric may be considered as ex-Prometheus metric written into Influx and may be recovered to original name.

Do I understand it correctly?

mback2k commented 4 years ago

Hi @hagen1778, yes that is correct. However I would still suggest to add a flag to enable this conversion to avoid unintended conversions for non-Prometheus data.

ahmadalli commented 4 years ago

this feature is required if we want to migrate our prometheus backend storage from influx to VM since current influx import changes the name of metrics and breaks our dashboards

valyala commented 3 years ago

FYI, vmctl has been migrated to main VictoriaMetrics repository. New releases for vmctl will be available at vmutils-*.tar.gz package on the releases page starting from v1.53.0 . It is recommended filing new issues and feature requests for vmctl in main VictoriaMetrics repository.

valyala commented 2 years ago

FYI, vmctl supports influx-prometheus-mode command-line flag, which allows to restore the original time series written from Prometheus into InfluxDB during data migration from InfluxDB to VictoriaMetrics starting from v1.77.2.