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.

Can I use group variables within the alert trigger/notification call to PagerDuty?

I am trying to pull in the SolarWinds group for the node so I can have PageDuty filter on it.

I have tried different commands
${N=SWQL;M=SELECT cm.Container.Name AS [Group_Name]}
${N=OrionGroup;M=GroupMemberNameF=OriginalValue ${N=OrionGroup;M=GroupMemberName}
${GroupMemberName}
${GroupName}

Here is a working example, but I am trying to add more to it for the group name:
{
"payload": {
"summary": "${N=SwisEntity;M=Caption;F=OriginalValue} is ${N=SwisEntity;M=Status;F=Status}.",
"source": "${N=SwisEntity;M=Caption}",
"severity": "critical",
"component": "${N=SwisEntity;M=MachineType}",
"custom_details": {
"Node": " ${N=SwisEntity;M=Caption;F=OriginalValue}",
"Node Availability": "${N=SwisEntity;M=StatusDescription}",
}
},
"routing_key": "${SQL: SELECT Nodes.PDIntegrationKey FROM Nodes WHERE NodeID='${NodeID}'}",
"dedup_key": "${N=SwisEntity;M=Caption;F=OriginalValue}_${N=SwisEntity;M=Caption}_${N=SwisEntity;M=MachineType}",
"event_action": "trigger",
"client": "SolarWinds Orion",
"client_url": "${N=SwisEntity;M=DetailsUrl}"
}

When the alert is sent to pagerduty the API event looks like this with everything working but the group line.

{
  "client": "SolarWinds Orion",
  "client_url": "Removed for posting on forums",
  "contexts": null,
  "description": "qw1scripts1001 is Down.",
  "event_type": "trigger",
  "incident_key": "Removed for posting on forums",
  "service_key": "Removed for posting on forums",
  "details": {
    "Application Name": "SolarWinds.Orion.Core.Common",
    "Description": "Hardware: Intel64 Family 6 Model 63 Stepping 0 AT/AT COMPATIBLE - Software: Windows Version 10.0 (Build 14393 Multiprocessor Free)",
    "Group": "${N=OrionGroup;M=GroupName}",
    "Group Name": "${N=SWQL;M=SELECT cm.Container.Name}",
    "Node": "Removed for posting on forums",
    "Node Availability": "Node status is Down."
  }
}
Parents
  • Is it that you want to display the Groups the node is a member of, when alerting that a node is down?
    What if that node is a member of several groups?

    To get the first group the node is a member of, try this:
    ${N=SWQL;M=SELECT CM.Container.DisplayName AS T FROM Orion.ContainerMembers AS CM WHERE CM.MemberUri LIKE '%=${N=SwisEntity;M=NodeID}'}

Reply
  • Is it that you want to display the Groups the node is a member of, when alerting that a node is down?
    What if that node is a member of several groups?

    To get the first group the node is a member of, try this:
    ${N=SWQL;M=SELECT CM.Container.DisplayName AS T FROM Orion.ContainerMembers AS CM WHERE CM.MemberUri LIKE '%=${N=SwisEntity;M=NodeID}'}

Children