Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Community Member

snmpget on Cisco devices

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
Cisco Employee

Re: snmpget on Cisco devices

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

6 REPLIES
Cisco Employee

Re: snmpget on Cisco devices

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.

Community Member

Re: snmpget on Cisco devices

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.

Cisco Employee

Re: snmpget on Cisco devices

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.

Community Member

Re: snmpget on Cisco devices

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.

Cisco Employee

Re: snmpget on Cisco devices

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

Community Member

Re: snmpget on Cisco devices

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!!!

689
Views
0
Helpful
6
Replies
CreatePlease to create content