jonppe / influx_to_victoriametrics

Python InfluxDB to VictoriaMetrics exporter script
8 stars 2 forks source link

After 24 hours I gave up hope #3

Open smoltron opened 10 months ago

smoltron commented 10 months ago

I tried to migrate from InfluxDB 2 to Victoriametrics with your script. I managed to connect both databases and some load continued to happen in both ends. I waited for 24 hours and found no real data transferred. Queries did not return anything new in victoria server. The script continued to give this message every 5 minutes or so:

warnings.warn(
Exporting %_value
/home/kari/dev/influx_to_victoriametrics/venv/lib/python3.11/site-packages/influxdb_client/client/warnings.py:31: MissingPivotFunction: The query doesn't contains the pivot() function.

The result will not be shaped to optimal processing by pandas.DataFrame. Use the pivot() function by:

        from(bucket: "homeassistant")
        |> range(start: 0, stop: now())
        |> filter(fn: (r) => r["_measurement"] == "%")
        |> filter(fn: (r) => r["_field"] == "value")
         |> pivot(rowKey:["_time"], columnKey: ["_field"], valueColumn: "_value")

You can disable this warning by:
    import warnings
    from influxdb_client.client.warnings import MissingPivotFunction

    warnings.simplefilter("ignore", MissingPivotFunction)

For more info see:
    - https://docs.influxdata.com/resources/videos/pivots-in-flux/
    - https://docs.influxdata.com/flux/latest/stdlib/universe/pivot/
    - https://docs.influxdata.com/flux/latest/stdlib/influxdata/influxdb/schema/fieldsascols/

  warnings.warn(message, MissingPivotFunction)

I think I must give up hope now. My Influx data seems to be quite unusable and InfluxDb is a dead horse as a software. Or, does anyone else have an idea how to solve this?

pki791 commented 9 months ago

If You not see new data, check the logs in victoris, possible You left the default retention of one month which not allow You to import older data. I came over that issue.