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.
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 |
Parameter | Description | Default value |
---|---|---|
Listen port |
Port on the host with the ADPG service to retrieve connection pooler metrics in the Prometheus format |
9188 |
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 |
Parameter | Description | Default value |
---|---|---|
Listen port |
Port on the host with the ADPG service to retrieve PostgreSQL metrics in the Prometheus format |
9187 |
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 ( |
— |
— |
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: |
15d |
|
web.listen-address |
Address to access the Prometheus web interface |
0.0.0.0:11200 |
Parameter | Description | Default value |
---|---|---|
Grafana administrator’s password |
Password of the Grafana |
— |
Grafana listen port |
Port to access the Grafana web interface |
11210 |
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 settings → Password for Grafana connection and Grafana settings → Grafana 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.