Introduction
MySQL is a widely used relational database management system known for its performance, reliability, and ease of use. It is commonly used in various applications ranging from web applications to enterprise-level databases.
To monitor the MySQL efficiently, OpenTelemetry MySQL Receiver can be used to fetch key MySQL performance metrics.
Kubernetes 2.0 ConfigMap
Users should update or append the existing ConfigMap named opsramp-workload-metric-user-config
by adding application-specific fields. These fields may include authentication credentials, collection frequency, and other relevant configurations.
apiVersion: v1
kind: ConfigMap
metadata:
name: opsramp-workload-metric-user-config
namespace: opsramp-agent
data:
workloads: |
mysql:
- name: mysql1
userName:
source: value
value: username
password:
source: value
value: password
port:
source: value
value: '3306'
targetPodSelector:
matchLabels:
- key: app
operator: exists
value:
- mysql
Supported Metrics
Supported metrics for this workload as provided by the Kubernetes 2.0 Agent.
Metric | Description |
---|---|
mysql_buffer_pool_data_pages | Number of data pages in the MySQL buffer pool. |
mysql_buffer_pool_operations | Total number of operations performed on the MySQL buffer pool. |
mysql_buffer_pool_page_flushes | Number of page flush operations performed on the MySQL buffer pool. |
mysql_buffer_pool_pages | Total number of pages in the MySQL buffer pool. |
mysql_buffer_pool_usage | Percentage of the MySQL buffer pool that is currently in use. |
mysql_double_writes | Number of double writes performed in MySQL, typically related to crash recovery operations. |
mysql_handlers | Number of handler operations performed by MySQL (e.g., read, write, etc.). |
mysql_locks | Total number of locks held by MySQL. |
mysql_log_operations | Total number of operations performed on the MySQL transaction log. |
mysql_mysqlx_connections | Total number of active MySQL X protocol connections. |
mysql_opened_resources | Number of resources (e.g., tables, files) opened by MySQL. |
mysql_operations | Total number of operations executed by MySQL (queries, etc.). |
mysql_page_operations | Number of operations involving pages in MySQL (e.g., read/write operations on pages). |
mysql_prepared_statements | Number of prepared statements in MySQL. |
mysql_row_locks | Total number of row-level locks acquired by MySQL. |
mysql_row_operations | Total number of row-level operations (inserts, updates, deletes) performed by MySQL. |
mysql_sorts | Total number of sort operations performed by MySQL. |
mysql_threads | Total number of threads currently active in MySQL. |
mysql_tmp_resources | Total number of temporary resources used by MySQL (e.g., temporary tables, files). |
mysql_uptime | Time (in seconds) that the MySQL server has been running since the last restart. |