Bug #58018 Changing a Heat Chart rule frequency can cause the Alerts to not function
Submitted: 5 Nov 2010 15:34 Modified: 4 Jan 2011 20:36
Reporter: Roger David Nay Email Updates:
Status: Closed Impact on me:
Category:MySQL Enterprise Monitor: Advisors/Rules Severity:S2 (Serious)
Version:2.2.3 OS:Any
Assigned to: Mark Leith CPU Architecture:Any

[5 Nov 2010 15:34] Roger David Nay
Changing a Heat Chart rule frequency such as 'MySQL Agent Not Reachable' to 00:05 causes the alert not to function, for both 'stop' (Info) and a kill (Critical) of the agent processes.

Setting the value back to 00:01, as 00:00 is not possible from the GUI, still does not show the 'stop' alert although for a kill of the agent processes the Alert works again.

How to repeat:
In manage rules set the 'MySQL Agent Not Reachable' frequency to 00:05 and then start an agent for a new server (or delete to rediscover) to pick up the Advisor.

Try using 'stop' or killing the agent processes and no Alert is triggered.

Set 'MySQL Agent Not Reachable' back to 00:01 and the Alert comes back only for the kill of the agent processes.

Suggested fix:
Disallow schedule changes for Heat Chart rules or make 00:05 and 00:01 and other frequencies work.
[5 Nov 2010 15:38] MySQL Verification Team
There is a workaround, change the default_frequency of the rule to 1 second in the mem.rules db and then restart the monitor processes to pick up the new value, Alerts should work again after that.

Rule should look like this to function.

> mysql> select * from rules where rule_id=3\G
> *************************** 1. row ***************************
rule_id: 3
advice: agent_not_reachable.advice
command: agent_not_reachable.command
default_frequency: 1000
description: agent_not_reachable.description
expression: (%agent.reachable% == THRESHOLD)
info: agent_not_reachable.info
name: agent_not_reachable.name
uuid: 0f8ed31d-2655-4848-af39-9069a5076653
version: 1.7

Frequency value in rule_schedules for the rule should be 'NULL' as well to pick up the default rules table value.
[12 Nov 2010 15:10] Enterprise Tools JIRA Robot
Mark Leith writes: 
Patch pushed to 2.3:

8246 Mark Leith	2010-11-12
     Bug#58018 / EM-5027 - Changing a Heat Chart rule frequency can cause the Alerts to not function
     - Move default frequency required checking from Schedule to Rule
     - Disable frequency inputs on both the current schedule and manage rules pages for rules that require default frequency
[18 Nov 2010 0:59] Enterprise Tools JIRA Robot
Andy Bang writes: 
In build
[18 Nov 2010 20:24] Enterprise Tools JIRA Robot
Marcos Palacios writes: 
Verified fixed in Monitor build
[4 Jan 2011 20:36] John Russell
Added to 2.3.1 change log:

Changing the frequency for the Heat Chart rule MySQL Agent Not
Reachable to anything other than the default 00:01 caused the alert
not to function.
[4 Jan 2011 20:38] John Russell
Added another sentence after discussion with Leith:

Now this rule cannot be changed to any different frequency.