cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Highlighted

Report for Alerts cofigured per device

Hello Genius,

I am looking for a SWQL query to create a custom report for "Report for total number of alerts configured  per device ".

I am putting my efforts here but still not getting the proper result:

"

select N.NodeID, AO.EntityCaption AS 'NodeName',AC.Name AS
'AlertName' from AlertObjects AO

inner join Nodes N on AO.EntityCaption = N.Caption

inner join AlertConfigurations AC on AC.AlertID = AO.AlertID

where AO.EntityType = 'Orion.Nodes'

and AC.ObjectType = 'Node' order by N.NodeID

"

Kindly help to optimize the result.

Thanks in advance

Regards,

--Ghanshyam Bisen

0 Kudos
1 Reply
Highlighted
Level 8

Re: Report for Alerts cofigured per device

This might work for you:

select AO.EntityCaption, count (*) as ConfiguredAlerts

from orion.AlertObjects AO

inner join orion.Nodes N

on AO.EntityCaption = N.Caption

inner join orion.AlertConfigurations AC

on AC.AlertID = AO.AlertID

where AO.EntityType = 'Orion.Nodes'

and AC.ObjectType = 'Node'

group by ao.entitycaption

order by n.nodeid

0 Kudos