Have you ever needed to download a Cisco device config from SolarWinds only to find that it was never backed up… Here's a little query I wrote to check the back up status of all Cisco nodes in Solarwinds…
It produces output like this and list all devices that are either
- Not in NCM or
- In NCM, Never backed up
SELECT
n.NodeID,
n.Caption as Name,
n.DetailsUrl AS [_LinkFor_Name],
n.IPAddress,
CASE WHEN ncm.NodeID IS NULL THEN 'Not in NCM'
ELSE 'In NCM – Never Backed Up'
END AS Reason
FROM Orion.Nodes n
LEFT JOIN Cirrus.NodeProperties ncm
ON ncm.CoreNodeId = n.NodeID
LEFT JOIN (
SELECT ca.NodeID, MAX(ca.DownloadTime) AS LastBackupUtc
FROM Cirrus.ConfigArchive ca
WHERE ca.ConfigType = 'Running'
GROUP BY ca.NodeID
) lrc
ON lrc.NodeID = ncm.NodeID
WHERE (ncm.NodeID IS NULL OR lrc.LastBackupUtc IS NULL)
AND N.Vendor like '%Cisco%'
AND n.CustomProperties.Device_Type in ('IP Switch', 'IP Router') -- Comment this line out if you don't use Custom Properties to define your device types
AND n.Status = '1'
ORDER BY Reason, Name;