This section describes different kinds of issues that you might experience with the MySQL Query Analyzer, and how to solve or avoid them.
If the Query Analyzer page shows no queries or a smaller range than you expect, confirm that your system is correctly configured for Query Analysis:
The Query Analyzer must be enabled for each monitored host; it is not enabled by default. Click the configure query analyzer button on the Query Analyzer page to check. For more information, see Section 3.2.3, “Query Analyzer Settings”.
Confirm that the agent is running by checking the Agent log and the status of the server within MySQL Enterprise Service Manager.
Confirm the following in the agent configuration files:
pluginsparameter within the main configuration file,
mysql-monitor-agent.ini, must contain the
agent-item-filesparameter within the main configuration file,
mysql-monitor-agent.ini, must specify the
agent-item-files = share/mysql-monitor-agent/items/quan.lua, share/mysql-monitor-agent/items/items-mysql-monitor.xml
The proxy configuration parameters must point to the MySQL server where you want your queries to be sent. For example, if you are running your agent on the same host as your MySQL server then you might have the following lines in your
proxy-address=:6446 proxy-backend-addresses = 127.0.0.1:3306 proxy-lua-script = lib/mysql-monitor-agent/lua/quan.lua
The above configuration means:
You can see a sample complete configuration file (
mysql-monitor-agent.ini), using the
127.0.0.1as the MySQL backend server, and reporting to a MySQL Enterprise Service Manager called
[mysql-proxy] plugins=proxy,agent agent-mgmt-hostname = http://agent:password@monitor:18080/heartbeat mysqld-instance-dir= etc/instances agent-item-files = share/mysql-monitor-agent/items/quan.lua, share/mysql-monitor-agent/items/items-mysql-monitor.xml proxy-address=:6446 proxy-backend-addresses = 127.0.0.1:3306 proxy-lua-script = lib/mysql-monitor-agent/lua/quan.lua agent-uuid = a3113263-4993-4890-8235-cadef9617c4b log-file = mysql-monitor-agent.log pid-file=/opt/mysql/enterprise/agent/mysql-monitor-agent.pid
Confirm that you can connect through the agent proxy to your backend MySQL server. You can do this by checking with the MySQL client. You must specify the same options as you would if you were connecting to the original server, including specifying the same user and password information:
shell> mysql -h 127.0.0.1 --port 6446 --user=root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 299239 Server version: 5.0.60-log Gentoo Linux mysql-5.0.60-r1 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql>
Check that your MySQL client application is configured to use the configured proxy port, instead of the real MySQL port when sending queries.
If your Query Analyzer graphs stop working or contain gaps showing no activity, look in the Service Manager log for the message
An item was expired by the cache while it was locked (increase your cache timeout). For the action to take, see Section 2.11, “Troubleshooting the MySQL Enterprise Monitor User Interface”.