This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Trigger for each group member in a group?

Hello,

As a test, I created a group with nodes as group members and set the logic for the alert to be that the Group Member Status is equal to Down.  This group contains 5 group members.  The alert triggers if one of the group members goes down, but what if a 2nd group member goes down before the 1st group member is back up or before the alert is acknowledged?  Is there a way to trigger the alert EACH time a group member goes down?  It doesn't have to apply to only groups of nodes, I want to do this with all kinds of object types.  Right now, this is what happens:

Test Group

Server1

Server2

Server3

Server4

Server5

Server1 goes down; alert trigger condition is true and email is sent for Server1 being down

Server2 goes down; no alert because the trigger condition is still true from Server1 being down still

I would like to see an alert for each time a group member goes down

Parents
  • I make an alert to email me if any group member status goes down (even when there were other nodes in the group that went down before), I write my solution and wish it can help you.

    0.JPG

    1. Make a custom property for groups as text. (e.g. chng_date)

    1.JPG

    2. Make an alert for groups:

      • Select I want to alert on to Custom SWQL Alert (Advanced)
      • Set up your SWQL condition to Groups
      • And write the following code:

    INNER JOIN Orion.ContainerMembers cm ON Groups.ContainerID = cm.ContainerID
    INNER JOIN ORION.Nodes n ON n.NodeID = cm.MemberPrimaryID
    INNER JOIN ORION.Events e ON n.NodeID = e.NetworkNode

    WHERE NOT Groups.Status = 1 AND Groups.name LIKE '%-SITE%' AND n.Status = 2 AND e.EventType = 1 AND (datetime(Groups.customproperties.chng_date) < tolocal(e.EventTime))

    -- I made groups with "-SITE" identifier so I add Groups.name LIKE '%-SITE%’ to recognize them.

    2-a.JPG

      • In reset condition select Create a special reset condition for this alert ➟ Copy condition from trigger (It is the same as setting to No reset condition – Trigger this alert each time the trigger condition is met but I had some problems with that):

    INNER JOIN Orion.ContainerMembers cm ON Groups.ContainerID = cm.ContainerID
    INNER JOIN ORION.Nodes n ON n.NodeID = cm.MemberPrimaryID
    INNER JOIN ORION.Events e ON n.NodeID = e.NetworkNode

    WHERE NOT Groups.Status = 1 AND Groups.name LIKE '%-SITE%' AND n.Status = 2 AND e.EventType = 1 AND (datetime(Groups.customproperties.chng_date) < tolocal(e.EventTime))

    2-b.JPG

     

     

      • In Trigger Actions add an action to change the chng_date value to Sortable Date (${N=Generic;M=S}).

    2-c.JPG

      • And add Send an Email/Page action with the subect:

    ${N=SwisEntity;M=Name} Status is ${N=SwisEntity;M=StatusDescription} at ${N=Alerting;M=AlertTriggerTime;F=DateTime}

                   And the Message:

    ${N=Generic;M=DateTime;F=DateTime}

    NODES:

    ${SQL:SELECT cast(cast([GroupMemberFullName]as varchar(max)) + '' + ' ' + '-' + ' ' as XML), cast(cast([GroupMemberStatusName]as varchar(max)) + '' + CHAR(10) + CHAR(13) as XML) FROM  [SolarWindsOrion].[dbo].[Containers_AlertsAndReportsData] where   GroupID=${GroupID}  FOR XML PATH('')}

    2-d.JPG

    3. Make reset alert for groups (to reset the groups which went up before generating jira) (I preferred to set Evaluate the trigger condition every 59 seconds

      • Select I want to alert on to Custom SWQL Alert (Advanced)
      • Set up your SWQL condition to Groups
      • And write the following code:

    INNER JOIN Orion.ContainerMembers cm ON Groups.ContainerID = cm.ContainerID
    INNER JOIN ORION.Nodes n ON n.NodeID = cm.MemberPrimaryID
    INNER JOIN ORION.Events e ON n.NodeID = e.NetworkNode

    WHERE Groups.Status = 1 AND Groups.name LIKE '%-SITE%' AND n.Status = 1 AND e.EventType = 5 AND (datetime(Groups.customproperties.chng_date) < tolocal(e.EventTime))

    3-a.JPG

     

    • In reset condition select No reset condition – Trigger this alert each time the trigger condition is met:

    3-b.JPG

    • In Trigger Actions add an action to change the chng_date value to Sortable Date (${N=Generic;M=S}).

    2-c.JPG

    And leave other fields as default.

Reply
  • I make an alert to email me if any group member status goes down (even when there were other nodes in the group that went down before), I write my solution and wish it can help you.

    0.JPG

    1. Make a custom property for groups as text. (e.g. chng_date)

    1.JPG

    2. Make an alert for groups:

      • Select I want to alert on to Custom SWQL Alert (Advanced)
      • Set up your SWQL condition to Groups
      • And write the following code:

    INNER JOIN Orion.ContainerMembers cm ON Groups.ContainerID = cm.ContainerID
    INNER JOIN ORION.Nodes n ON n.NodeID = cm.MemberPrimaryID
    INNER JOIN ORION.Events e ON n.NodeID = e.NetworkNode

    WHERE NOT Groups.Status = 1 AND Groups.name LIKE '%-SITE%' AND n.Status = 2 AND e.EventType = 1 AND (datetime(Groups.customproperties.chng_date) < tolocal(e.EventTime))

    -- I made groups with "-SITE" identifier so I add Groups.name LIKE '%-SITE%’ to recognize them.

    2-a.JPG

      • In reset condition select Create a special reset condition for this alert ➟ Copy condition from trigger (It is the same as setting to No reset condition – Trigger this alert each time the trigger condition is met but I had some problems with that):

    INNER JOIN Orion.ContainerMembers cm ON Groups.ContainerID = cm.ContainerID
    INNER JOIN ORION.Nodes n ON n.NodeID = cm.MemberPrimaryID
    INNER JOIN ORION.Events e ON n.NodeID = e.NetworkNode

    WHERE NOT Groups.Status = 1 AND Groups.name LIKE '%-SITE%' AND n.Status = 2 AND e.EventType = 1 AND (datetime(Groups.customproperties.chng_date) < tolocal(e.EventTime))

    2-b.JPG

     

     

      • In Trigger Actions add an action to change the chng_date value to Sortable Date (${N=Generic;M=S}).

    2-c.JPG

      • And add Send an Email/Page action with the subect:

    ${N=SwisEntity;M=Name} Status is ${N=SwisEntity;M=StatusDescription} at ${N=Alerting;M=AlertTriggerTime;F=DateTime}

                   And the Message:

    ${N=Generic;M=DateTime;F=DateTime}

    NODES:

    ${SQL:SELECT cast(cast([GroupMemberFullName]as varchar(max)) + '' + ' ' + '-' + ' ' as XML), cast(cast([GroupMemberStatusName]as varchar(max)) + '' + CHAR(10) + CHAR(13) as XML) FROM  [SolarWindsOrion].[dbo].[Containers_AlertsAndReportsData] where   GroupID=${GroupID}  FOR XML PATH('')}

    2-d.JPG

    3. Make reset alert for groups (to reset the groups which went up before generating jira) (I preferred to set Evaluate the trigger condition every 59 seconds

      • Select I want to alert on to Custom SWQL Alert (Advanced)
      • Set up your SWQL condition to Groups
      • And write the following code:

    INNER JOIN Orion.ContainerMembers cm ON Groups.ContainerID = cm.ContainerID
    INNER JOIN ORION.Nodes n ON n.NodeID = cm.MemberPrimaryID
    INNER JOIN ORION.Events e ON n.NodeID = e.NetworkNode

    WHERE Groups.Status = 1 AND Groups.name LIKE '%-SITE%' AND n.Status = 1 AND e.EventType = 5 AND (datetime(Groups.customproperties.chng_date) < tolocal(e.EventTime))

    3-a.JPG

     

    • In reset condition select No reset condition – Trigger this alert each time the trigger condition is met:

    3-b.JPG

    • In Trigger Actions add an action to change the chng_date value to Sortable Date (${N=Generic;M=S}).

    2-c.JPG

    And leave other fields as default.

Children
No Data