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

Display nodes in maintenance mode in a modern dashboard widget

Jump to solution

Is it possible to display a list of nodes in maintenance mode in a modern dashboard table widget?

If possible what is the SWQL to get that data ?

0 Kudos
1 Solution
Product Manager
Product Manager

Yes this is possible, the SWQL you need for a table widget would look something like this.

SELECT
n.caption,
n.DetailsUrl,
n.Status,
unmanaged, 
tolocal(UnManageFrom) as Unmanage, 
daydiff(getutcdate(), UnManagefrom)as [Days till Unmanage],
tolocal(UnManageUntil) as Remanage,
daydiff(getutcdate(), UnManageuntil)as [Days until Remanage]
FROM Orion.Nodes n
where
unmanaged = 'true'

 

View solution in original post

2 Replies
Level 8

We have a different spin on our side.  We also wanted to include if the VM was muted.  I also include information on the VM guest state as well.

 

SELECT [N].Caption
,[N].DetailsUrl
,[N].Status As NodeStatus
,[N].StatusIcon
,ToLocal([M].SuppressFrom) As Mute_Start
,ToLocal([M].SuppressUntil) As Mute_End
,[V].GuestState
,CASE
WHEN ([N].UnManaged = 'TRUE' AND [M].SuppressFrom IS Not Null) THEN 'Muted,Unmanaged'
WHEN ([N].UnManaged = 'TRUE' AND [M].SuppressFrom IS Null) THEN 'Unmanaged'
WHEN ([N].UnManaged = 'FALSE' AND [M].SuppressFrom IS Not Null) THEN 'Muted'
ELSE 'UNKNOWN'
END AS Status
,CASE
WHEN [N].UnManaged = 'TRUE' THEN ToLocal(N.UnManageFrom)
ELSE NULL
END As Unmanage_Start
,CASE
WHEN [N].UnManaged = 'TRUE' THEN ToLocal(N.UnManageUntil)
ELSE Null
END As Unmanage_End
FROM Orion.Nodes [N]
LEFT OUTER JOIN Orion.VIM.VirtualMachines [V] on [N].NodeID = [V].NodeID
LEFT OUTER JOIN Orion.AlertSuppression [M] on [N].Uri = [M].EntityUri
WHERE ([N].UnManaged = 'TRUE'
OR [M].SuppressFrom IS NOT Null)
ORDER BY Unmanage_Start, Mute_Start DESC

0 Kudos
Product Manager
Product Manager

Yes this is possible, the SWQL you need for a table widget would look something like this.

SELECT
n.caption,
n.DetailsUrl,
n.Status,
unmanaged, 
tolocal(UnManageFrom) as Unmanage, 
daydiff(getutcdate(), UnManagefrom)as [Days till Unmanage],
tolocal(UnManageUntil) as Remanage,
daydiff(getutcdate(), UnManageuntil)as [Days until Remanage]
FROM Orion.Nodes n
where
unmanaged = 'true'

 

View solution in original post