MySQL
MySQL Integration - Setup & Installation Docs | Middleware
The MySQL Integration allows you to ingest and monitor the performance and health metrics of your relational database management system (RDBMS) data. This integration is useful for identifying top SQL operations by row, tallying total requests to MySQL handlers, and tracking worker thread count.
Prerequisites
Middleware Host Agent (MW Agent) must be installed on your local machine. To install the MW Agent, see our Installation Guide.
Setup
Step 1: Create Database Credentials
Create a .yaml
file containing database credentials like the below example. If the database is not password protected, the username
and password
fields can be removed.
/home/ubuntu/mysql-creds.yaml
mysql:
endpoint: localhost:3306
username: mysql
password: mysql
/var/log
directory. Step 2: Access Integrations
Log in to Middleware, navigate to the Installations Page in the bottom left corner, select All Integration and click MySQL
Step 3: Enable Integration
Add a host machine from the dropdown list, input the credential path from Step 1, and Save
Visualize Analytics
Default MySQL Dashboard
Once the MySQL integration setup is complete, a new MySQL-specific dashboard will appear in the Dashboard Builder. This default dashboard serves as a jumping off point for visualizing and analyzing MySQL data.
Create MySQL Widget
MySQL data can be added to dashboards as a custom widget. When adding a new widget, select the mysql
data source to view a full list of available MySQL data.
Alerts
Alerts can be configured for any MySQL metrics. When creating a new rule select the Database detection method and MySQL database type for available metrics to appear in the Metrics dropdown list. Select the desired metric and continue configuring the alert conditions.
Metrics Collected
Metric | Description |
---|---|
mysql.buffer_pool.pages | Number of pages in the InnoDB buffer pool |
mysql.buffer_pool.data_pages | Number of data pages in the InnoDB buffer pool |
mysql.buffer_pool.page_flushes | Number of requests to flush pages from the InnoDB buffer pool |
mysql.buffer_pool.operations | Number of operations on the InnoDB buffer pool |
mysql.buffer_pool.limit | Configured size of the InnoDB buffer pool |
mysql.buffer_pool.usage | Number of bytes in the InnoDB buffer pool |
mysql.commands | Count of commands executed, per command type |
mysql.prepared_statements | Count of prepared statements executed, per statement type |
mysql.handlers | Number of requests to MySQL handlers |
mysql.double_writes | Number of writes to the InnoDB doublewrite buffer |
mysql.log_operations | Number of InnoDB log operations |
mysql.operations | Number of InnoDB operations |
mysql.page_operations | Number of InnoDB page operations |
mysql.table.io.wait.count | Total count of I/O wait events for a table |
mysql.table.io.wait.time | Total time of I/O wait events for a table |
mysql.index.io.wait.count | Total count of I/O wait events for an index |
mysql.index.io.wait.time | Total time of I/O wait events for an index |
mysql.row_locks | Number of InnoDB row blocks |
mysql.row_operations | Number of InnoDB row operations |
mysql.locks | Number of MySQL locks |
mysql.sorts | Number of MySQL sorts |
mysql.threads | State of MySQL threads |
mysql.locked_connects | Number of attempts to connect to locked user accounts |
mysql.opened_resources | Number of opened resources |
mysql.mysqlx_connections | Number of mysqlx connections |
mysql.tmp_resources | Number of created temporary resources |
mysql.table.lock_wait.read.count | Count of lock wait read events |
mysql.table.lock_wait.read.time | Total lock wait read event time |
mysql.table.lock_wait.write.count | Count of lock wait write events |
mysql.table.lock_wait.write.time | Total lock wait write event time |
mysql.locked_connects | Number of attempts to connect to locked user accounts |
mysql.connection.count | Total number of connection attempts to the MySQL server (includes successful and unsuccessful attempts) |
mysql.connection.errors | Client connection process errors |
mysql.mysqlx_connections | Number of mysqlx connections |
mysql.joins | Number of joins that perform table scans |
mysql.replica.time_behind_source | Actual replica delay, in seconds |
mysql.replica.sql_delay | Configured replica delay, in seconds |
mysql.statement_event.count | Count of statement events |
mysql.statement_event.wait.time | Total wait time of summarized timed events |
mysql.mysqlx_worker_threads | Number of worker threads available |
mysql.table_open_cache | Total number of hits, misses, and overflows for open table cache lookups |
mysql.query.client.count | Number of client statements executed by the server |
mysql.query.count | Total number of statements executed by the server |
mysql.query.slow.count | Number of slow queries |
Troubleshooting
Next Steps
- How to Create Alerts
- Dashboard Basics & Customization
- Custom Telemetry Ingestion
- Getting Started With Real User Monitoring (RUM)
- Data Ingestion APIs