Bug #28589 No way to totally disable, or downgrade, collections or frequencies
Submitted: 22 May 2007 11:00 Modified: 21 Jul 2008 16:12
Reporter: Mark Leith Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Server Severity:S2 (Serious)
Version:1.2.0 OS:Any
Assigned to: Darren Oldag CPU Architecture:Any

[22 May 2007 11:00] Mark Leith
Description:
Currently there is no way to downgrade a collection frequency, or stop a collection happening on the agent all together. This causes various problems - the most important being that if a customer starts a very resource intensive rule on a low frequency in error, and then tries to lower the frequency of it so that it is not run so often - this will not take effect. We simply carry on collecting at the lower frequency. 

How to repeat:
o Start a mysql server with --log-slow-queries --log-queries-not-using-indexes
o Set an agent to monitor this server
o Start all of the security rules (which scan some of the mysql.* tables) at 1 *minute* intervals
o Verify in the slow query log they are run once a minute
o Remove the security rules from the schedule
o Start all of the security rules at 1 *hour* intervals
o Check the slow query log (they will still be run every minute)

Suggested fix:
o If a schedule is removed - check to see whether the data collection can also be fully removed
o If a schedule has it's interval changed - check to see whether that interval will be the lowest again for all data collections, and modify the collection frequencies
[29 Mar 2008 22:41] Darren Oldag
fixed in 2.0 trunk.

now, DC schedules are tied to the rule schedule.  if they are shared between multiple rules, or multiple rules and graphs, then the greatest common denominator is used as the schedule frequency.

this works for any combination of scheduling, updating running frequencies, and/or unscheduling.  the entire set of related schedules is examined in each case and the server "does the right thing"
[10 Apr 2008 20:03] Marcos Palacios
Verified fixed on Windows bld 2.0.0.6008. Testing it on Linux.
[18 Jun 2008 22:24] Marcos Palacios
- Scheduled the rule 'Account Has An Overly Broad Host Specifier' from the 'Security' advisor with a 5 min frequency. 
- Then I changed the rule frequency to 2 minutes.
- The message in the agent log is:
2008-06-18 17:16:50: (message) changing data collection (task 268 (collect_mysql)) task frequency from 300 second to 0 seconds

Attaching agent log.
[18 Jun 2008 22:51] Marcos Palacios
Verified fixed in 2.0.0.6067 on OSX, RHEL4 and Windows.

Tracked the same task and I can see it works OK:
2008-06-18 17:16:19: (debug) job (task 268 (collect_mysql)) executes again in 300 sec
..
2008-06-18 17:16:50: (message) changing data collection (task 268 (collect_mysql)) task frequency from 300 second to 0 seconds
.. 
(took agent off for some time)
..
2008-06-18 17:39:32: (debug) job (task 268 (collect_mysql)) executes again in 120 sec
..
2008-06-18 17:40:00: (debug) job (task 268 (collect_mysql)) executes again in 120 sec
[21 Jul 2008 16:12] Tony Bedford
An entry has been added to the 2.0 changelog:

Monitor did not have a facility to stop or downgrade an agent collection frequency.
[12 Aug 2009 5:30] Roel Van de Paar
Also note bug #46667