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 ?
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 ?
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'
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
SolarWinds solutions are rooted in our deep connection to our user base in the THWACK® online community. More than 195,000 members are here to solve problems, share technology and best practices, and directly contribute to our product development process.