---
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

To follow the steps on this page:

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

- For Tiger Cloud:

  Create a target [Tiger Cloud service](/docs/get-started/quickstart/create-service/index.md) with the time-series and analytics capability enabled.

- For self-hosted TimescaleDB:

  - Create a target [self-hosted TimescaleDB](/docs/get-started/choose-your-path/install-timescaledb/index.md) instance. You need your [connection details](/docs/integrate/find-connection-details/index.md).
  - [Install PostgreSQL Exporter](https://grafana.com/oss/prometheus/exporters/postgres-exporter/?tab=installation). To reduce latency and potential data transfer costs, install Prometheus and PostgreSQL Exporter 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-630)
- [Self-hosted TimescaleDB](#tab-panel-631)

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](/docs/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](/docs/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](/docs/_astro/tiger-cloud-create-prometheus-exporter.B94eNIjE_1amfO0.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](/docs/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](/docs/_astro/attach-prometheus-exporter-tiger-console.N2R83WV__1hdbxB.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](/docs/_astro/prometheus-exporter-details-tiger-cloud.Bkr_vzgL_Sperb.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. **Create a user to access telemetry data about your database**

   1. Connect to your database in [`psql`](/docs/integrate/query-administration/psql/index.md) using your [connection details](/docs/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;
      ```

2. **Import telemetry data about your database to {C.PG} Exporter**

   1. Connect PostgreSQL Exporter to your database:

      Use your [connection details](/docs/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
        ```

3. **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](/docs/integrate/observability-alerting/grafana/index.md) that suits your needs.

Note

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