Skip to main content

Monitoring of cluster, nodes and MySQL sync databases

In cloud databases MySQL sync you can monitor the state of the cluster.

To assess the overall health of the cluster ,look at the status of the cluster.

For more detailed analysis, some metrics can be viewed as graphs in the dashboard:

The 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 is independent of the region where the cluster is hosted.

note

For example, you have created a cluster in Tashkent, in pool uz-1. Tashkent is in the UTC+5 time zone. On the device from which you logged into the control panel, the time zone is set to UTC+3. The time on the metrics charts will be displayed in UTC+3.

View cluster status

  1. In the Dashboard, on the top menu, click Products and select Cloud Databases.

  2. Open the Active tab.

  3. In the cluster row, look at the status.

    ACTIVEThe cluster is available
    CREATINGA cluster is created
    UPDATINGChanges are applied to the cluster
    RESIZINGThe cluster is scalable
    ERRORThere was an error, create a ticket
    DISK FULLThe disk is full and the cluster is read-only. To make the cluster read-write, scale the cluster and select a configuration with a larger disk size
    DEGRADEDSome nodes in the cluster are unavailable
    DELETINGThe cluster is being deleted

View the status of the node cluster

  1. In the Dashboard, on the top menu, click Products and select Cloud Databases.
  2. Open the Active tab.
  3. Open the cluster page → Monitoring tab.
  4. In the Cluster Monitoring block, click Cluster Nodes.
  5. Select the nodes whose metrics you want to view.
  6. Look at the available metrics of the node cluster.

Cluster node metrics in the control panel

MemoryMemory utilization excluding cache and operating system buffers in percent or gigabytes
vCPUHow many percent of the node cluster cores are utilized
CPU iowaitHow much percent of the processor's time was spent waiting for I/O
Disk

Used disk space in percent or gigabytes. It takes into account the part of disk space reserved for service needs and not available for hosting databases. For more information about reserving disk space, see Using disk space in a MySQL sync cluster in this manual ...

Load Average

The average value of system load over a period of time. Shows how many processes are processed by the cluster cores. The indicator is presented in the form of three values — for one minute, five minutes and 15 minutes. These values should not be more than the number of cores on the node

OOM

Number of processes that terminated with an Out of Memory error due to lack of RAM

Disk load

Data read and write speed in KB/s or number of read and write operations per second

Network loadThe number of bits or packets sent and received over the network interface

View the status of the databases

  1. In the Dashboard, on the top menu, click Products and select Cloud Databases.
  2. Open the Active tab.
  3. Open the cluster page → Monitoring tab.
  4. In the Cluster Monitoring block, click Cluster.
  5. Select the nodes whose metrics you want to view.
  6. Take a look at the available database metrics.

Database metrics in the dashboard

Size of binlog filesTotal size of binlog files in bytes
Cache hit

Percentage of requests entering the cache

Temporary file sizeTotal size of temporary files in bytes
Slow queries

The number of slow queries per second. Slow queries are defined by the long_query_time parameter. You can change the value of the long_query_time parameter

Inquiries

The number of requests of a particular type per second:

  • DELETE;
  • INSERT;
  • SELECT;
  • UPDATE
Threads

The number of threads (tracks) inside MySQL:

  • Cached — number of tracks in the cache;
  • Connected — number of open connections;
  • Running — number of running tracks
Database sizeTotal size of the selected database in bytes

Export metrics in Prometheus format

Historical information for clusters is not available — metrics are requested only in real time. The list of all metrics that are supported in cloud databases and their description can be viewed in the Metrics table in Prometheus format.

  1. Get a token.
  2. Get the metrics in Prometheus format.

1. Get a token

The token gives access to the metrics of all project clusters in a single pool.

  1. In the Dashboard, on the top menu, click Products and select Cloud Databases.

  2. Open the Active tab.

  3. Open the cluster page → Monitoring tab.

  4. In the Tokens for Prometheus block, click Create token. The token will be generated automatically.

  5. Copy the token. To do this, clickin the token line.

2. Get metrics in Prometheus format

  1. Add the scrape_configs block to the Prometheus configuration file:

    scrape_configs:
    - job_name: get-metrics-from-dbaas
    scrape_interval: 1m
    static_configs:
    - targets:
    - '<domain>'
    scheme: https
    authorization:
    type: Bearer
    credentials: <token>

    Specify:

    • <domain> — domain of the Managed Databases API. This is the part of the URL to access the API without https:// and /v1 for example uz-1.dbaas.api.servercore.com. URL depends on region and pool. you can look in URL list;
    • <token> — the token you copied when receiving the token in step 5.
  2. Open a page in your browser where Prometheus-formatted metrics will be available:

    http://<ip_address>:9090/targets

    Specify <ip_address> — the IP address where Prometheus is installed.

  3. Independently configure 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 identifier in the ds_id label.

dbaas_memory_percentMemory utilization excluding cache and operating system buffers (RAM) in percent
dbaas_memory_bytesOccupied memory excluding cache and operating system buffers (RAM) in bytes
dbaas_oom_countNumber of processes that ended with an Out of Memory error due to lack of RAM
dbaas_cpuPercent vCPU utilization on database cluster nodes
dbaas_cpu_iowaitI/O waiting time in percent
dbaas_disk_percent

Occupied disk space in percent. It takes into account the part of disk space reserved for service needs and unavailable for database placement. For more information about reserving disk space, see Using disk space in the MySQL sync cluster in the instruction.

dbaas_disk_bytes

Occupied disk space in bytes. It takes into account the part of disk space reserved for service needs and not available for database placement. For more information about reserving disk space, see Using disk space in a MySQL sync cluster in the instruction.

dbaas_disk_read_iopsNumber of read operations per second
dbaas_disk_write_iopsNumber of recording operations per second
dbaas_disk_read_bytesDisk read speed in bytes per second
dbaas_disk_write_bytesData write speed to disk in bytes per second
dbaas_node_load1The average value of system load in one minute. Shows how many processes are processed by the cluster cores
dbaas_node_load5The average system utilization over five minutes. Shows how many processes are processed by the cluster cores
dbaas_node_load15The average value of system load over 15 minutes. Shows how many processes are processed by the cluster cores
dbaas_network_receive_bytesNumber of bytes received through the network interface
dbaas_network_transmit_bytesNumber of bytes sent through the network interface
dbaas_network_receive_packetsNumber of packets received through the network interface per second
dbaas_network_transmit_packetsNumber of packets sent through the network interface per second
dbaas_role

Role of the node:

  • 0 — role unknown;
  • 1 — master;
  • 2 — replica