This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Can rules be created based on database group service?

We want to create database groups based on Tiers of importance.  We would create something like this:

I have concerns about creating rules on services because I have found reference to a document that states not to go more than three levels deep. 

According to the thread "Custom rule causing CPU issues", a search "within ^3" can be expensive in larger environment.

If anyone has access to the thread about the custom rule causing issues, can you send me an updated link?  The link seems to be broken.

 

What is considers 3 levels in a service?

 

For instance, I want to create alarms based on the jobs under the "Agent Job List" above?  I am alerting based on job related information?  Would this be too deep?  

  • Drilling down using the scripting tool, these seem to be the levels that I need to traverse (for instance) to retrieve job failure information.

    FSMService C-Tier1 (DBWC_GV_GroupIdentifier)
    definition NDB3006PDV.CSDEVEXT.CORP-PROEMSRL (DBSS_Clusters_Data)...
    instances VSQLNCS0161PDV-TSMON02 (vsqlncs0161pdv,DBSS_Instance)
    agent_job_list _Backup Failure Test (vsqlncs0161pdv,DBSS_Agent_Job_List)...
    job_name _Backup Failure Test

    Do these count as 5 levels so far?
  • Hi Randy,

    Have you tried creating a rule with scope something like this :

    DBSS_Agent_Job_List where $object within^inf (FSMService where name = 'C-Tier1')

    This scope will return all instances of DBSS_Agent_Job_List in all SQL Server instances under included in FSMService C-Tier1.

    Regards
  • Thanks again George. That works great when using the condition as part of the rule definition. What if I want to parse this as part of a rule variable? This is related to a previous post about setting up a rule for backup job failures. In that example, I was using a display name of some like C-TIER1-DBName. Now I am trying to setup a group called C-TIER1 and placing the DB under that group. Thus when the the rule is evaluated, I need to parse the group rather than the display name to set variables like email, etc. based on the values of the parsing. For example...I have a variable that does this:

    switch (scope.FSMService.name.split("-")[1]) {
    case "Tier1": Priority = 1
    break
    case "Tier2": Priority = 2
    break
    default: Priority = 3
    }
    return Priority;

    It's not returning anything so I think my scope is wrong. Do you have any suggestions?