Bug #45041 Corner case - Agent logs example and explain options as true but quan is false
Submitted: 22 May 2009 18:08 Modified: 20 Aug 2009 17:26
Reporter: Diego Medina Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor Severity:S3 (Non-critical)
Version:2.1.0.1046 OS:Any
Assigned to: MC Brown CPU Architecture:Any

[22 May 2009 18:08] Diego Medina
Description:
You enable Query Analyzer on the UI, selecting all 3 options (Query Analyzer, example and explain)

You then un-select the first option on the UI (Query Analyzer) and the other two options become greyed out.

But the agent will log

(critical) (share/mysql-proxy/items/quan.lua:528) setting .analyze_queries for c6f05d23-1c04-4879-8cda-fbbf36c6445b to false
(critical) (share/mysql-proxy/items/quan.lua:532) setting .auto_explain for c6f05d23-1c04-4879-8cda-fbbf36c6445b to true
(critical) (share/mysql-proxy/items/quan.lua:536) setting .analyze_worst_queries for c6f05d23-1c04-4879-8cda-fbbf36c6445b to true

* Note 1: the first false option and the other two are true
* Note 2: The agent does not collect the explain nor the example while the main option is disabled. (which is a good thing)

How to repeat:
1 - Install and start the service manager and agent
2- Go to the UI->Query Analyzer tab  and enable quan by selecting all 3 options (Query Analyzer, example and explain)
3- Look at the agent log and you will see 

(critical) (share/mysql-proxy/items/quan.lua:528) setting .analyze_queries for c6f05d23-1c04-4879-8cda-fbbf36c6445b to true
(critical) (share/mysql-proxy/items/quan.lua:532) setting .auto_explain for c6f05d23-1c04-4879-8cda-fbbf36c6445b to true
(critical) (share/mysql-proxy/items/quan.lua:536) setting .analyze_worst_queries for c6f05d23-1c04-4879-8cda-fbbf36c6445b to true

4- stop the agent
5- On the UI->Query analyzer tab, unselect the first option (Query Analyzer) and see the other two options greyed out.
6- Start the agent
7- Look at the agent logs, and you will see

(critical) (share/mysql-proxy/items/quan.lua:528) setting .analyze_queries for c6f05d23-1c04-4879-8cda-fbbf36c6445b to false
(critical) (share/mysql-proxy/items/quan.lua:532) setting .auto_explain for c6f05d23-1c04-4879-8cda-fbbf36c6445b to true
(critical) (share/mysql-proxy/items/quan.lua:536) setting .analyze_worst_queries for c6f05d23-1c04-4879-8cda-fbbf36c6445b to true

Suggested fix:
Not sure who will fix this, the agent team, UI, server ?
[20 Aug 2009 17:26] MC Brown
The current documentation is correct on the setting of these options.

I've added a note to the 2.1 changelog identifying the log problems: 

When disabling Query Analyzer while the two sub-options remain enabled for an individual agent, the analyzer, explain and other options would be logged by the agent as critical errors. Now, only the disabling of Query Analyzer is logged as a critical error. The Example Query and Example Explain options are reported as info errors.