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

Down nodes widget filter - exclude items muted or in maintenance mode

Jump to solution

The down nodes widget is a great, but how do I filter out the nodes that are muted or in maintenance mode?  I found this post that has SWQL that generates a list of nodes in maintenance mode but I need to be able to filter these same nodes out of the Down Nodes module.

I'm not sure what table this is recorded in or how to filter it out.

Thanks

WR

0 Kudos
1 Solution
Level 9

Here is what worked for us.  Custom Query Widget.

SELECT

n.Caption AS NODE

,n.IPAddress

,ToLocal(n.LastSystemUpTimePollUtc) as LastSystemUPTime

FROM Orion.Nodes n

Where

n.Unmanaged=0

AND n.status=2

AND n.Uri NOT IN (SELECT a.EntityUri FROM Orion.AlertSuppression a WHERE n.Uri = a.EntityUri)

View solution in original post

5 Replies

For nodes in maintenance mode this should help

SELECT

     n.Caption as NODE

FROM

     Orion.Nodes n

Where

     n.Unmanaged = 1 

For Muted nodes

SELECT

     n.Caption as NODE

FROM

     Orion.Nodes n

Inner Join Orion.AlertSuppression MUTE ON N.URI = MUTE.EntityUri

Where

MUTE.SuppressFrom is not Null

0 Kudos
Level 9

I think Wes is looking for the reverse, and we are as well.  We want to exclude anything that is unmanaged or muted.  unmanaged=0 takes care of not showing nodes that are unmanaged but not sure how write the "don't show any that are muted".

The inner join had to flip to a left join to make it work. (the left join says I want all from nodes table even if not in the AlertSuppression table, the inner join grabbed only rows with matches which is why it didn't work for you.)

SELECT

     n.Caption as NODE

FROM

     Orion.Nodes n

Left Join Orion.AlertSuppression MUTE ON N.URI = MUTE.EntityUri

Where

    MUTE.SuppressFrom is Null and n.Unmanaged = 0

Let me know if I can help further

Level 9

Here is what worked for us.  Custom Query Widget.

SELECT

n.Caption AS NODE

,n.IPAddress

,ToLocal(n.LastSystemUpTimePollUtc) as LastSystemUPTime

FROM Orion.Nodes n

Where

n.Unmanaged=0

AND n.status=2

AND n.Uri NOT IN (SELECT a.EntityUri FROM Orion.AlertSuppression a WHERE n.Uri = a.EntityUri)

View solution in original post

Level 9

Thank you!  This worked exactly as expected.

0 Kudos