Hello,
I am looking to pull some patching information from Patch Manager to dispay within another system.
Having a poke about the various table I notice the NodeID is a long string and not the 4 digit integer I was hoping for!
I am aware Patch Manager was/is a seperate system but I am struggling to see a column I can use to join from Orion to PM, other than IP Address (a Node can have many and they can change).
Currently I have a list of nodes (as integers from the Orion.Nodes.NodeId field) and for each one I want to check if they have patching and if so pull the various numbers, ideally as an INNER JOIN within the query.
If you click a node with Patch Manager so the URL reads: /Orion/PM/WsusNodeDetails.aspx?NetObject=WSUSN: the "Node Status" panel links across to the Node page, using the integer Id, how is this worked out - is there a mapping I am overlooking?
As a temporary measure we have named the patching groups "Account Code - Group Number" so assuming an account code XXXX we can use the query to get the required information:
SELECT NodeId, IPAddress, SafeName as GroupName, FullDomainName, DownloadedCount, FailedCount, InstalledCount, InstalledPendingRebootCount, NotApplicableCount, NotInstalledCount, UnknownCount
FROM Orion.PM.WsusGroups
INNER JOIN Orion.PM.WsusNodes ON TargetGroup LIKE CONCAT('%',SafeName,'%')
WHERE SafeName Like 'XXXX%'
ORDER BY SafeName, FullDomainName
Any help is much appreciated!
Thanks,
Oli.