Monitoring of cluster, nodes, and MySQL sync databases
In Cloud Databases MySQL sync, you can monitor the cluster state.
To assess the overall cluster state, view its status.
For a more detailed analysis, some metrics can be viewed as charts in the control panel:
You can export the full set of available metrics in Prometheus format.
When analyzing graphs, keep in mind that the time in the Control Panel corresponds to the time on your device and does not depend on the region where the cluster is located.
For example, you have created a cluster in Tashkent, in the uz-1 pool. The device from which you logged into the control panel is set to Moscow time. The time on the metrics charts will be displayed in Moscow time.
View cluster status
-
In the Control Panel, in the top menu, click Products and select Cloud Databases.
-
Open the Active tab.
-
Check the status in the cluster row.
View cluster node status
- In the Control Panel, in the top menu, click Products and select Cloud Databases.
- Open the Active tab.
- Open the cluster page → Monitoring tab.
- In the Cluster monitoring section, click Cluster nodes.
- Select the nodes whose metrics you want to view.
- View the available cluster node metrics.
Cluster node metrics in the control panel
View database status
- In the Control Panel, in the top menu, click Products and select Cloud Databases.
- Open the Active tab.
- Open the cluster page → Monitoring tab.
- In the Cluster monitoring section, click Cluster.
- Select the nodes whose metrics you want to view.
- View the available database metrics.
Database metrics in the control panel
Export metrics in Prometheus format
Historical information for clusters is unavailable — metrics are only queried in real time. The list of all metrics supported in Cloud Databases and their descriptions can be found in the Metrics in Prometheus format table.
1. Get a token
The token provides access to metrics of all clusters of a project in a single location.
-
In the Control Panel, in the top menu, click Products and select Cloud Databases.
-
Open the Active tab.
-
Open the cluster page → Monitoring tab.
-
In the Tokens for Prometheus section, click Create token. The token will be generated automatically.
-
Copy the token. To do this, in the token row, click .
2. Get metrics in Prometheus format
Configuration file
CLI
-
Add the
scrape_configsblock to the Prometheus configuration file:scrape_configs:- job_name: get-metrics-from-dbaasscrape_interval: 1mstatic_configs:- targets:- '<domain>'scheme: httpsauthorization:type: Bearercredentials: <token>Specify:
<domain>— Managed Databases API domain. This is the part of the URL used to access the API withouthttps://and/v1, for example,ru-3.dbaas.selcloud.ru. The URL depends on the region and pool, and can be viewed in the Cloud Databases subsection of the List of URLs instructions;<token>— the token you copied when getting the token in step 5.
-
Open the page in your browser where the metrics in Prometheus format will be available:
http://<ip_address>:9090/targetsSpecify
<ip_address>— the IP address on which Prometheus is installed. -
Set up your own monitoring and alerts for database clusters.
Metrics in Prometheus format
Metrics in Prometheus format are provided for all clusters. A specific cluster can be found by the database cluster ID in the ds_id label.
Infrastructure level metrics
Application level metrics