Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrations: Prometheus #3706

Open
wants to merge 5 commits into
base: latest
Choose a base branch
from
Open

Integrations: Prometheus #3706

wants to merge 5 commits into from

Conversation

atovpeko
Copy link
Contributor

@atovpeko atovpeko commented Jan 14, 2025

This needs to be tested

Copy link

Allow 10 minutes from last push for the staging site to build. If the link doesn't work, try using incognito mode instead. For internal reviewers, check web-documentation repo actions for staging build status. Link to build for this PR: http://docs-dev.timescale.com/docs-prometheus-update

@atovpeko atovpeko marked this pull request as draft January 14, 2025 09:55
@atovpeko atovpeko marked this pull request as ready for review January 21, 2025 09:40
Copy link
Contributor

@billy-the-fish billy-the-fish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good start, nearly there.


1. Install the postgresql_exporter on a host that you manage to connect to the Timescale service and collect telemetry. Below is an example using Docker to run postgresql_exporter:
1. **Connect to your $SERVICE_LONG as a privileged user**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. **Connect to your $SERVICE_LONG as a privileged user**
1. **Connect to your $SERVICE_LONG**

This does not really exist for Console at the moment.


make sure to replace `<PASSWORD>` with the created password and `<TIMESCALE-HOST:PORT>` with the timescale service host and port.
See the available [connection options][run-queries]. For self-hosted installations, use [`psql`][psql].
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
See the available [connection options][run-queries]. For self-hosted installations, use [`psql`][psql].
For $CLOUD_SHORT, connect from [$CONSOLE][run-queries] . For self-hosted, use [`psql`][psql].


## Create a monitoring user
This page shows you how to export your $SERVICE_SHORT telemetry to Prometheus.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This page shows you how to export your $SERVICE_SHORT telemetry to Prometheus.
This page shows you how to export your $SERVICE_SHORT telemetry to Prometheus using [PostgreSQL Exporter][link to https://grafana.com/oss/prometheus/exporters/postgres-exporter/]


1. Once the postgresql_exporter is up and running, and successfully connected to the Timescale service, you can configure your Prometheus server to scrape the postgresql_exporter metrics endpoint. This endpoint exposes all the metrics provided by the exporter.
PostgreSQL Exporter collects PostgreSQL performance metrics and exposes them in a Prometheus-compatible format. [Install PostgreSQL Exporter][install-exporter] on the host that you use to connect to your $SERVICE_SHORT and collect telemetry. To reduce latency and potential data transfer costs, run PostgreSQL Exporter in the same AWS region as your $SERVICE_LONG.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
PostgreSQL Exporter collects PostgreSQL performance metrics and exposes them in a Prometheus-compatible format. [Install PostgreSQL Exporter][install-exporter] on the host that you use to connect to your $SERVICE_SHORT and collect telemetry. To reduce latency and potential data transfer costs, run PostgreSQL Exporter in the same AWS region as your $SERVICE_LONG.
You Install PostgreSQL Exporter on the machine that you use to connect to your $SERVICE_SHORT and collect telemetry. To reduce latency and potential data transfer costs, run PostgreSQL Exporter in the same AWS region as your $SERVICE_LONG.

You don't need the link as you explain how to install next.

1. Once the postgresql_exporter is up and running, and successfully connected to the Timescale service, you can configure your Prometheus server to scrape the postgresql_exporter metrics endpoint. This endpoint exposes all the metrics provided by the exporter.
PostgreSQL Exporter collects PostgreSQL performance metrics and exposes them in a Prometheus-compatible format. [Install PostgreSQL Exporter][install-exporter] on the host that you use to connect to your $SERVICE_SHORT and collect telemetry. To reduce latency and potential data transfer costs, run PostgreSQL Exporter in the same AWS region as your $SERVICE_LONG.

For example, install using Docker:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change the to list thingies:

  • Using Docker
    bla bla
  • Binary install
    bla bla


1. **Configure Prometheus to scrape metrics**

1. Update the `prometheus.yml` file to include PostgreSQL Exporter as a scrape target. If `prometheus.yml` has not been created during installation, create it manually:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make into substeps:

  1. If prometheus.yml has not been created during installation, create it manually with the following template:
  2. Update bla bla

Copy link
Contributor Author

@atovpeko atovpeko Jan 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are not separate steps. You either update it, or create it. In both cases, just one step


1. Restart Prometheus.

1. Check the Prometheus UI at `http://<prometheus-host>:9090`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. Check the Prometheus UI at `http://<prometheus-host>:9090`.
1. Connect to the Prometheus UI at `http://<prometheus-host>:9090`.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is in the sense of "open a browser window and look at the UI". Why would we say "connect" here? Sounds like there are extra steps involved.

* Cache Hit Ratio
* Number of Active Connections
* Buffers
The PostgreSQL Exporter target under `Status` > `Target health` must be active.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Set the bla bla

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Set what? You don't set anything, you just check that it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Docs RFC] Test the doc showing how to integrate Prometheus with Timescale Cloud
2 participants