Efficient MySQL monitoring with Pandora FMS

Take full control of your MySQL databases from a centralized interface

Pandora FMS facilitates MySQL database monitoring from its Discovery Server, allowing you to monitor key metrics from a single intuitive web interface.

DB2

Get detailed metrics of your MySQL databases remotely without the need to install additional components on your servers

With the Pandora FMS MySQL Discovery plugin, you will be able to perform scheduled queries to analyze the performance and status of your environments, including the number of active connections, cache size, log usage percentage and more.

Why monitor MySQL databases?

active-alerts

Real-time problem prevention

Detect unexpected reboots, query bottlenecks and connection spikes before they affect the availability of your services.

continuous improvement

Managed and flexible scalability

Plan for the growth of your infrastructure by ensuring that your databases can handle future demands without interruption.

it monitoring solution

Resource and performance optimization

Monitor CPU usage, queries, caches and logs to ensure that your resources are being optimally utilized.

network monitoring solution

Centralized administration

Manage multiple MySQL instances and databases from a single platform, improving visibility and control.

Why is Pandora FMS the best option to monitor MySQL?

Pandora FMS offers a comprehensive solution for monitoring MySQL databases, combining flexibility, customization and centralized administration. From its ability to connect remotely to the possibility of customizing queries, Pandora FMS adapts perfectly to the needs of any IT infrastructure.

Remote connection without local agents

Monitor any MySQL database without the need to install additional components on the servers. Pandora FMS allows an efficient connection from your Discovery Server, simplifying the implementation and guaranteeing quick access to the most relevant metrics.

Efficient management of multiple instances

Monitor several MySQL databases simultaneously, assigning customized metrics and intervals according to the criticality of each instance. Pandora FMS also allows you to manage different environments with segmented visibility for groups or clients, offering a centralized and flexible solution.

Configurable real-time alerts

Receive immediate and concise notifications by email, SMS, Telegram or chat tools when critical problems are detected. With Pandora FMS, you will always be informed of any important changes that may affect the performance of your MySQL databases.

Predefined metrics and custom queries

With Pandora FMS, you can select specific predefined metrics to monitor MySQL performance, such as the percentage of log used, active connections and query response time. Moreover, the possibility of adding customized queries allows you to adapt the monitoring to the particular needs of your environment, even reusing existing SQL scripts.

Centralized and adaptive control

Pandora FMS not only monitors MySQL databases; it also allows you to integrate the monitoring of other technologies such as DB2, Oracle, Microsoft SQL Server, as well as cloud services such as Google Cloud, AWS and Azure. This ensures complete visibility of your entire IT infrastructure from a single intuitive interface.

Simple configuration for MySQL monitoring

Configuring Pandora FMS to monitor MySQL databases is a fast and efficient process. Follow these steps from the Discovery Server:

1. Select MySQL
in the Discovery Server.

Access the menu Discovery > Applications and select MySQL to start the wizard. This initial step will allow you to configure the monitoring task.

select mysql
define mysql parameters

2. Define the basic parameters

Configure the essential data of the task:

  • Set a descriptive name to easily identify the task.
  • Assigns a group for the generated agents.
  • Set the appropriate monitoring interval (e.g., every 5 or 15 minutes).

3. Enter credentials and configure servers

Adds the credentials needed to connect to MySQL databases. In addition, define a list of servers using the IP:PORT/SID or IP/SID format, allowing you to manage multiple instances from a single task. Advanced options:

  • Configure the number of threads to optimize execution in multi-server environments.
  • Customize the name of the agent that will store the metrics, as well as other settings, such as the use of a proxy for the connection.
mysql credentials
customize mysql metrics

4. Customize metrics and queries

Select the most relevant predefined metrics or add customized queries to adapt the monitoring to the specific objectives of your environment. If you have your own SQL scripts, Pandora FMS allows you to easily integrate them into the Discovery Server to maximize customization. It also allows you to define an agent name to store the monitoring, and a prefix for the modules generated by the task.

5. Consult the scheduled tasks

Once the task is configured, access the list of scheduled tasks. From this section you will be able to:

  • Review the current status of the task.
  • Access detailed summaries of connected servers.
  • Force the execution of real-time updates if necessary.
mysql tasks
mysql agents and modules

Detailed results

Agents and modules created by the plugin

Global agent: This agent will consolidate general statistics of the monitored databases.

Agent for each database: Each MySQL instance will have its own agent, including specific modules according to the configuration made.

Metrics generated

The task will create an agent for each target database. That agent will contain the following modules:

If engine_uptime is activated

restart_detection

It will be 0 if an unexpected restart has been detected, and 1 if this is not the case. When a server reboots unexpectedly, there may be an interruption in database access and potentially lost transactions or incorrectly saved data.

If query_stats is enabled

queries

Number of total consultations. Monitoring queries is essential for understanding the workload running on the server and assessing overall system performance. By monitoring the total number of queries, you can identify spikes in activity, optimize performance and detect potential problems, such as inefficient or excessive queries.

query rate

Consultation rate. The query rate refers to the speed at which queries are being executed on the MySQL server. Monitoring the query rate allows you to evaluate the server workload in real time and detect usage patterns. A high query rate may indicate a high demand for resources and require server configuration adjustments or hardware upgrades to maintain optimal performance. On the other hand, a low query rate may indicate underutilization of available resources or application performance problems.

query select

Number of SELECT queries. SELECT queries are used to retrieve data from the database. Monitoring SELECT queries allows you to evaluate query efficiency and index optimization. By identifying slow or inefficient SELECT queries, you can take steps to improve their performance, such as adding appropriate indexes, optimizing queries, or adjusting server settings.

query update

Number of UPDATE queries. UPDATE queries are used to modify existing data in the database. Monitoring UPDATE queries is important to evaluate the frequency and efficiency of data updates. You can identify UPDATE queries that affect a large number of rows or have a significant impact on server performance. This allows you to optimize queries, review the structure of tables or take measures to reduce the load generated by updates.

query delete

Number of DELETE queries. DELETE queries are used to remove data from the database. Monitoring DELETE queries is useful for evaluating the frequency and efficiency of data deletions. You can identify DELETE queries that affect a large number of rows or have a significant impact on server performance. This allows you to optimize queries, review the table structure or take measures to reduce the load generated by deletes.

query insert

Number of INSERT queries. INSERT queries are used to insert new data into the database. Monitoring INSERT queries allows you to evaluate the frequency and efficiency of data insertions. You can identify INSERT queries that are generating a high load on the server or that could be causing performance problems. This allows you to optimize queries, review table structure or consider deferred insert strategies to improve performance in high concurrency environments.

If analyze_connections is enabled

current connections

Number of current connections. The number of current connections refers to the number of simultaneous connections established with the MySQL server at a given time. It is essential to monitor this value to ensure that the server can handle the current workload. If the number of current connections is close to the maximum number of connections allowed, new users or applications may not be able to connect properly. It is also important to check for an unusual increase in connections, which could indicate a performance problem or possible malicious activity.

connections ratio

Ratio of connections. The connection ratio refers to the frequency with which connections are established and closed on the MySQL server. Monitoring this value can help you identify usage patterns and activity peaks. A high connection ratio may indicate a high demand for resources and require actions such as adjusting the server configuration, increasing hardware capacity or revising the application design. On the other hand, a low connection ratio may suggest an underutilization of available resources.

aborted connections

Number of aborted connections. Aborted connections are those that are abnormally interrupted before completing their normal life cycle. This can occur due to network problems, authentication errors, inefficient queries or server configuration issues. Monitoring for aborted connections is critical to identifying and troubleshooting problems that can affect the stability and performance of the MySQL server. By detecting patterns of aborted connections, you can take corrective action and optimize your application or infrastructure to avoid unwanted outages.

If innodb_stats is enabled

Innodb buffer pool pages total

Total number of pages in the buffer pool (utilization). The InnoDB buffer is an essential part of the InnoDB storage architecture in MySQL. Monitoring the total number of pages in the InnoDB buffer is important to evaluate the efficiency of the buffer and its ability to store data in memory instead of having to access it from disk. A proper and well-tuned InnoDB buffer value can improve overall system performance by reducing the need to perform reads and writes to disk.

Innodb buffer pool read requests

Reading the innodb buffer pool. This metric indicates the number of times you have requested to read data from the InnoDB buffer. Monitoring InnoDB buffer read requests can help you assess the efficiency of the buffer and determine if the majority of reads are being serviced from memory or if there is a high load of reads from disk. A high number of InnoDB buffer read requests can indicate good memory utilization and better performance.

Innodb disk reads

Number of reading operations. Reads from disk in InnoDB refer to read operations that are performed directly from disk storage instead of using data stored in the InnoDB buffer. Monitoring reads from disk allows you to evaluate the efficiency of the InnoDB buffer and determine if too many reads from disk are being performed. A high number of reads from disk may indicate a need to adjust the InnoDB buffer size or improve query efficiency.

Innodb disk writes

Number of writing operations. Disk writes in InnoDB refer to write operations that are performed directly to disk storage. Monitoring disk writes is important to evaluate the write load and determine if too many write operations are being performed that may affect performance. A high number of writes to disk may indicate the need to optimize write operations or consider using techniques such as cache tuning or batch writing to improve performance.

Innodb disk data read

Amount of data read from the disk. This metric refers to the amount of data read from disk in InnoDB. Monitoring the amount of data read from disk helps you evaluate the performance and efficiency of read operations in InnoDB. A high volume of data read from disk may indicate a performance problem and the need to optimize queries or improve InnoDB buffer efficiency.

Innodb disk data written

Amount of data written to disk. This metric refers to the amount of data that has been written to disk in InnoDB. Monitoring the amount of data written to disk helps you evaluate the performance and efficiency of write operations in InnoDB. A high volume of data written to disk may indicate a high write load and the need to optimize write operations or consider techniques such as cache tuning or batch writing to improve performance.

If cache_stats is enabled

query cache enabled

Query cache enabled. The query cache in MySQL allows queries and their results to be stored in memory so that they can be reused if the exact same query is repeated. Monitoring whether the query cache is enabled or disabled is important to evaluate the impact of the cache on overall system performance. Query caching can improve performance by preventing repeated execution of identical queries, but it can also have a negative impact if queries change frequently or if the cache size is insufficient.

query hit ratio

Consultation hit ratio. The query hit ratio refers to the proportion of queries that have been resolved by the query cache compared to the total number of queries executed. Monitoring the query hit ratio allows you to evaluate the efficiency of the query cache and determine whether it is being used effectively. A high query hit ratio indicates good cache performance, while a low hit ratio may indicate that the cache is not optimized or that queries change frequently.

If engine_uptime is activated

restart_detection Will be 0 if an unexpected restart has been detected, and 1 otherwise. When a server restarts unexpectedly, there may be an interruption in database access and potentially transactions or data not saved correctly may be lost.

If query_stats is enabled

queries Number of total queries. Monitoring queries is essential for understanding the workload running on the server and assessing overall system performance. By monitoring the total number of queries, you can identify peaks of activity, optimize performance and detect potential problems, such as inefficient or excessive queries.
query rate Query rate. The query rate refers to the speed at which queries are being executed on the MySQL server. Monitoring the query rate allows you to evaluate the server workload in real time and detect usage patterns. A high query rate may indicate a high demand for resources and require server configuration adjustments or hardware upgrades to maintain optimal performance. On the other hand, a low query rate may indicate underutilization of available resources or application performance problems.
query select Number of SELECT queries. SELECT queries are used to retrieve data from the database. Monitoring SELECT queries allows you to evaluate query efficiency and index optimization. By identifying slow or inefficient SELECT queries, you can take steps to improve their performance, such as adding appropriate indexes, optimizing queries, or adjusting server settings.
query update Number of UPDATE queries. UPDATE queries are used to modify existing data in the database. Monitoring UPDATE queries is important to evaluate the frequency and efficiency of data updates. You can identify UPDATE queries that affect a large number of rows or that have a significant impact on server performance. This allows you to optimize queries, review the structure of tables or take measures to reduce the load generated by updates.
query delete Number of DELETE queries. DELETE queries are used to delete data from the database. Monitoring DELETE queries is useful for evaluating the frequency and efficiency of data deletions. You can identify DELETE queries that affect a large number of rows or have a significant impact on server performance. This allows you to optimize queries, review the table structure or take measures to reduce the load generated by deletes.
query insert Number of INSERT queries. INSERT queries are used to insert new data into the database. Monitoring INSERT queries allows you to evaluate the frequency and efficiency of data insertions. You can identify INSERT queries that are generating a high load on the server or that could be causing performance problems. This allows you to optimize queries, review table structure or consider deferred insert strategies to improve performance in high concurrency environments.

If analyze_connections is enabled

current connections Number of current connections. The number of current connections refers to the number of simultaneous connections established with the MySQL server at a given time. It is essential to monitor this value to ensure that the server can handle the current workload. If the number of current connections is close to the maximum number of connections allowed, new users or applications may not be able to connect properly. It is also important to check for an unusual increase in connections, which could indicate a performance problem or possible malicious activity.
connections ratio Connection ratio. The connections ratio refers to the frequency with which connections are established and closed on the MySQL server. Monitoring this value can help you identify usage patterns and activity peaks. A high connection ratio may indicate a high demand for resources and require actions such as adjusting the server configuration, increasing hardware capacity or revising the application design. On the other hand, a low connection ratio may suggest an underutilization of available resources.
aborted connections Number of aborted connections. Aborted connections are those that are abnormally interrupted before completing their normal life cycle. This can occur due to network problems, authentication errors, inefficient queries or server configuration problems. Monitoring for aborted connections is critical to identifying and troubleshooting problems that can affect the stability and performance of the MySQL server. By detecting patterns of aborted connections, you can take corrective action and optimize your application or infrastructure to avoid unwanted outages.

If innodb_stats is enabled

Innodb buffer pool pages total Total number of pages in the buffer pool (utilization). The InnoDB buffer is an essential part of the InnoDB storage architecture in MySQL. Monitoring the total number of pages in the InnoDB buffer pool is important to evaluate the efficiency of the buffer pool and its ability to store data in memory instead of having to access it from disk. A proper and well-tuned InnoDB buffer value can improve overall system performance by reducing the need to perform reads and writes to disk.
Innodb buffer pool read requests Reading from the innodb buffer pool. This metric indicates the number of times data has been requested to be read from the InnoDB buffer. Monitoring InnoDB buffer read requests can help you assess the efficiency of the buffer and determine if most reads are being serviced from memory or if there is a high load of reads from disk. A high number of InnoDB buffer read requests can indicate good memory utilization and better performance.
Innodb disk reads Number of read operations. InnoDB disk reads refers to read operations that are performed directly from disk storage instead of using data stored in the InnoDB buffer. Monitoring reads from disk allows you to evaluate the efficiency of the InnoDB buffer and determine if too many reads from disk are being performed. A high number of reads from disk may indicate a need to adjust the InnoDB buffer size or improve query efficiency.
Innodb disk writes Number of write operations. InnoDB disk writes refer to write operations that are performed directly to disk storage. Monitoring disk writes is important to assess the write load and determine if too many write operations are being performed that may affect performance. A high number of writes to disk may indicate the need to optimize write operations or consider using techniques such as cache tuning or batch writing to improve performance.
Innodb disk data read Amount of data read from disk. This metric refers to the amount of data read from disk in InnoDB. Monitoring the amount of data read from disk helps you evaluate the performance and efficiency of InnoDB read operations. A high volume of data read from disk may indicate a performance problem and the need to optimize queries or improve InnoDB buffer efficiency.
Innodb disk data written Amount of data written to disk. This metric refers to the amount of data that has been written to disk in InnoDB. Monitoring the amount of data written to disk helps you evaluate the performance and efficiency of write operations in InnoDB. A high volume of data written to disk may indicate a high write load and the need to optimize write operations or consider techniques such as cache tuning or batch writing to improve performance.

If cache_stats is enabled

query cache enabled Query cache enabled. The query cache in MySQL allows queries and their results to be stored in memory so that they can be reused if the exact same query is repeated. Monitoring whether the query cache is enabled or disabled is important to evaluate the impact of the cache on overall system performance. Query caching can improve performance by preventing repeated execution of identical queries, but it can also have a negative impact if queries change frequently or if the cache size is insufficient.
query hit ratio Query hit ratio. The query hit ratio refers to the proportion of queries that have been resolved by the query cache compared to the total number of queries executed. Monitoring the query hit ratio allows you to evaluate the efficiency of the query cache and determine whether it is being used effectively. A high query hit ratio indicates good cache performance, while a low hit ratio may indicate that the cache is not optimized or that queries change frequently.

The plugin will also create a module for each custom query defined in the configuration file.

metrics aws pfms 2

pandora fms resources

Want to learn more? Explore more resources

Support

Technical support: Personalized assistance to solve your doubts.

See more
Guide

User Guide: Learn how to get the most out of Pandora FMS.

See more
Blog

Blog article: Articles and tutorials on monitoring in multiple environments.

Read more
Please accept marketing cookies to watch this video.

Monitor DB2 databases remotely and without hassle

Pandora FMS facilitates the monitoring of DB2 databases from the Discovery Server, allowing to obtain a great amount of metrics through an intuitive web interface.