Cisco Multiple CPU's

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
WeAreGray
Posts: 10
Joined: Sun Feb 06, 2011 7:19 pm

Cisco Multiple CPU's

Post by WeAreGray »

I am trying to write an SNMP Indexed XML to graph the various CPU's on out Catalyst 6509's. I have the XML working, but I am stuck how to get the correct index from the entity-mib. I use cpmCPUTotalPhysicalIndex for the index field and what I want to do is take the values from that walk, and use that to get the entPhysicalName for the CPU and I am at a loss at how to accomplish this. Below is the XML, an SNMP debug run, and the third is the information from the indexes that I am hoping to be able to retrieve.


<interface>
<name>Cisco CPU 5 Minutes</name>
<description>Cisco CPU 5 Minute</description>
<index_order_type>numeric</index_order_type>
<oid_index_parse>OID/REGEXP:.*\.([0-9]{1,2})$</oid_index_parse>
<oid_index>.1.3.6.1.4.1.9.9.109.1.1.1.1.2</oid_index>
<fields>
<cpmCPUTotalPhysicalIndex>
<name>Index</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.9.9.109.1.1.1.1.2</oid>
</cpmCPUTotalPhysicalIndex>
<cpmCPUTotal5minRev>
<name>5 Min CPU's</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.9.9.109.1.1.1.1.8</oid>
</cpmCPUTotal5minRev>
<entPhysicalName>
<name>Description</name>
<method>get</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.2.1.47.1.1.1.1.7</oid>
</entPhysicalName>
</fields>
</interface>

+ Running data query [29].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/cisco-cpu.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.9.9.109.1.1.1.1.2'
+ Index found at OID: '1.3.6.1.4.1.9.9.109.1.1.1.1.2.1' value: '6017'
+ Index found at OID: '1.3.6.1.4.1.9.9.109.1.1.1.1.2.2' value: '6001'
+ Index found at OID: '1.3.6.1.4.1.9.9.109.1.1.1.1.2.3' value: '2001'
+ Index found at OID: '1.3.6.1.4.1.9.9.109.1.1.1.1.2.4' value: '3001'
+ Index found at OID: '1.3.6.1.4.1.9.9.109.1.1.1.1.2.5' value: '5001'
+ Index found at OID: '1.3.6.1.4.1.9.9.109.1.1.1.1.2.6' value: '4001'
+ index_parse at OID: '1.3.6.1.4.1.9.9.109.1.1.1.1.2.1' results: '1'
+ index_parse at OID: '1.3.6.1.4.1.9.9.109.1.1.1.1.2.2' results: '2'
+ index_parse at OID: '1.3.6.1.4.1.9.9.109.1.1.1.1.2.3' results: '3'
+ index_parse at OID: '1.3.6.1.4.1.9.9.109.1.1.1.1.2.4' results: '4'
+ index_parse at OID: '1.3.6.1.4.1.9.9.109.1.1.1.1.2.5' results: '5'
+ index_parse at OID: '1.3.6.1.4.1.9.9.109.1.1.1.1.2.6' results: '6'
+ Located input field 'entPhysicalName' [get]
+ Executing SNMP get for data @ '.1.3.6.1.2.1.47.1.1.1.1.7.1' [value='WS-C6509-E']
+ Executing SNMP get for data @ '.1.3.6.1.2.1.47.1.1.1.1.7.2' [value='Physical Slot 1']
+ Executing SNMP get for data @ '.1.3.6.1.2.1.47.1.1.1.1.7.3' [value='Physical Slot 2']
+ Executing SNMP get for data @ '.1.3.6.1.2.1.47.1.1.1.1.7.4' [value='Physical Slot 3']
+ Executing SNMP get for data @ '.1.3.6.1.2.1.47.1.1.1.1.7.5' [value='Physical Slot 4']
+ Executing SNMP get for data @ '.1.3.6.1.2.1.47.1.1.1.1.7.6' [value='Physical Slot 5']
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/cisco-cpu.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/cisco-cpu.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/cisco-cpu.xml'


2001=CPU of Module 1
3001=CPU of Module 2
4001=CPU of Module 3
5001=CPU of Module 4
6001=CPU of Switching Processor 5
6017=CPU of Routing Processor 5
User avatar
Linegod
Developer
Posts: 1626
Joined: Thu Feb 20, 2003 10:16 am
Location: Canada
Contact:

Re: Cisco Multiple CPU's

Post by Linegod »

cpmCPUTotalPhysicalIndex should be '<direction>input</direction>'
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
WeAreGray
Posts: 10
Joined: Sun Feb 06, 2011 7:19 pm

Re: Cisco Multiple CPU's

Post by WeAreGray »

That did not fix the issue. Here is the output after the change.

+ Running data query [29].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/cisco-cpu.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.9.9.109.1.1.1.1.2'
+ Index found at OID: '1.3.6.1.4.1.9.9.109.1.1.1.1.2.1' value: '6017'
+ Index found at OID: '1.3.6.1.4.1.9.9.109.1.1.1.1.2.2' value: '6001'
+ Index found at OID: '1.3.6.1.4.1.9.9.109.1.1.1.1.2.3' value: '2001'
+ Index found at OID: '1.3.6.1.4.1.9.9.109.1.1.1.1.2.4' value: '3001'
+ Index found at OID: '1.3.6.1.4.1.9.9.109.1.1.1.1.2.5' value: '5001'
+ Index found at OID: '1.3.6.1.4.1.9.9.109.1.1.1.1.2.6' value: '4001'
+ index_parse at OID: '1.3.6.1.4.1.9.9.109.1.1.1.1.2.1' results: '1'
+ index_parse at OID: '1.3.6.1.4.1.9.9.109.1.1.1.1.2.2' results: '2'
+ index_parse at OID: '1.3.6.1.4.1.9.9.109.1.1.1.1.2.3' results: '3'
+ index_parse at OID: '1.3.6.1.4.1.9.9.109.1.1.1.1.2.4' results: '4'
+ index_parse at OID: '1.3.6.1.4.1.9.9.109.1.1.1.1.2.5' results: '5'
+ index_parse at OID: '1.3.6.1.4.1.9.9.109.1.1.1.1.2.6' results: '6'
+ Located input field 'cpmCPUTotalPhysicalIndex' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.9.9.109.1.1.1.1.2'
+ Found item [cpmCPUTotalPhysicalIndex='6017'] index: 1 [from value]
+ Found item [cpmCPUTotalPhysicalIndex='6001'] index: 2 [from value]
+ Found item [cpmCPUTotalPhysicalIndex='2001'] index: 3 [from value]
+ Found item [cpmCPUTotalPhysicalIndex='3001'] index: 4 [from value]
+ Found item [cpmCPUTotalPhysicalIndex='5001'] index: 5 [from value]
+ Found item [cpmCPUTotalPhysicalIndex='4001'] index: 6 [from value]
+ Located input field 'entPhysicalName' [get]
+ Executing SNMP get for data @ '.1.3.6.1.2.1.47.1.1.1.1.7.1' [value='WS-C6509-E']
+ Executing SNMP get for data @ '.1.3.6.1.2.1.47.1.1.1.1.7.2' [value='Physical Slot 1']
+ Executing SNMP get for data @ '.1.3.6.1.2.1.47.1.1.1.1.7.3' [value='Physical Slot 2']
+ Executing SNMP get for data @ '.1.3.6.1.2.1.47.1.1.1.1.7.4' [value='Physical Slot 3']
+ Executing SNMP get for data @ '.1.3.6.1.2.1.47.1.1.1.1.7.5' [value='Physical Slot 4']
+ Executing SNMP get for data @ '.1.3.6.1.2.1.47.1.1.1.1.7.6' [value='Physical Slot 5']
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/cisco-cpu.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/cisco-cpu.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/cisco-cpu.xml'
User avatar
Linegod
Developer
Posts: 1626
Joined: Thu Feb 20, 2003 10:16 am
Location: Canada
Contact:

Re: Cisco Multiple CPU's

Post by Linegod »

I think I created a query for this previously. I'll take a look today.
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
WeAreGray
Posts: 10
Joined: Sun Feb 06, 2011 7:19 pm

Re: Cisco Multiple CPU's

Post by WeAreGray »

Any update?
WeAreGray
Posts: 10
Joined: Sun Feb 06, 2011 7:19 pm

Re: Cisco Multiple CPU's

Post by WeAreGray »

Any update?
WeAreGray
Posts: 10
Joined: Sun Feb 06, 2011 7:19 pm

Re: Cisco Multiple CPU's

Post by WeAreGray »

Is there anyone else who can help?
WeAreGray
Posts: 10
Joined: Sun Feb 06, 2011 7:19 pm

Re: Cisco Multiple CPU's

Post by WeAreGray »

Help?
hayzey
Posts: 10
Joined: Tue Feb 19, 2013 7:04 pm

Re: Cisco Multiple CPU's

Post by hayzey »

I was trying to accomplish the same thing but couldn't find a way to do it. The problem appeared to be with how Cisco put that extra "step" in of associating a random number to the module descriptions. I could index the cards and poll the CPUs, but not associate it with a meaningful module description.

I started writing an indexed script when I found this jewel:

http://forums.cacti.net/viewtopic.php?t=27623

Worked for me! I was surprised since it was a 5 year old post and I'm running Cacti 0.8.8a.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests