Bug #44102 Modifying a certified rule make meaningless thresholds.
Submitted: 6 Apr 2009 3:13 Modified: 16 Jul 2009 15:46
Reporter: Meiji KIMURA Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Web Severity:S2 (Serious)
Version:2.0.5 OS:Any
Assigned to: Darren Oldag CPU Architecture:Any

[6 Apr 2009 3:13] Meiji KIMURA
Description:
I can modify a certified fule's default frequency and alert thresholds at Advisor->Manage rules.

When I modified frequency and save it, meaningless thresholds save. Thus meaningless alert reported after changing its frequency.

How to repeat:
(1) Schedule All replication rules(20-item) to servers of replication
(2) Select Advisor->Manage rules.
(3) Click 'edit' of 'Slave I/O Thread Not Running'.
(4) Change frequency from default(01:00) to 0:20
(5) Save it.
(6) Login to mem database of repository and check them.
2-meaningless altert were added (INFO, WARNING) for 'Slave I/O Thread Not Running'.

[Before Modification]
service_manager@localhost [mem]> select * from rules,rule_thresholds where rules.name like 'slave_%_running.name' and rules.rule_id = rule_thresholds.rule_id\G
*************************** 1. row ***************************
          rule_id: 88
           advice: slave_io_thread_not_running.advice
        certified: 
          command: slave_io_thread_not_running.command
default_frequency: 60000
      description: slave_io_thread_not_running.description
            dirty:
       expression: (%Slave_IO_Running% != THRESHOLD)
             info: slave_io_thread_not_running.info
             name: slave_io_thread_not_running.name
             uuid: fdff2f3a-9114-4b79-a266-200d489f03ab
          version: 1.5
     threshold_id: 148
            level: CRITICAL
            value: "Yes"
         variable: THRESHOLD
          rule_id: 88
*************************** 2. row ***************************
          rule_id: 92
           advice: slave_sql_thread_not_running.advice
        certified: 
          command: slave_sql_thread_not_running.command
default_frequency: 60000
      description: slave_sql_thread_not_running.description
            dirty:
       expression: (%Slave_SQL_Running% != THRESHOLD)
             info: slave_sql_thread_not_running.info
             name: slave_sql_thread_not_running.name
             uuid: 7a02ebe8-8b36-4ddc-86e1-c296a04b60fc
          version: 1.4
     threshold_id: 154
            level: CRITICAL
            value: "Yes"
         variable: THRESHOLD
          rule_id: 92
2 rows in set (0.00 sec)

[After Modification]
 1st and 3rd rules are meaningless alert.

service_manager@localhost [mem]> select * from rules,rule_thresholds where rules.name like 'slave_%_running.name' and rules.rule_id = rule_thresholds.rule_id\G
*************************** 1. row ***************************
          rule_id: 88
           advice: slave_io_thread_not_running.advice
        certified: 
          command: slave_io_thread_not_running.command
default_frequency: 120000
      description: slave_io_thread_not_running.description
            dirty: 
       expression: (%Slave_IO_Running% != THRESHOLD)
             info: slave_io_thread_not_running.info
             name: slave_io_thread_not_running.name
             uuid: fdff2f3a-9114-4b79-a266-200d489f03ab
          version: 1.5
     threshold_id: 210
            level: INFO
            value:
         variable: THRESHOLD
          rule_id: 88
*************************** 2. row ***************************
          rule_id: 88
           advice: slave_io_thread_not_running.advice
        certified: 
          command: slave_io_thread_not_running.command
default_frequency: 120000
      description: slave_io_thread_not_running.description
            dirty: 
       expression: (%Slave_IO_Running% != THRESHOLD)
             info: slave_io_thread_not_running.info
             name: slave_io_thread_not_running.name
             uuid: fdff2f3a-9114-4b79-a266-200d489f03ab
          version: 1.5
     threshold_id: 211
            level: CRITICAL
            value: "Yes"
         variable: THRESHOLD
          rule_id: 88
*************************** 3. row ***************************
          rule_id: 88
           advice: slave_io_thread_not_running.advice
        certified: 
          command: slave_io_thread_not_running.command
default_frequency: 120000
      description: slave_io_thread_not_running.description
            dirty: 
       expression: (%Slave_IO_Running% != THRESHOLD)
             info: slave_io_thread_not_running.info
             name: slave_io_thread_not_running.name
             uuid: fdff2f3a-9114-4b79-a266-200d489f03ab
          version: 1.5
     threshold_id: 212
            level: WARNING
            value:
         variable: THRESHOLD
          rule_id: 88
*************************** 4. row ***************************
          rule_id: 92
           advice: slave_sql_thread_not_running.advice
        certified: 
          command: slave_sql_thread_not_running.command
default_frequency: 60000
      description: slave_sql_thread_not_running.description
            dirty:
       expression: (%Slave_SQL_Running% != THRESHOLD)
             info: slave_sql_thread_not_running.info
             name: slave_sql_thread_not_running.name
             uuid: 7a02ebe8-8b36-4ddc-86e1-c296a04b60fc
          version: 1.4
     threshold_id: 154
            level: CRITICAL
            value: "Yes"
         variable: THRESHOLD
          rule_id: 92
4 rows in set (0.00 sec)

Suggested fix:
[Workaround]

N/A

[Suggested fix]
Don't make meaningless altert when saving.
[6 Apr 2009 7:31] Meiji KIMURA
Copying a certified rule also make meaningless thresholds.

Please confirm after making some patch for this problem.

[Workaround]

DELETE meaningless thresholds from rule_thresholds.
It seems to work well, but is there any sub-effect?

[Suggested Fix]

If null string is specified as a threshold, delete the row of rule_threshold for it.
[28 Apr 2009 20:08] Andy Bang
The issue here is that before editing the rule it has one threshold (CRITICAL, with value = "Yes"), but after editing just the frequency, the rule ends up with 3 entries in the rule_thresholds table.  The CRITICAL with value = "Yes" threshold is still there, but now we also have entries for INFO and WARNING, with empty values.

I'm not sure if the cause of the problem is server-side or GUI-side, so I'm assigning to Oldag who will know.
[4 May 2009 23:32] Keith Russell
Patch installed in versions => 2.1.0.1036.
[1 Jun 2009 20:46] Marcos Palacios
Verified fixed in build 2.1.0.1053.
[16 Jul 2009 15:46] Tony Bedford
An entry was added to the 2.1.0 changelog:

When the frequency for a rule was changed in Advisors, Manage Rules, edit, incorrect thresholds were saved, leading to erroneous alerts.