The locations of the agent log files are as follows:
Windows – C:\Program
Files\MySQL\Enterprise\Agent\mysql-monitor-agent.log
Unix –
/opt/mysql/enterprise/agent/mysql-monitor-agent.log
Mac OS X –
/Applications/mysql/enterprise/agent/mysql-monitor-agent.log
On any platform, the location of the agent log file may be
changed. You may also change the name of the log file. To confirm
the location and the name, check the settings in the
mysql-monitor-agent.ini
file.
The maximum size of a log file may be limited to 2GB. If MySQL Enterprise Monitor Agent is unable to add information to the configured logfile, then information will instead be sent to the standard output.
Because the size of the log files can become quite large, you can use a tool such as logrotate (Unix/Linux) or logadm (Solaris) to automatically rotate the logs. For example, a sample logrotate definition is shown below:
/opt/mysql/enterprise/agent/mysql-monitor-agent.log { rotate 5 daily minsize 1G postrotate /usr/bin/killall -HUP mysql-monitor-agent endscript }
The above will rotate the log before it reaches 1GB in size, keeping up to 5 files at a time.
If you want to use your own system, you can copy the log file,
flush the contents, and then send the SIGHUP
signal to the agent process. On Windows, you need to shutdown,
copy the log, and restart the agent.
The locations of the agent pid
files are as
follows:
Windows – C:\Program
Files\MySQL\Enterprise\Agent\agent\mysql-monitor-agent.pid
Unix –
/opt/mysql/enterprise/agent/mysql-monitor-agent.pid
Mac OS X –
/Applications/mysql/enterprise/agent/mysql-monitor-agent.pid
On any platform, the location of the agent log file may be
changed. You may also change the name of the log file. To confirm
the location and the name, check the settings in the
mysql-monitor-agent.ini
file.