MySQL Server Slow Query Percent Monitor Monitor

  • ID:  Microsoft.MySQLServer.ManagedServer.Unix.SlowQueryPct.Monitor
  • Description:  MySQL Server Slow Query Percent Monitor
  • Target:  Monitored MySQL Server (Linux)
  • Enabled:  On Standard Monitoring

Operational States

Name State Description
Under Threshold Success Under Threshold
Over Warning Threshold Warning Over Warning Threshold
Over Error Threshold Error Over Error Threshold

Overridable Parameters

Parameter Name Default Value Description Override
Interval 300 Interval in seconds
Number of Samples 3 Number of Samples
Warning Threshold 15 Warning Threshold
Error Threshold 25 Error Threshold

Alert Details

Monitor State Message Priority Severity Auto Resolution
Over Warning Threshold (Warning) MySQL Server Slow Query Percent Medium Match Monitor Health Yes

Run As Profiles

Name
Default

Monitor Knowledgebase

Summary

The percent of MySQL Server slow queries compared to all queries. Slow queries are queries run on MySQL Databases that take longer than the global variable ‘long_query_time’. This monitor takes the number of slow queries from the global status variable ‘Slow_queries’ and divides by the number of queries from the global status variable ‘Queries’. For MySQL 5.0 and 5.1 the number of queries is the sum of the following global status variables: ‘Questions’, ‘Com_ping’ , ‘Com_statistics’, ‘Com_stmt_prepare’, ‘Com_stmt_close’, and ‘Com_stmt_reset’. The monitor threshold is analyzed against an average of values returned in polls to the agent where the Number of Samples parameter controls the number of samples included in the calculation of the average.

Causes

An unhealthy state indicates the percentage of queries that are greater than the global variable ‘long_query_time’ is high.

Resolutions

To address high percent of slow queries, slow queries can be determined by turning on slow query logging in the configuration file. This can be done by adding the following line along with a destination log file path under the instance group options: “log-slow-queries= file path to log”. Alternatively, the server can be started with the following option: “--log-slow-queries=file path to log”.

External References
This monitor does not contain any external references.

See Also for Open Source Software Preview Management Pack


Downloads for Open Source Software Preview Management Pack

AZURE OPTIMIZATION ASSESSMENT GET STARTED
MIGRATION TO AZURE GET STARTED
SYSTEM CENTER MIGRATION TO AZURE GET STARTED
MIGRATION TO AZURE FOR SQL AND WINDOWS 2008 GET STARTED