Monitoring a MySQL semi-sync cluster, nodes, and databases
In Managed Databases MySQL semi-sync you can monitor the cluster state.
To estimate the general cluster state, view its status.
For a more detailed analysis, some metrics can be viewed as charts in the control panel:
A full set of available metrics can be exported in Prometheus format.
The time in the control panel corresponds to the time set on your device and does not depend on the region where the cluster is hosted.
For example, you have created a cluster in Tashkent, in the uz-1 pool. Tashkent is in the UTC+5 time zone. On the device from which you logged into the control panel, the UTC+3 time zone is set. The time on the metrics charts will be displayed in UTC+3.
View cluster status
-
In the control panel, on the top menu, click Products and select Managed Databases.
-
Open the Active tab.
-
Check the status in the cluster row.
View cluster node status
- In the control panel, on the top menu, click Products and select Managed Databases.
- Open the Active tab.
- Open the cluster page → Monitoring tab.
- In the Cluster monitoring block, click Cluster nodes.
- Select the nodes whose metrics you want to view.
- View available cluster node metrics.
Cluster node metrics in the control panel
View database status
- In the control panel, on the top menu, click Products and select Managed Databases.
- Open the Active tab.
- Open the cluster page → Monitoring tab.
- In the Cluster monitoring block, click Cluster.
- Select the nodes whose metrics you want to view.
- View available database metrics.
Database metrics in the control panel
Export metrics in Prometheus format
Historical information for clusters is not available — metrics are requested only in real time. A list of all metrics supported in Managed Databases and their descriptions can be viewed in the Metrics in Prometheus format table.
1. Get a token
The token provides access to metrics for all clusters of a project in one location.
-
In the control panel, on the top menu, click Products and select Managed Databases.
-
Open the Active tab.
-
Open the cluster page → Monitoring tab.
-
In the Prometheus tokens block, click Create token. The token will be generated automatically.
-
Copy the token. To do this, click in the token line.
2. Get metrics in Prometheus format
Configuration file
CLI
-
Add the
scrape_configs:block 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 for accessing the API, excludinghttps://and/v1uz-1.dbaas.api.servercore.com. The URL depends on the region and pool; you can view it in the list of URLs;<token>— the token you copied when getting a 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 where 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 its database cluster identifier in the ds_id label.
Infrastructure level metrics
Application level metrics