Bug #40272 Proxy config included in INI file even if saying no to "Enable Proxy"
Submitted: 23 Oct 2008 2:27 Modified: 11 Nov 2008 15:54
Reporter: Andy Bang Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Installing Severity:S3 (Non-critical)
Version:2.0.0.7078 OS:Any
Assigned to: BitRock Merlin CPU Architecture:Any

[23 Oct 2008 2:27] Andy Bang
Description:
If you uncheck the "Enable Proxy" checkbox on the "Query Analysis Configuration" screen, the agent's INI file still includes proxy configuration data and it is not commented out.

How to repeat:
1) Start the agent installer.
2) Uncheck the "Enable Proxy" checkbox on the "Query Analysis Configuration" screen.
3) Finish installation.
4) Review the etc/mysql-monitor-agent.ini file.  You'll see the following:

# WARNING - The UUID defined below must be unique for each agent.
#
# To use this INI file as a template for configuring additional
# agents, do not simply copy and start a new agent without first
# modifying the UUID and adjusting other parameters as necessary.
#
# WARNING - If you are upgrading from a previous 1.x release, please
# note that we have changed the contents of the agent INI file and
# split the contents across two files:
#
#   <installdir>/etc/mysql-monitor-agent.ini              - this file
#   <installdir>/etc/instances/mysql/agent-instance.ini   - new file
#
# Refer to the documentation for more detailed information and
# instructions.
# 
# Version: 2.0.0.7078

[mysql-proxy]

plugins=agent
agent-mgmt-hostname = http://agent:mysql@localhost:18080/heartbeat
mysqld-instance-dir= etc/instances
agent-item-files = share/mysql-proxy/items/quan.lua,share/mysql-proxy/items/items-mysql-monitor.xml
proxy-address=:4040
proxy-backend-addresses = 127.0.0.1:3306
proxy-lua-script        = share/mysql-proxy/quan.lua

agent-uuid = 2d8a59c2-71b2-4564-afa5-78eb44ab1e01
log-file = mysql-monitor-agent.log
pid-file=C:\\Program Files\\MySQL\\Enterprise\\Agent\\mysql-monitor-agent.pid

basedir=C:\\PROGRA~1\\MySQL\\ENTERP~1\\Agent

Note that proxy-address, proxy-backend-addresses, and proxy-lua-script parameters are included and not commented out.

Suggested fix:
It's actually nice that the information is there in case a customer wants to turn it on after installation, but it should be commented out.  Here are the changes we'd like to see if the "Enable Proxy" checkbox is unchecked:

1) Show, but comment out, the proxy-address, proxy-backend-addresses, and proxy-lua-script parameter.

2) Show, but comment out, the following line:

plugins=proxy,agent

3) Add the following comment in the header:

# NOTE - This Enterprise Service Agent is not configured to enable
# Query Analysis for the MySQL servers it is monitoring.  To enable
# Query Analysis:
#
#   1) Place a comment character (#) in front of plugins=agent
#   2) Remove the comment from the plugins=proxy,agent line
#   3) Remove the comment from all the proxy-xxx lines

Thus the contents of mysql-monitor-agent.ini in this case should be:

# WARNING - The UUID defined below must be unique for each agent.
#
# To use this INI file as a template for configuring additional
# agents, do not simply copy and start a new agent without first
# modifying the UUID and adjusting other parameters as necessary.
#
# WARNING - If you are upgrading from a previous 1.x release, please
# note that we have changed the contents of the agent INI file and
# split the contents across two files:
#
#   <installdir>/etc/mysql-monitor-agent.ini              - this file
#   <installdir>/etc/instances/mysql/agent-instance.ini   - new file
#
# Refer to the documentation for more detailed information and
# instructions.
# 
# NOTE - This Enterprise Service Agent is not configured to enable
# Query Analysis for the MySQL servers it is monitoring.  To enable
# Query Analysis:
#
#   1) Place a comment character (#) in front of plugins=agent
#   2) Remove the comment from the plugins=proxy,agent line
#   3) Remove the comment from all the proxy-xxx lines
# 
# Version: 2.0.0.7078

[mysql-proxy]

plugins=agent
#plugins=proxy,agent
agent-mgmt-hostname = http://agent:mysql@localhost:18080/heartbeat
mysqld-instance-dir= etc/instances
agent-item-files = share/mysql-proxy/items/quan.lua,share/mysql-proxy/items/items-mysql-monitor.xml
#proxy-address=:4040
#proxy-backend-addresses = 127.0.0.1:3306
#proxy-lua-script        = share/mysql-proxy/quan.lua

agent-uuid = 2d8a59c2-71b2-4564-afa5-78eb44ab1e01
log-file = mysql-monitor-agent.log
pid-file=C:\\Program Files\\MySQL\\Enterprise\\Agent\\mysql-monitor-agent.pid

basedir=C:\\PROGRA~1\\MySQL\\ENTERP~1\\Agent
[23 Oct 2008 2:30] Andy Bang
On further reflection it would be OK to do the following instead, which might be a bit easier:

# WARNING - The UUID defined below must be unique for each agent.
#
# To use this INI file as a template for configuring additional
# agents, do not simply copy and start a new agent without first
# modifying the UUID and adjusting other parameters as necessary.
#
# WARNING - If you are upgrading from a previous 1.x release, please
# note that we have changed the contents of the agent INI file and
# split the contents across two files:
#
#   <installdir>/etc/mysql-monitor-agent.ini              - this file
#   <installdir>/etc/instances/mysql/agent-instance.ini   - new file
#
# Refer to the documentation for more detailed information and
# instructions.
# 
# NOTE - This Enterprise Service Agent is not configured to enable
# Query Analysis for the MySQL servers it is monitoring.  To enable
# Query Analysis:
#
#   1) Change plugins=agent to plugins=proxy,agent
#   2) Remove the comment from all the proxy-xxx lines
# 
# Version: 2.0.0.7078

[mysql-proxy]

plugins=agent
agent-mgmt-hostname = http://agent:mysql@localhost:18080/heartbeat
mysqld-instance-dir= etc/instances
agent-item-files = share/mysql-proxy/items/quan.lua,share/mysql-proxy/items/items-mysql-monitor.xml
#proxy-address=:4040
#proxy-backend-addresses = 127.0.0.1:3306
#proxy-lua-script        = share/mysql-proxy/quan.lua

agent-uuid = 2d8a59c2-71b2-4564-afa5-78eb44ab1e01
log-file = mysql-monitor-agent.log
pid-file=C:\\Program Files\\MySQL\\Enterprise\\Agent\\mysql-monitor-agent.pid

basedir=C:\\PROGRA~1\\MySQL\\ENTERP~1\\Agent
[27 Oct 2008 10:48] BitRock Merlin
Patch sent to Keith.
[29 Oct 2008 19:15] Keith Russell
Patch applied in versions => 2.0.0.7086.
[30 Oct 2008 3:37] Marcos Palacios
Verified fixed in build 2.0.0.7087.
[11 Nov 2008 15:54] Tony Bedford
An entry was added to the 2.0 changelog:

If you unchecked the Enable Proxy checkbox on the Query Analysis Configuration screen, the agent's INI file still contained proxy configuration data and was not commented out.