Quantcast
Channel: THWACK: Message List
Viewing all articles
Browse latest Browse all 20518

Re: Looking for a SQL query to get unmanaged nodes in the future

$
0
0

While you asked for a SQL query I do this with a SWQL query in a Custom Query resource (NPM 10.6 or later to support ToLocal function)

 

unmanaged_schedule.png

 

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


Viewing all articles
Browse latest Browse all 20518

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>