Query using SWQL for Cisco Nexus nodes that have not had CLI credentials configured for vPC monitoring?

How to query using SWQL for Cisco nexus nodes that have not had CLI credentials configured for vPC monitoring? 

Parents
  • Did you mean this setting:

    If so, then I can do you a query that shows the devices that ARE configured:

    SELECT s.NodeID, n.Caption, n.Description, s.SettingName, s.SettingValue, s.NodeSettingID
    
    FROM Orion.NodeSettings AS s 
    JOIN Orion.Nodes AS n ON s.NodeID = n.NodeID
    
    WHERE n.Description LIKE '%Nexus%' AND SettingName = 'CLI.Credential'


    I did the JOIN to Orion.Nodes to pull in the node names and Description to help with the filtering. Sadly I can't see a table that shows where it isn't set, but if you compare this to your list of Nexus units then you can see what isn't.

  • That got me going. This seems to work for my needs:

    SELECT n.NodeID, n.Caption, n.Description,n.NodeDescription,n.IOSVersion,n.IOSImage,n.Sysname
    FROM Orion.Nodes AS n
    LEFT OUTER JOIN
    (SELECT s.NodeID, s.SettingName, s.SettingValue, s.NodeSettingID FROM Orion.NodeSettings as s where s.SettingName = 'CLI.Credential') as ss
    on n.NodeID = ss.NodeID
    Where ss.SettingName IS Null and
    n.vendor like 'Cisco%' and (n.IOSImage = 'nxos' or n.NodeDescription like '%nexus%' or n.NodeDescription like '%nxos%' or n.NodeDescription like '%nx-os%' or n.Description like '%nexus%' or n.Description like '%nxos%' or n.Description like '%nx-os%'  or n.IOSVersion like '%nx-os%')
    ORDER BY n.sysname

Reply
  • That got me going. This seems to work for my needs:

    SELECT n.NodeID, n.Caption, n.Description,n.NodeDescription,n.IOSVersion,n.IOSImage,n.Sysname
    FROM Orion.Nodes AS n
    LEFT OUTER JOIN
    (SELECT s.NodeID, s.SettingName, s.SettingValue, s.NodeSettingID FROM Orion.NodeSettings as s where s.SettingName = 'CLI.Credential') as ss
    on n.NodeID = ss.NodeID
    Where ss.SettingName IS Null and
    n.vendor like 'Cisco%' and (n.IOSImage = 'nxos' or n.NodeDescription like '%nexus%' or n.NodeDescription like '%nxos%' or n.NodeDescription like '%nx-os%' or n.Description like '%nexus%' or n.Description like '%nxos%' or n.Description like '%nx-os%'  or n.IOSVersion like '%nx-os%')
    ORDER BY n.sysname

Children