MySQL General Log Test

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 MySQL General Log 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.

Target of the test : A MySQL server

Agent deploying the test : An internal/remote agent

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

Configurable parameters for the test

Parameter

Description

Test Period

How often should the test be executed

Host

Specify Host name of the server for which the test is to be configured in this text box.

Port

Specify the port to which the specified host listens in this text box.

Database(DB)

Specify the name of a database on the target MySQL database server being monitored in the Database text box.

Username and Password

The eG agent has to be configured with the credentials of a user who has server-wide Process and Select privileges on the monitored MySQL server. To know how to create such a user, refer to Pre-requisites for Monitoring the MySQL Server topic.

Confirm Password

Confirm the Password by retyping it in the Confirm Password text box.

Allow Public Key

By default, the Allow Public Key flag is set to No. But, if the specified USER is created with caching_sha2_password as the authentication plugin, then the eG agent can connect to the target database cluster using RSA public key. To this effect, you have to set Allow Public Key flag to Yes.

SSL

By default, the SSL flag is set to No, indicating that the target MySQL database server is not SSL-enabled by default. To enable the test to connect to an SSL-enabled MySQL database server , set the SSL flag to Yes.

Verify CA

If the eG agent is required to establish an encrypted connection with the target MySQL database server by authenticating the server's identity through verifying the server CA certificate, set Verify CA flag to Yes. By default, this flag is set to No.

Truststore Password

This parameter is applicable only if the Verify CA parameter is set to Yes. To verify the target server certificate, provide the password of the truststore file which contains the server CA certificate in the Truststore Password text box. By default, this parameter is set to none.

Confirm Password

Confirm the Password by retyping it in the Confirm Password text box.

Keystore Password

This parameter is applicable only if the Verify CA parameter is set to Yes. To establish a connection with the target MySQL database server , the eG agent needs to have access to the client certificate. For this provide the password of the keystore file which contains the client certificate in the Keystore Password text box. By default, this parameter is set to none.

Confirm Password

Confirm the Password by retyping it in the Confirm Password text box.

Measurements made by the test

Measurement

Description

Measurement Unit

Interpretation

Is logging 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.