MySQL Error Log Test

The error log contains a record of mysqld startup and shutdown times. It also contains diagnostic messages such as errors, warnings, and notes that occur during server startup and shutdown, and while the server is running. For example, if mysqld notices that a table needs to be automatically checked or repaired, it writes a message to the error log. Depending on error log configuration, error messages may also populate the Performance Schema error_log table, to provide an SQL interface to the log and enable its contents to be queried. If the error log grows abnormally or if the administrators notice a sudden/abnormal increase in the count of errors/warnings logged in the error log, the performance of the target database server instance may go in for a toss. To ensure smooth functioning of the database server, administrators need to periodically check for the errors/warnings logged in the error log and initiate pre-emptive measures to fix them. For this purpose, administrators can use the MySQL Error Log test.

This test periodically monitors the error log of the target database server and reports the count of errors and warnings logged in the error log. This test also reports the total file size of the error log and the growth rate of the log file. Use the detailed diagnostics of this test to figure out when exactly were the errors/warnings noticed and what was the cause of such errors/warnings.

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

The IP address of the MySQL server.

Port

The port at which the specified host listens.

Database

Specify the name of a database on the target MySQL database server being monitored

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 here.

FilePath

Specify the full path to the error log file in the target MySQL database server instance. For example, in environments where the database server is installed on Linux, it can be: /var/log/mysql/error.log and in environments where the database server is installed on Microsoft Windows, it can be: C:/log/MySQL/error.log.

IsUTF16

If UTF-16 encoding is to be used for reading the specified log file, then, set the IsUTF16 flag to true. By default, this flag is set to false.

Detailed Diagnosis

To make diagnosis more efficient and accurate, the eG Enterprise embeds an optional detailed diagnostic capability. With this capability, the eG agents can be configured to run detailed, more elaborate tests as and when specific problems are detected. To enable the detailed diagnosis capability of this test for a particular server, choose the On option. To disable the capability, click on the Off option.

The option to selectively enable/disable the detailed diagnosis capability will be available only if the following conditions are fulfilled:

  • The eG manager license should allow the detailed diagnosis capability
  • Both the normal and abnormal frequencies configured for the detailed diagnosis measures should not be 0.
Measurements made by the test
Measurement Description Measurement Unit Interpretation

Error count

Indicates the number errors logged in the error log.

Number

The detailed diagnosis of this measure lists the Error time, Warning Time and the Message relevant to the error.

Warning count

Indicates the number of warnings logged in the error log.

Number

The detailed diagnosis of this measure lists the Error time, Warning Time and the Message relevant to the warning.

File size

Indicates the current size of the error log.

MB

 

Growth rate

Indicates the rate at which the error 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 error log is rapidly growing and may end up occupying too much space on the disk.