This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Serial numbers for Cisco switches / Stack Switches

I am trying to pull serial numbers for stack switches and other devices using on Solarwinds 2020.2.6

SELECT OrionNodes.Caption, OrionNodes.DetailsUrl, OrionNodes.Status, OrionNodes.ChildStatus, NcmEntityPhysical.EntityName, OrionNodes.IP_Address, OrionNodes.CustomProperties.ZL_Location, OrionNodes.CustomProperties.ZL_Region, OrionNodes.CustomProperties.ZN_Role,
OrionNodes.CustomProperties.ZN_Edge_Device, NcmEntityPhysical.EntityDescription, NcmEntityPhysical.Serial, NcmEntityPhysical.Manufacturer, NcmEntityPhysical.Model, NcmNodeProperties.NodeComments, OrionNodes.SysName, OrionNodes.NodeDescription, OrionNodes.Location, OrionNodes.Contact, OrionNodes.MachineType, OrionNodes.LastBoot, OrionNodes.IOSVersion
FROM NCM.NodeProperties AS NcmNodeProperties
INNER JOIN Orion.Nodes AS OrionNodes ON NcmNodeProperties.CoreNodeID=OrionNodes.NodeID
LEFT JOIN NCM.EntityPhysical AS NcmEntityPhysical ON NcmEntityPhysical.NodeID=NcmNodeProperties.NodeID AND NcmEntityPhysical.EntityClass='3'
WHERE (OrionNodes.Vendor='Cisco'

but i dont get any serial numbers or manufacturer or model numbers (NcmEntityPhysical.Serial, NcmEntityPhysical.Manufacturer, NcmEntityPhysical.Model)  - These 3 are not working

it used to work on 2020.2.5 - is there anything wrong in above syntax?

  • I'd look at the NCM.NodeProperties section.  I'm not getting any results from that entity in my environment.  I do have nodes being managed by NCM, but I'm not doing a ton with NCM yet, so it could be that I just don't have any data there and you would.

  • I am running the current orion/ncm/npm and it largely worked after I removed your custom properties which i dont have, and that leading '(' in the where clause. There were some that didnt load all data, but there are other entities such as assetinventory which might have that information anyways. Could be a cisco model issue with the new MIB file. I have not looked at the models/firmware which were empty. 

  • You can get the serial number and model from Orion.NPM.SwitchStackMember table

    SELECT ID, NodeID, MemberID, Role, RoleDescription, State, StateDescription, MacAddress, Model, SoftwareImage, SerialNumber, HwPriority, SwPriority, SwitchNumber, PowerAvailable, PowerUsed, PostResult, DisplayName
    FROM Orion.NPM.SwitchStackMember

  • Thanks! It worked for me

  •   

    I hope u are well.

    I read your comments.

    I have customized the following query in SWQL, I hope it helps you in something.

    -------------

    SELECT
    H.ParentObjectName AS HostName,
    N.IP_Address AS IP,
    N.SysObjectID,
    H.Manufacturer,
    H.Model,
    H.ParentObjectVendor AS Vendor,
    S.RoleDescription AS Role,
    H.ServiceTag AS ServiceTag_Master, --Service Tag, is the serial number of the Master Switches
    S.SerialNumber AS ServiceTag_Standby_Member --SerialNumber, is the serial number of the Standby/member Switches
    FROM Orion.HardwareHealth.HardwareInfo AS H
    LEFT JOIN Orion.Nodes AS N
    ON H.NodeID=N.NodeID
    LEFT JOIN Orion.NPM.SwitchStackMember AS S
    ON S.NodeID=N.NodeID
    ORDER BY N.IP_Address