MySQL monitoring.

Analyze performance of your MySQL database servers and stay on top of issues with the Site24x7 MySQL monitoring tool.

Configure MySQL plugin to monitor the performance metrics of your MySQL database. Ensure an efficient and easy to use MySQL databse monitoring experience through vital actionable information. Take informed troubleshooting decisions with our database monitoring service using critical metrics like connection usage, slow queries, reads/writes and lot more. Learn how the plugin works.

MySQL performance monitoring metrics:

Use our wide array of metrics and get notified of hazardous errors that require your attention. Keep track of unexpected trends through our metric graphs and troubleshoot as quickly as possible. Various out-of-the-box metrics we support are:

Connection Usage

Total connection count with respect to the percentage of maximum connections in the database. This information can be used to tune database connections for better performance.

Reads

Number of reads done in a MySQL server. Technically, it is the number of selected queries and number of query cache hits.

Writes

Number of writes done in a MySQL server. It is the sum of inserted queries, replaced queries, updated queries and deleted queries.

 MySQL Monitoring slow queries metric

Slow Queries

Number of slow queries running on the MySQL server. Slow queries generate excessive disk reads, memory and CPU usage.

Maximum Used Connections

Maximum number of connections at a given time, since the start of the server. If your server reaches the maximum connections limit, it will start to refuse additional connection requests.

Aborted Clients

The total number of connections that were aborted because the client died without closing the connection properly. If a client is unable to connect, the server increments the Aborted Connects status variable.

Aborted Connections

Number of failed attempts to connect to the MySQL server. If this counter is increasing, your clients are trying and failing to connect to the database.

Open Files

The number of files that are open. This count includes regular files opened by the server. It does not include other types of files such as sockets or pipes. Also, the count does not include files that storage engines open using their own internal functions rather than asking the server level to do so.

Running Threads

Number of threads that are currently running in the database. This number also signifies the total number of threads that are not sleeping.

Threads Connected

Number of currently open connections. It can also refer to the number of clients currently connected. If the value is zero or too high, something is wrong.

Temporary Threads Created

Number of internal temporary tables created by the MySQL server. If the value is high, you may want to increase the thread cache size value.

Temporary Tables Created on the Disk

The number of internal on-disk temporary tables created by the server while executing statements.


How it works?

  • Log-in to your Site24x7 account. Sign up here if you don't have one.
  • Download and install the latest version of Site24x7 Linux Agent
  • Install the MySQL plugin
  • The agent will execute the MySQL plugin and push the data to the Site24x7 server

Prerequisites:

  • Site24x7 MySQL plugin uses "pymysql" module to get the performance metrics of MySQL server

Note: Site24x7 Linux agent will automatically try to install "pymysql" using the "pip" command. If the installations fails, users can manually install the module following the steps mentioned under the section "How to install pymysql?".

How to install pymysql?

MySQL plugin installation:

  • Create a directory with the name "mysql", under Site24x7 Linux Agent plugin directory - /opt/site24x7/monagent/plugins/mysql
  • Download the file "mysql.py" from our GitHub repository and place it under the "mysql" directory
  • Commands to perform the above step:
  • cd /opt/site24x7/monagent/plugins/
    mkdir mysql
    cd mysql
    wget https://raw.githubusercontent.com/site24x7/plugins/master/mysql/mysql.py
  • Once the plugin file is downloaded, the agent will mark it up in the next data collection and you can view it in Site24x7 client

MySQL plugin configuration:

  • By default, the plugin will monitor MySQL instance that is configured on "localhost"
  • In order to change the monitoring configuration, go to plugins directory and edit the "#Config Section:" in mysql.py file
  • MySQL plugin file location - /opt/site24x7agent/monagent/plugins/mysql/mysql.py

    #Config Section:
    MYSQL_HOST = "localhost"
    MYSQL_PORT="3306"
    MYSQL_USERNAME="root"
    MYSQL_PASSWORD=""

Monitoring additional metrics:

  • To monitor additional metrics, edit the "mysql.py" file and add the new metrics that need monitoring
  • Increment the plugin version value in the file "mysql.py" to view the newly added metrics ( For e.g. change the default plugin version from PLUGIN_VERSION = "1" to "PLUGIN_VERSION = "2")

Related plugins:

  • Redis plugin - Monitor performance metrics of your Redis databases
  • MongoDB plugin - Monitor performance metrics of your MongoDB databases
  • Memcached plugin - Analyze performance of your Memcached server
  • Nagios plugin - Execute thousands of Nagios plugins in Site24x7 without the need of running a Nagios server
  • Out-of-the-box plugins - Monitor your entire app stack with our extensive list of integrations
  • Create custom plugins - Create custom Linux and Windows plugins and monitor custom attributes
Trusted

World's leading companies

Client

Don't have a Site24x7 account? Sign up now!