Collects MySQL performance and health metrics from a MySQL database.

Prerequisites

  1. Middleware Host agent should be already installed on your machine, in order to use MySQL integration.

Setup

  1. You will have to create a yaml file in your system containing database collection details, as follows:

Ex. /home/ubuntu/mysql-creds.yaml

mysql:
  endpoint: localhost:3306
  username: mysql
  password: mysql
You can skip the fields username and password, if your database doesn’t require authentication.
For Docker Agent Users: If you are running the Middleware Docker agent, then we recommend to keep the creds YAML under /var/log directory. This is because, the Docker agent might not support dynamic volume binding.
  1. Go to Store, Enable MySQL Integration, Select a host, and set YAML path to the file created in step 1.

Visualize Analytics

There are 2 possible ways to Visualize MySQL Analytics:

1. Middleware’s Default MySQL Dashboard

Once you’ve setup the MySQL Integration, You will be able to see different Analytics in the default MySQL Dashboard.

2. Create your own dashboard

You can create your own dashboard from scratch.

When you add a new widget to an existing dashboard, you’ll see a list of available MySQL metrics under the “mysql” Data source.

These metrics can be visualized in different widget types like Timeseries, Bar Chart, Pie Chart, etc.

Metrics collected

MetricDescription
mysql.buffer_pool.pagesThe number of pages in the InnoDB buffer pool.
mysql.buffer_pool.data_pagesThe number of data pages in the InnoDB buffer pool.
mysql.buffer_pool.page_flushesThe number of requests to flush pages from the InnoDB buffer pool.
mysql.buffer_pool.operationsThe number of operations on the InnoDB buffer pool.
mysql.buffer_pool.limitThe configured size of the InnoDB buffer pool.
mysql.buffer_pool.usageThe number of bytes in the InnoDB buffer pool.
mysql.commandsThe number of times each type of command has been executed.
mysql.prepared_statementsThe number of times each type of prepared statement command has been issued.
mysql.handlersThe number of requests to various MySQL handlers.
mysql.double_writesThe number of writes to the InnoDB doublewrite buffer.
mysql.log_operationsThe number of InnoDB log operations.
mysql.operationsThe number of InnoDB operations.
mysql.page_operationsThe number of InnoDB page operations.
mysql.table.io.wait.countThe total count of I/O wait events for a table.
mysql.table.io.wait.timeThe total time of I/O wait events for a table.
mysql.index.io.wait.countThe total count of I/O wait events for an index.
mysql.index.io.wait.timeThe total time of I/O wait events for an index.
mysql.row_locksThe number of InnoDB row locks.
mysql.row_operationsThe number of InnoDB row operations.
mysql.locksThe number of MySQL locks.
mysql.sortsThe number of MySQL sorts.
mysql.threadsThe state of MySQL threads.
mysql.locked_connectsThe number of attempts to connect to locked user accounts.
mysql.opened_resourcesThe number of opened resources.
mysql.mysqlx_connectionsThe number of mysqlx connections.
mysql.tmp_resourcesThe number of created temporary resources.
mysql.table.lock_wait.read.countThe total table lock wait read events.
mysql.table.lock_wait.read.timeThe total table lock wait read event times.
mysql.table.lock_wait.write.countThe total table lock wait write events.
mysql.table.lock_wait.write.timeThe total table lock wait write event times.
mysql.locked_connectsThe number of attempts to connect to locked user accounts.
mysql.connection.countThe number of connection attempts (successful or not) to the MySQL server.
mysql.connection.errorsErrors that occur during the client connection process.
mysql.mysqlx_connectionsThe number of mysqlx connections.
mysql.joinsThe number of joins that perform table scans.
mysql.replica.time_behind_sourceThis field is an indication of how “late” the replica is.
mysql.replica.sql_delayThe number of seconds that the replica must lag the source.
mysql.statement_event.countSummary of current and recent statement events.
mysql.statement_event.wait.timeThe total wait time of the summarized timed events.
mysql.mysqlx_worker_threadsThe number of worker threads available.
mysql.table_open_cacheThe number of hits, misses, or overflows for open tables cache lookups.
mysql.query.client.countThe number of statements executed by the server. This includes only statements sent by clients.
mysql.query.countThe number of statements executed by the server.
mysql.query.slow.countThe number of slow queries.
Need assistance or want to learn more about Middleware? Contact us at support[at]middleware.io.