-
Notifications
You must be signed in to change notification settings - Fork 104
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
base: latest
Are you sure you want to change the base?
Integrations: Prometheus #3706
Conversation
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 |
There was a problem hiding this 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** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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: |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make into substeps:
- If
prometheus.yml
has not been created during installation, create it manually with the following template: - Update bla bla
There was a problem hiding this comment.
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`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. Check the Prometheus UI at `http://<prometheus-host>:9090`. | |
1. Connect to the Prometheus UI at `http://<prometheus-host>:9090`. |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Set the bla bla
There was a problem hiding this comment.
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.
This needs to be tested