3 Replies Latest reply on Jul 20, 2009 12:30 PM by ecornwell

    Want to Create a Cisco Serial Number Report

    ExpatYankee

      Hi all:

      I'm trying to create a report of all Cisco switch serial numbers WITHIN multiple switch stacks. The usual OIDS will grab the master switch's SN without problem, but don't detect the others in a stack.

      I've created an NCM job which simply queries each stack with a 'show inv[entory]' and outputs it to a file.

      Is there any way to either 1) Parse the resulting data into an NPM or NCM report, or 2) to directly emulate this command script within NPM (rather than NCM) and then output the result to a report?

      This would be a great help to our staff; as I say, using the UnDP only gives us the master switch in each stack, so going the MIB/OID route doesn't appear to be too useful. If anyone knows of an OID which provides a table of all Cisco switches across all models and images, that would be another possibility.

      All comments welcome!

        • Re: Want to Create a Cisco Serial Number Report
          JasonKV

          I think the MIB/OID you are looking for is described here --> http://tools.cisco.com/Support/SNMP/do/BrowseOID.do?local=en&translate=Translate&objectInput=1.3.6.1.4.1.9.5.1.3.1.1.3

          I checked this on a 3750 stack that we have here and 1.3.6.1.4.1.9.5.1.3.1.1.3.1 and 1.3.6.1.4.1.9.5.1.3.1.1.3.2 were the serials for each switch. I would assume that as more switches were added the last number would increase (1.3.6.1.4.1.9.5.1.3.1.1.3.?)

          Hopefully this either points in you the right direction or helps you out. As for NCM solutions I am not sure, but once you use UnDP you can creat an Orion report from that and get the inventory you are looking for.

          Good Luck

          • Re: Want to Create a Cisco Serial Number Report

            Based on an snmpwalk of a 3750 stack, it appears that:

            SNMPv2-SMI::mib-2.47.1.1.1.1.11.1001  <--- first stack member serial #

            SNMPv2-SMI::mib-2.47.1.1.1.1.11.2001  <--- second stack member serial #

            etc.

            ois-cjones-mac:~ cjones$ snmpget -v2c -c public 10.0.0.1 SNMPv2-SMI::mib-2.47.1.1.1.1.11.1001
            SNMPv2-SMI::mib-2.47.1.1.1.1.11.1001 = STRING: "CAT1234ABCD"
            ois-cjones-mac:~ cjones$ snmpget -v2c -c public 10.0.0.2 SNMPv2-SMI::mib-2.47.1.1.1.1.11.2001
            SNMPv2-SMI::mib-2.47.1.1.1.1.11.2001 = STRING: "CAT5678EFGH"
            

            Hope that helps!

            • Re: Want to Create a Cisco Serial Number Report
              ecornwell

              We are in the process of doing the same thing for our SmartNet agreement.  I used the Entity MIB that was mentioned above in the UnDP then created an Advanced SQL report to pull out the data.  We only have a couple of stacked switches so I wasn't too worried about them but the report is working well.  We've limited it to certain RowID's from the result (1 and 1001.)  You could adapt it to list what is needed for the stacked switches. 

              Here's the SQL...

               

              SELECT
              N1.City AS City, N1.Caption AS NodeName, N1.NodeID, N1.IP_Address AS IP_Address, N1.MachineType AS Machine_Type,
              CASE
                 WHEN (Select CPS.Status from CustomPollerStatus CPS where CPA.CustomPollerAssignmentID = CPS.CustomPollerAssignmentID and CPS.RowID = '1001')  is null
                 THEN  (Select CPS.Status from CustomPollerStatus CPS where CPA.CustomPollerAssignmentID = CPS.CustomPollerAssignmentID and CPS.RowID = '1')
                  ELSE  (Select CPS.Status from CustomPollerStatus CPS where CPA.CustomPollerAssignmentID = CPS.CustomPollerAssignmentID and CPS.RowID = '1001')
                 END AS Status
               FROM
              Nodes N1, CustomPollerAssignment CPA

               WHERE 
              (
                (N1.Vendor = 'Cisco' and N1.NodeID = CPA.NodeID and CPA.AssignmentName like '%entphysicalserialnum%')
              )

               ORDER BY 1 ASC, 2 ASC



              This was done in a hurry to get a report for someone.  We're missing a few devices (37xx Stacks, Chassis Switches, etc.)  It also doesn't work with older devices.  Our 26xx routers and 2924 switches aren't working.  (They don't support the entity MIB.)