Monitoring
ADPG monitoring allows you to collect two groups of metrics: database and system metrics. ADPG includes the Metrics storage service which is used as a storage for these metrics. The monitoring system contains the pgwatch2 tool to get database metrics from ADPG hosts. ADPG also utilizes the built-in monitoring agent to fetch system metrics from all cluster hosts (ADPG, Balancer, Etcd). In addition, ADPG uses the timescaledb extension when storing metric data and the Grafana web-interface for visualizing metrics.
The monitoring system consists of the server and client parts. The server side (Metrics storage) can collect metrics from multiple ADPG clusters. A client ADPG cluster, in turn, can use a Metrics storage service from the following locations:
-
from the same ADPG cluster;
-
from an ADPG cluster managed by the same ADCM;
-
from an ADPG cluster managed by another ADCM.
The monitoring system uses the adpg_metrics_sender
username to connect to client ADPG clusters. You can change this name if you utilize external monitoring. The cluster monitoring settings are located on the Clusters → ADPG cluster → Primary configuration tab. On this page, you can select the Enable monitoring checkbox to enable monitoring for an ADPG cluster. If you need to use another ADPG cluster for monitoring, switch on the Use external ADPG cluster for monitoring toggle button and specify the following settings according to your environment:
-
External ADPG cluster [ip_address:port] — an IP address with a port of a host with the Balancer service that belongs to an external ADPG cluster with the Metrics storage service. If the external ADPG cluster includes multiple hosts with the Balancer service, specify IP addresses of all these hosts.
-
Monitoring username — a username to connect to an external ADPG monitoring cluster. The default value is
adpg_metrics_sender
. -
Monitoring user password — a password for the username, which is utilized to connect to the monitoring cluster.
On the Primary configuration tab, you can also set the Monitoring db name option to define a database name that the Metrics storage service should use. The default value is adpg_metrics
.
If you change cluster monitoring settings, run the Reconfigure monitoring agents action to apply changes. This action reconfigures and restarts monitoring agents and disables or enables monitoring based on the Enable monitoring checkbox.
NOTE
|
It is also possible to import Metrics storage and Balancer settings from the same cluster or from another ADPG cluster managed by the same ADCM. Note, you can import only from an ADPG Enterprise Edition cluster. Use the Clusters→ ADPG cluster → Import tab for this purpose. If you wish to use Metrics storage from an ADPG Community Edition cluster or from another ADCM, switch on the Use external ADPG cluster for monitoring toggle button and specify the external cluster settings as described above.
After the monitoring is enabled, the Host-Components tab displays the optional Grafana component. Grafana visualizes metrics data and can be installed on any host of the cluster. To specify Grafana options, open Clusters → ADPG cluster → Services → Metrics storage → Primary configuration as described in Configure services. You can set the following Grafana settings:
-
Grafana TCP port — specifies a port on which Grafana listens for connections.
-
Grafana admin’s password — sets a password for the
admin
user, which is the default user in Grafana.
On the Primary configuration tab of the Metrics storage service, you can also specify a password, which the adpg_metrics_sender
user utilizes to connect to the ADPG cluster, the corresponding option is Monitoring user’s password.