---
title: Integrate Prometheus with Tiger Cloud | Tiger Data Docs
description: Export telemetry metrics from your service to monitor system performance and health
---

[Prometheus](https://prometheus.io/docs/introduction/overview/) is an open-source monitoring system with a dimensional data model, flexible query language, and a modern alerting approach.

This page shows you how to export your service telemetry to Prometheus:

- For Tiger Cloud, using a dedicated Prometheus exporter in Tiger Console.

- For self-hosted TimescaleDB, using [PostgreSQL Exporter](https://grafana.com/oss/prometheus/exporters/postgres-exporter/).

## Prerequisites for this integration guide

To follow these steps, you'll need:

- A [Tiger Cloud service](/get-started/quickstart/create-service/index.md), or a running instance of [self-hosted TimescaleDB](/get-started/choose-your-path/install-timescaledb/index.md).

* Your [connection details](/integrate/find-connection-details/index.md).

- [Prometheus](https://prometheus.io/docs/prometheus/latest/installation/) downloaded and running.

  To reduce latency and potential data transfer costs, run Prometheus on a machine in the same AWS region as your Tiger Cloud service.

## Export Tiger Cloud service telemetry to Prometheus

To export your data, do the following:

- [Tiger Cloud](#tab-panel-555)
- [Self-hosted TimescaleDB](#tab-panel-556)

To export metrics from a Tiger Cloud service, you create a dedicated Prometheus exporter in Tiger Console, attach it to your service, then configure Prometheus to scrape metrics using the exposed URL. See [Exported metrics](/integrate/observability-alerting/exported-metrics/index.md) for the full list of default and additional metrics you can export. The Prometheus exporter is available for [Scale and Enterprise](/deploy/tiger-cloud/tiger-cloud-aws/pricing-and-account-management#features-included-in-each-pricing-plan/index.md) pricing plans.

1. **Create a Prometheus exporter**

   1. In [Tiger Console](https://console.cloud.tigerdata.com/dashboard/services), click `Exporters` > `+ New exporter`.

   2. Select `Metrics` for data type and `Prometheus` for provider.

      ![Creating a Prometheus exporter in Tiger Console](/_astro/tiger-cloud-create-prometheus-exporter.B94eNIjE_1MpV0x.webp)

   3. Choose the region for the exporter. Only services in the same project and region can be attached to this exporter.

   4. Name your exporter.

   5. Change the auto-generated Prometheus credentials, if needed. See [official documentation](https://prometheus.io/docs/guides/basic-auth/) on basic authentication in Prometheus.

   6. Optionally tick `PostgreSQL metrics` to export [additional metrics](/integrate/observability-alerting/exported-metrics#postgresql-metrics/index.md), then click `Create exporter`.

2. **Attach the exporter to a service**

   1. Select a service, then click `Operations` > `Exporters`.

   2. Select the exporter in the drop-down, then click `Attach exporter`.

      ![Attaching a Prometheus exporter to a service in Tiger Console](/_astro/attach-prometheus-exporter-tiger-console.N2R83WV__2oEnfe.webp)

   The exporter is now attached to your service. To unattach it, click the trash icon in the exporter list.

3. **Configure the Prometheus scrape target**

   1. Select your service, then click `Operations` > `Exporters` and click the information icon next to the exporter. You see the exporter details.

      ![Prometheus exporter details showing endpoint and credentials](/_astro/prometheus-exporter-details-tiger-cloud.Bkr_vzgL_XAwsq.webp)

   2. Copy the exporter URL.

   3. In your Prometheus installation, update `prometheus.yml` to point to the exporter URL as a scrape target:

      ```
      scrape_configs:
       - job_name: "timescaledb-exporter"
         scheme: https
         static_configs:
           - targets: ["my-exporter-url"]
         basic_auth:
           username: "user"
           password: "pass"
      ```

      See the [Prometheus documentation](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config) for details on configuring scrape targets.

      You can now monitor your service metrics.

To export metrics from self-hosted TimescaleDB, you import telemetry data about your database to PostgreSQL Exporter, then configure Prometheus to scrape metrics from it. PostgreSQL Exporter exposes metrics that you define, excluding the system metrics.

1. **Install PostgreSQL Exporter**

   Install [PostgreSQL Exporter](https://grafana.com/oss/prometheus/exporters/postgres-exporter/?tab=installation) on a machine that can reach your self-hosted TimescaleDB instance.

2. **Create a user to access telemetry data about your database**

   1. Connect to your database in [`psql`](/integrate/query-administration/psql/index.md) using your [connection details](/integrate/find-connection-details/index.md).

   2. Create a user named `monitoring` with a secure password:

      ```
      CREATE USER monitoring WITH PASSWORD '<password>';
      ```

   3. Grant the `pg_read_all_stats` permission to the `monitoring` user:

      ```
      GRANT pg_read_all_stats to monitoring;
      ```

3. **Import telemetry data about your database to PostgreSQL Exporter**

   1. Connect PostgreSQL Exporter to your database:

      Use your [connection details](/integrate/find-connection-details/index.md) to import telemetry data about your database. You connect as the `monitoring` user:

      - Local installation:

        Terminal window

        ```
        export DATA_SOURCE_NAME="postgres://<user>:<password>@<host>:<port>/<database>?sslmode=<sslmode>"
        ./postgres_exporter
        ```

      - Docker:

        Terminal window

        ```
        docker run -d \
           -e DATA_SOURCE_NAME="postgres://<user>:<password>@<host>:<port>/<database>?sslmode=<sslmode>" \
           -p 9187:9187 \
           prometheuscommunity/postgres-exporter
        ```

   2. Check the metrics for your database in the Prometheus format:

      - Browser:

        Navigate to `http://<exporter-host>:9187/metrics`.

      - Command line:

        Terminal window

        ```
        curl http://<exporter-host>:9187/metrics
        ```

4. **Configure Prometheus to scrape metrics**

   1. In your Prometheus installation, update `prometheus.yml` to point to your PostgreSQL Exporter instance as a scrape target. In the following example, you replace `<exporter-host>` with the hostname or IP address of the PostgreSQL Exporter.

      ```
      global:
        scrape_interval: 15s


      scrape_configs:
      - job_name: 'postgresql'
        static_configs:
         - targets: ['<exporter-host>:9187']
      ```

      If `prometheus.yml` has not been created during installation, create it manually. If you are using Docker, you can find the IPAddress in `Inspect` > `Networks` for the container running PostgreSQL Exporter.

   2. Restart Prometheus.

   3. Check the Prometheus UI at `http://<prometheus-host>:9090/targets` and `http://<prometheus-host>:9090/tsdb-status`.

      You see the PostgreSQL Exporter target and the metrics scraped from it.

You can further [visualize your data](https://grafana.com/docs/grafana-cloud/send-data/metrics/metrics-prometheus/) with Grafana. Use the [Grafana PostgreSQL dashboard](https://grafana.com/oss/prometheus/exporters/postgres-exporter/?tab=dashboards) or [create a custom dashboard](/integrate/observability-alerting/grafana/index.md) that suits your needs.

Note

This feature is currently not supported for Tiger Cloud on Microsoft Azure.
