It has been requested of me to combine multiple deviation rules in to on rule. The first one I have been asked to do is combine the rule DBSS - CPU Wait Baseline Deviation and the rule DBSS - I/O Wait Baseline Deviation. This rule should only trigger an alarm if both CPU Wait Baseline and I/O Wait Baseline are deviated. The problem is that I have no idea combine this:
result = Dbwc_Common_SQL_Server_ShouldRaiseBaselineAlarm_new(scope,"DBSS_wait_cpu_Baseline",2,false,"DBSS - CPU Wait Baseline Deviation");
result = Dbwc_Common_SQL_Server_ShouldRaiseBaselineAlarm_new(scope,"DBSS_wait_io_Baseline",3,false,"DBSS - I/O Wait Baseline Deviation");
I would appreciate any help or suggestions on this.
I've not tried this before but I would create an event-driven rule (on an alarm being raised) which checks:a) if the rule that raised the alarm is one of the two you mentionedb) if a) is true checks if an alarm exists for the other ruleI think you would also need to check that the rules were raised against the same object (i.e. database).
David Judge (Disclosure: I work for D Software the local office partner for Dell Software in EMEA's emerging markets)
I just checked, and both rules have the same scope "DBSS_Wait_Event_Category", so you can merge them into a new rule.
Copy one of them into e.g. "CUST - DBSS - CPU and IO Wait Baseline Deviation"
Then in the rule conditions use
result_CPU = ....
result_IO = ...
return (result_CPU && result_IO) // Last line, as a rule condition should return either "true" or "false"
Make sure all the rule variables are merged and adjust the related alarm messages
Thanks guys and sorry for the late response. I was able to use the above to create the rule and it seems to be firing alarms as expected.