Monitoring

Overview

The Monitoring service implements monitoring in the ADPG cluster. It deploys the Prometheus server, which collects and stores metrics. The Monitoring service also supports Grafana for data visualization.

Prometheus retrieves metrics through HTTP calls to specific endpoints. Metrics are transferred to these endpoints by exporters, which should be installed on the cluster hosts. The table below describes the components of the Monitoring service and on which hosts they should be installed.

Component Description Host

Prometheus Server

The Prometheus server that collects and stores metrics

A separate host for monitoring

Grafana

The Grafana web interface for creating dashboards to visualize metrics

A host for Grafana. It is recommended to use a host with a Prometheus server

ADPG Exporter

Sends PostgreSQL metrics

All hosts with the ADPG service

Pgbouncer Exporter

Sends Pgbouncer metrics

All hosts with the ADPG service

PgBackRest Exporter

Sends backup statistics

All hosts with the ADPG service

Node Exporter

Sends system metrics

All hosts from which system metrics need to be collected

Patroni and Etcd exposes the /metrics endpoint by default. There is no need to configure a separate exporter for them to support Prometheus scraping. The Balancer (HAProxy) service does not require installation of a separate component to export metrics, but you can configure the parameters of the built-in HAProxy exporter in the Monitoring service settings.

Monitoring service settings

To specify Monitoring service parameters, open the Services tab of the ADPG cluster and select the Monitoring service. The parameters are available on the Primary configuration tab.

HAProxy Exporter settings
Parameter Description Default value

Listen port

Port on the host with the Balancer service to retrieve HAProxy metrics in the Prometheus format

8405

Metrics endpoint

Endpoint on the host with the Balancer service to retrieve HAProxy metrics in the Prometheus format

/metrics

Pgbouncer Exporter settings
Parameter Description Default value

Listen port

Port on the host with the ADPG service to retrieve connection pooler metrics in the Prometheus format

9188

PgBackRest Exporter settings
Parameter Description Default value

Listen port

Port on the host with the ADPG service to retrieve PgBackRest metrics in the Prometheus format

9854

Metrics endpoint

Endpoint on the host with the ADPG service to retrieve PgBackRest metrics in the Prometheus format

/metrics

ADPG Exporter settings
Parameter Description Default value

Listen port

Port on the host with the ADPG service to retrieve PostgreSQL metrics in the Prometheus format

9187

Prometheus settings
Group Parameter Description Default value

 — 

scrape_interval

Specifies how frequently to scrape targets

1m

 — 

scrape_timeout

Specifies how long to wait until a scrape request times out

10s

 — 

Password for Grafana connection

A password of a Grafana user (admprom_grafana) that is used to connect to Prometheus. The password should contain a combination of uppercase [A-Z] and lowercase [a-z] English letters, digits [0-9], special characters and have a minimum length of 8

 — 

 — 

Prometheus users to login/logout to Prometheus

User credentials for logging into the Prometheus web interface

 — 

Service parameters

config.file

Path to the Prometheus server configuration file

/etc/admprom/prometheus/prometheus.yml

storage.tsdb.path

Path to the Prometheus server database

/var/lib/admprom/prometheus

web.console.libraries

Path to console management libraries

/usr/share/admprom/prometheus/console_libraries

web.console.templates

Path to Prometheus server console templates

/usr/share/admprom/prometheus/consoles

web.config.file

Specifies which web configuration file to load. The file should have the YAML format

/etc/admprom/prometheus/prometheus-auth.yml

storage.tsdb.retention.time

Specifies how long to retain samples in the storage. Supported units: y, w, d, h, m, s, ms

15d

web.listen-address

Address to access the Prometheus web interface

0.0.0.0:11200

Grafana settings
Parameter Description Default value

Grafana administrator’s password

Password of the Grafana admin user. The password should include uppercase [A-Z] and lowercase [a-z] English letters, digits [0-9], and special characters

 — 

Grafana listen port

Port to access the Grafana web interface

11210

Node Exporter settings
Parameter Description Default value

Listen port

Port on the cluster’s host to access host system metrics in the Prometheus format

11203

Metrics endpoint

Endpoint on the cluster’s host to retrieve system metrics in the Prometheus format

/metrics

The Prometheus settingsPassword for Grafana connection and Grafana settingsGrafana administrator’s password parameters are mandatory and should be specified during the monitoring installation.

For more information on the Monitoring service installation, refer to Install monitoring.

The Monitoring service metrics are described in ADPG monitoring metrics.

Found a mistake? Seleсt text and press Ctrl+Enter to report it