cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2892
Views
0
Helpful
6
Replies

snmpget on Cisco devices

eliaspaulos
Level 1
Level 1

which snmpget command able me to get Serial number from Cisco device. I use to

"snmpget -v1 -c communitystring hostorIP mib-2.47.1.1.1.1.11.1" or snmpget -c community hostorIP cisco.temporary.chassis.chassisId.0 but most of the time I didn't get serial number.I can get few serial number then I got blank. should I need to use different snmpget command for different cisco device? I am looking one or two good command to add on my sript. highly appreciated any suggestion or link related to my question.

Eli

1 Accepted Solution

Accepted Solutions

The DEE data is only available in XML. However, you can also use cwcli to export standard inventory reports such as the Detailed Device Report. For example:

cwcli invreport -u admin -p admin -reportname "Detailed Device Report" -device 10.1.1.1

This output will be in CSV format. You can even run inventory custom reports using this method. So you could define a report that only outputs devices and chassis serial numbers, then run it with cwcli.

Help on all of the cwcli commands can be found in the RME online help at:

http://SERVER/help/rme/fundamentals/cwcli_CWCLI.html

View solution in original post

6 Replies 6

Joe Clarke
Cisco Employee
Cisco Employee

It depends on the device and the version of code. If you have configured an snmp-server chassis-id, then you can always poll chassisId.0 to get that value. However, newer devices have serial numbers embedded into the ENTITY-MIB. You can get this by querying entPhysicalSerialNum for the chassis. The particular instance will vary from device to device. You are not necessarily guarnateed that 1 is the chassis.

thank you so much J. I have attache my script a portion looking for serial number. this work for some time I think now we have more and more devices. the command output because blank or some weird character like XXXXXX or like that. I am using this script to create cmdb.csv file for service desk. I am wondering since ciscoworks has all this information including the serial number. where this file store? if can my script pull the info from Ciscoworks instead of going to all 5000 Cisco device we have now. any suggestion.

CiscoWorks uses different MIB objects to get serial numbers. As I mentioned chassisId.0 and entPhysicalSerialNumber.X are two such objects. RME also has the ability of storing a user-configured serial number.

You can get at this data using DEE and the cwcli command. For example:

cwcli export inventory -u admin -p admin -device 10.1.1.1

This will create an XML document which contains detailed inventory data. The serial number being displayed in RME can be found there.

Thanks a lot J. that is a great info. I have couple of question first is there any document to give detail info how to use this very useful resources. second is this only export as xml. can be as a simple text? also can I get information from multiple devices? my wish is to get all manged device information -like the serial number,IOS version so on, and put on text databse and then sorted the info and feed the service desk. is this possible to achieve? I have a script to pull information from UT and sorted and load on internal web-site. pretty much I am trying to achieve the same thing. please any suggestion or recommendation or a place I can found more information.

The DEE data is only available in XML. However, you can also use cwcli to export standard inventory reports such as the Detailed Device Report. For example:

cwcli invreport -u admin -p admin -reportname "Detailed Device Report" -device 10.1.1.1

This output will be in CSV format. You can even run inventory custom reports using this method. So you could define a report that only outputs devices and chassis serial numbers, then run it with cwcli.

Help on all of the cwcli commands can be found in the RME online help at:

http://SERVER/help/rme/fundamentals/cwcli_CWCLI.html

Thank you so.....much! this information will very help full for us and give more value for our Ciscoworks application!!!thank you Joe again you are there for all of us!!!

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: