Exporting Metrics in Prometheus Format
You can export metrics in Prometheus format and then customize monitoring and alerts for database clusters yourself.
Historical information for clusters is not available — metrics are only queried in real time.
To export metrics, you need to get a monitoring token. The token provides you with access to the metrics of all clusters in the same project pool.
- From the Control panel, go to the Cloud platform ⟶ Managed Databases section.
- Click Tokens for Prometheus ⟶ Create.
- Enter a token name. The token will be generated automatically. Click Create.
- Add the following to the Prometheus configuration file:
scrape_configs: - job_name: get-metrics-from-dbaas scrape_interval: 1m static_configs: - targets: - '<region>.dbaas.selcloud.ru' scheme: https authorization: type: Bearer credentials: <monitoring_token>
Specify: - `<region>` — pool where the token is operating, for example `ru-3`; - `<monitoring_token>` — monitoring token value.
- The source of the metrics will appear at
localhost— the IP address where Prometheus is installed.