Prom-migrator data migration tool

Prom-migrator is a universal Prometheus data migration tool that migrates your data from one storage system to another, using Prometheus remote storage endpoints. If you are already using Prometheus for long term storage of metrics, you can use Prom-migrator to replace your remote storage system with Promscale. Prom-migrator is open source, community-driven, and free-to-use.

Migrate to Promscale using Prom-migrator

Before you begin, you must have an already installed and working Prometheus environment to migrate. Additionally, you need a self-hosted TimescaleDB instance installed.

Migrating to Promscale using Prom-migrator

  1. Install Promscale from a Docker container, or from source.
  2. Install the Prom-migrator tool from the Promscale releases page.
  3. Run Prom-migrator to copy the data from the existing Prometheus installation to Promscale:

    1. ./prom-migrator -start=<migration-data-start-time> \
    2. -end=<migration-data-end-time> \
    3. -reader-url=<read_endpoint_url_for_remote_read_storage> \
    4. -writer-url=<write_endpoint_url_for_remote_write_storage> \
    5. -progress-metric-url=<read_endpoint_url_for_remote_write_storage>

    For example:

    1. ./prom-migrator -start=1631007492 \
    2. -end=1635845892 \
    3. -reader-url=http://localhost:9091/api/v1/read \
    4. -writer-url=http://localhost:9201/write \
    5. -progress-metric-url=http://localhost:9201/read

When you have migrated the data into Promscale, you can drop the old data from Prometheus and any other remote storage system and use Promscale to query using in PromQL and TimescaleDB to query using SQL. You can also configure your existing Prometheus alerting and recording rules in Promscale. At that point, Prometheus is only useful for collecting data and we recommend you use the Prometheus Agent Mode to reduce resource consumption. At the very least you could set the data retention in Prometheus to 1d.

For more information about Prom-migrator and it command line options, see our developer documentation.