How to keep/migrate LXD grafana data


Planning to migrate from LXD to Incus.
Just have a question about keeping/migrating LXD Prometheus data.

Has someone already figured out how to do this nicely?

Is Prometheus relabeling the best approach?

Gr, J

If prometheus is running within lxd then it will continue running after migration to incus, with all the existing data intact.

If you’re talking about the prometheus metrics which lxd and incus can themselves generate, then they will change from lxd_* to incus_*. You can modify your existing Grafana dashboards appropriately, or import the new dashboard for incus.

Personally, I wouldn’t not attempt to rename historical metrics from lxd_* to incus_* because they would be historically inaccurate - they weren’t generated from incus. Nor would I rename incus_* metrics to lxd_* at ingestion time, because that’s a frig you won’t want to maintain indefinitely (and because incus metrics may diverge from lxd metrics over time)

I also would not attempt to make a single dashboard which combines both lxd and incus metrics, although that’s the least bad option if you really want a unified view.

I’d just keep the lxd dashboards for accessing historical data, and the incus ones for new data.