I've searched the forums and SolarWinds knowledgebase and I can't find the answer. I currently use a SQL query to get unmanaged nodes, but it only partially works. I need to know when nodes are planned in the future.
Here's the query I used:
SELECT
n.caption as Node
, '/Orion/NetPerfMon/NodeDetails.aspx?NetObject=N%3a' + ToString(n.nodeid) AS [_LinkFor_Node]
, '/Orion/images/StatusIcons/Small-' + n.StatusLED AS [_IconFor_Node]
, 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' and
(minutediff(getutcdate(), UnManagefrom) > -10080)
)
or
(
minutediff(getutcdate(), UnManagefrom) >0
and minutediff(getutcdate(), UnManagefrom) <10080
)
order by unmanagefrom
I can't get this to work 100%. I have no experience working with SQL queries so I don't know what I need to modify. I tried to create a new report and search for the System Property for Planned Maintenance Window. When I look at Manage Nodes I see devices that I've unmanaged in the future, but they don't show up in my query.
Either I create a new report using Planned Maintenance Window or fix my SQL query. I just want to know every device I have unmanaged.