MySQL monitoring

SkyWalking leverages prometheus/mysqld_exporter for collecting metrics data from MySQL. It leverages OpenTelemetry Collector to transfer the metrics to OpenTelemetry receiver and into the Meter System.

Data flow

  1. mysqld_exporter collect metrics data from MySQL.
  2. OpenTelemetry Collector fetches metrics from mysqld_exporter via Prometheus Receiver and pushes metrics to SkyWalking OAP Server via the OpenCensus GRPC Exporter.
  3. The SkyWalking OAP Server parses the expression with MAL to filter/calculate/aggregate and store the results.

Set up

  1. Set up mysqld_exporter.
  2. Set up OpenTelemetry Collector . For details on Prometheus Receiver in OpenTelemetry Collector, refer to here.
  3. Config SkyWalking OpenTelemetry receiver.

MySQL Monitoring

MySQL monitoring provides monitoring of the status and resources of the MySQL server. MySQL server as a Service in OAP, and land on the Layer: MYSQL.

MySQL Supported Metrics

Monitoring PanelUnitMetric NameDescriptionData Source
MySQL Uptimedaymeter_mysql_uptimeThe MySQL startup timemysqld_exporter
Max Connectionsmeter_mysql_max_connectionsThe max number of connections.mysqld_exporter
Innodb Buffer Pool SizeMBmeter_mysql_innodb_buffer_pool_sizeThe buffer pool size in Innodb enginemysqld_exporter
Thread Cache Sizemeter_mysql_thread_cache_sizeThe size of thread cachemysqld_exporter
Current QPSmeter_mysql_qpsQueries Per Secondmysqld_exporter
Current TPSmeter_mysql_tpsTransactions Per Secondmysqld_exporter
Commands Ratemeter_mysql_commands_insert_rate
meter_mysql_commands_select_rate
meter_mysql_commands_delete_rate
meter_mysql_commands_update_rate
The rate of total number of insert/select/delete/update executed by the current servermysqld_exporter
Threadsmeter_mysql_threads_connected
meter_mysql_threads_created
meter_mysql_threads_cached
meter_mysql_threads_running
The number of currently open connections(threads_connected)
The number of threads created(threads_created)
The number of threads in the thread cache(threads_cached)
The number of threads that are not sleeping(threads_running)
mysqld_exporter
Connectsmeter_mysql_connects_available
meter_mysql_connects_aborted
The number of available connections(connects_available)
The number of MySQL instance connection rejections(connects_aborted)
mysqld_exporter
Connection Errorsmeter_mysql_connection_errors_internal meter_mysql_connection_errors_max_connectionsErrors due to exceeding the max_connections(connection_errors_max_connections) Error caused by internal system(connection_errors_internal)mysqld_exporter
Slow Queries Ratemeter_mysql_slow_queries_rateThe rate of slow queriesmysqld_exporter

Customizations

You can customize your own metrics/expression/dashboard panel.
The metrics definition and expression rules are found in /config/otel-oc-rules/mysql.yaml.
The MySQL dashboard panel configurations are found in /config/ui-initialized-templates/mysql.