A.2.1 Agent Log Files

The Agent has two log files. mysql-monitor-agent.log is the general log, and mysql-monitor-agent-full.log is the full log that also contains stack traces that are useful to the Support team.

The default path to the Agent log files are as follows:

  • Windows Path: C:\Program Files\MySQL\Enterprise\Agent\logs\

  • Linux Path: /opt/mysql/enterprise/agent/logs/

  • macOS Path: /Applications/mysql/enterprise/agent/logs/

The log files are managed with log4j, which is configured using log4j2.xml. The Agent watches for changes every 30 seconds, and updates MySQL Enterprise Monitor accordingly. The default file location:

  • Windows Path: C:\Program Files\MySQL\Enterprise\Agent\etc\log4j2.xml

  • Linux Path: /opt/mysql/enterprise/agent/etc/log4j2.xml

  • macOS Path: /Applications/mysql/enterprise/agent/etc/log4j2.xml

The maximum size of a log file may be limited to 2GB. If MySQL Enterprise Monitor Agent cannot add information to the configured log file, information is sent to the standard output instead.

Because the log files can become large, you could rotate the logs by defining log4j options. For example, to implement a rotation of 10 x 10MB log files:

<Policies>
    <SizeBasedTriggeringPolicy size="10 MB">
</Policies>
<DefaultRolloverStrategy max="10"/>

For additional information about log4j, read the log4j documentation at http://logging.apache.org/log4j/.