eG Monitoring
 

Measures reported by MySQLGenLogTest

The general query log is a general record of what mysqld (a single multi-threaded program that does most of the work in a MySQL installation) is doing. The server writes information to this log when clients connect or disconnect, and it logs each SQL statement received from clients. The general query log can be very useful when you suspect an error in a client and want to know exactly what the client sent to mysqld.

When the general query log is enabled, the server writes output to any of the destinations specified by the log_output system variable. If you enable the log, the server opens the log file and writes startup messages to it.

In environments where hundreds of clients connect to the target database server, frequent errors encountered by the clients while connecting/disconnecting to the server may often lead to performance issues. To debug such issues, administrators should enable the general query log and keep track on the growth rate of the log. The MySQLGenLogTest test helps administrators in keeping a constant vigil on the general query log.

This test periodically monitors the general query log of the target database server and reports whether/not the general query log is enabled. This test also reports the total file size of the general query log and the growth rate of the log file. Using this test, administrators can quickly determine abnormal growth patterns of the general query log.

Outputs of the test: One set of results for the target database server instance being monitored

The measures made by this test are as follows:

Measurement Description Measurement Unit Interpretation
Is_enabled Indicates whether/not the general query log is enabled. Number The values reported by this measure and its numeric equivalents are mentioned in the table below:

Measure Value Numeric Value
Yes 1
No 0
Note:

By default, this measure reports the Measure Values listed in the table above to indicate whether/not the general query log is enabled. The graph of this measure however, is represented using the numeric equivalents only i.e., 0 or 1.

File_size Indicates the current size of the general query log. MB  
Growth_rate Indicates the rate at which the general query log file had grown during the last measurement period. MB/sec A high value for this measure or a consistent increase in its value indicates that the general query log is rapidly growing and may end up occupying too much space on the disk.