Quantcast
Viewing all articles
Browse latest Browse all 20607

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

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)

 

Image may be NSFW.
Clik here to view.
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 20607

Trending Articles