Device group membership in alerts?
![](https://secure.gravatar.com/avatar/bbac5d2b97fcfe419a8d8b3842cfe42b.jpg?s=120&d=mm&r=g)
I've got a usecase to have the group names that a device is a member of passed down to the alerts, specifically Pagerduty.
On the PD side, I can route incidents based on arbitrary details, and if I had group membership I could say "If device.groups contains "Network" route to XXX", instead of having to build a unique alert check for every group.
The mocked up SQL query is SELECT group_name FROM groups WHERE group_id IN (SELECT group_id FROM group_table WHERE entity_type = 'device' AND entity_id = ?);
Any chance that information can be made available? I'm happy to write the code if needed.
________________________________ Spencer J. Ryan | Manager, Technology and Infrastructure Miller Canfield T +1.313.496.7979 ________________________________
![](https://secure.gravatar.com/avatar/11b54b3dd25b712395dab9818c67596f.jpg?s=120&d=mm&r=g)
Yeah, I suppose we can add this fairly easily. It'd be nice to add both device groups as well as entity-specific groups. I think the lookup load isn't huge, so I don't see many downsides.
I think it just needs to be added to the code that generates the initial array of data, and then added to the PD module, and perhaps some other modules that it's easy to add to.
Adam.
From: observium observium-bounces@observium.org On Behalf Of Ryan, Spencer J. via observium Sent: 05 May 2020 20:00 To: Observium observium@observium.org Cc: Ryan, Spencer J. Ryan@millercanfield.com Subject: [Observium] Device group membership in alerts?
I've got a usecase to have the group names that a device is a member of passed down to the alerts, specifically Pagerduty.
On the PD side, I can route incidents based on arbitrary details, and if I had group membership I could say "If device.groups contains "Network" route to XXX", instead of having to build a unique alert check for every group.
The mocked up SQL query is SELECT group_name FROM groups WHERE group_id IN (SELECT group_id FROM group_table WHERE entity_type = 'device' AND entity_id = ?);
Any chance that information can be made available? I'm happy to write the code if needed.
_____
Spencer J. Ryan | Manager, Technology and Infrastructure
Miller Canfield
T +1.313.496.7979
_____
participants (2)
-
Adam Armstrong
-
Ryan, Spencer J.