Install Promscale

There are several different methods for installing Promscale. This section describes installing from a pre-built Docker image. For alternative installation methods, see the Promscale GitHub repository.

If you have a Kubernetes cluster with Helm installed, you can use the observability suite for Kubernetes (tobs) to install a full metric collection and visualization solution including Prometheus, Grafana, Promscale, and a preview version of PromLens. To learn how to do this, watch our demo video. For more information about tobs, see the tobs GitHub repository.

If you want to migrate data from Prometheus into Promscale, you can use Prom-migrator, an open-source, universal Prometheus data migration tool that can move data from one remote-storage system to another.

Install Promscale from a Docker image

You can install the Promscale Connector with a Docker image from Docker Hub. To see the latest available images, see the Promscale Releases on GitHub.

Procedure: Installing Promscale from a Docker image

  1. Create a network specific to Promscale-TimescaleDB:
    docker network create --driver bridge promscale-timescaledb
  2. Install and run TimescaleDB with the Promscale extension:
    docker run --name timescaledb -e \
    POSTGRES_PASSWORD=<password> -d -p 5432:5432 \
    --network promscale-timescaledb \
    timescaledev/promscale-extension:latest-pg12 \
    postgres -csynchronous_commit=off
  3. Run Promscale:
    docker run --name promscale -d -p 9201:9201 \
    --network promscale-timescaledb timescale/promscale:<version-tag> \
    -db-password=<password> -db-port=5432 -db-name=postgres \
    -db-host=timescaledb -db-ssl-mode=allow
    In this example, we use db-ssl-mode=allow, which is suitable for testing purposes. For production environments, use db-ssl-mode=require instead.

Configure Prometheus for Promscale

You need to tell Prometheus to use the remote storage connector. By setting Prometheus to read_recent it means that Prometheus queries data from Promscale for all PromQL queries. You can do that by opening the prometheus.yml configuration file, and adding these lines:

remote_write:
  - url: "http://<connector-address>:9201/write"
remote_read:
  - url: "http://<connector-address>:9201/read"
    read_recent: true

For more information about configuring Prometheus for Promscale, see the Promscale documentation.

Configure the Promscale Connector

You can configure the Promscale Connector using flags at the command prompt, environment variables, or a YAML configuration file. When processing commands, precedence is granted in this order:

  1. CLI flag
  2. Environment variable
  3. Configuration file value
  4. Default value

All environment variables are prefixed with PROMSCALE.

For more information about configuring Promscale, see the Promscale CLI documentation, or use the promscale -h command.

Found an issue on this page?

Report an issue!

Related Content