Cisco CSS CPU template problem

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
pyoung
Posts: 13
Joined: Mon Nov 07, 2005 2:51 pm

Cisco CSS CPU template problem

Post by pyoung »

I have a Cisco CSS I'm trying to graph, I figured I'd start simple by creating graphs for CPU on each of the submodules.

I found the howto in lvm's sig (from snmptable to XML graphs), and it's helping, but I think I've missed something subtle:

My XML file:

Code: Select all

<interface>
        <name>CSS Sub-Module CPU Info (Instantaneous)</name>
        <description>Get current CSS Sub-Module CPU usage</description>
        <index_order_type>numeric</index_order_type>
        <oid_index>.1.3.6.1.4.1.9.9.368.1.34.17.1.13</oid_index>
        <oid_index_parse>OID/REGEXP:.*\.9\.9\.368\.1\.34\.17\.1\.13\.([0-9]*\]])</oid_index_parse>

        <fields>
                <cssCPUInstantIndex>
                        <name>Index</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>.1.3.6.1.4.1.9.9.368.1.34.17.1.13</oid>
                </cssCPUInstantIndex>
        </fields>
</interface>
And the resulting debug query:

Code: Select all

+ Running data query [10].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/home/cacti-0.8.6h/resource/snmp_queries/cssCPUInstant.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.9.9.368.1.34.17.1.13'
+ Located input field 'cssCPUInstantIndex' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.9.9.368.1.34.17.1.13'
+ Found item [cssCPUInstantIndex='0'] index: .1.3.6.1.4.1.9.9.368.1.34.17.1.13.1.1 [from value]
+ Found item [cssCPUInstantIndex='0'] index: .1.3.6.1.4.1.9.9.368.1.34.17.1.13.2.1 [from value]
+ Found item [cssCPUInstantIndex='0'] index: .1.3.6.1.4.1.9.9.368.1.34.17.1.13.3.1 [from value]
+ Found item [cssCPUInstantIndex='0'] index: .1.3.6.1.4.1.9.9.368.1.34.17.1.13.6.1 [from value]
+ Found item [cssCPUInstantIndex='0'] index: .1.3.6.1.4.1.9.9.368.1.34.17.1.13.7.1 [from value]
+ Found item [cssCPUInstantIndex='0'] index: .1.3.6.1.4.1.9.9.368.1.34.17.1.13.8.1 [from value]
+ Found data query XML file at '/home/cacti-0.8.6h/resource/snmp_queries/cssCPUInstant.xml'
+ Found data query XML file at '/home/cacti-0.8.6h/resource/snmp_queries/cssCPUInstant.xml'
+ Found data query XML file at '/home/cacti-0.8.6h/resource/snmp_queries/cssCPUInstant.xml'
All of the cssCPUInstantIndex values are the same. If I go to the 'Create Graphs For This Host' screen, the index values presented there are all 0. I believe that's going to be a problem - and since I know the problem has to be in the xml file I wrote, I thought I'd post about it now, before going further. Any tips would be most appreciated.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please provide the output from snmpwalk against your target using OID = .1.3.6.1.4.1.9.9.368.1.34.17.1.13. From The DEBUG you provided, I expect the index to be sth like x.y from .1.3.6.1.4.1.9.9.368.1.34.17.1.13.x.y, am I correct?
Reinhard
pyoung
Posts: 13
Joined: Mon Nov 07, 2005 2:51 pm

Post by pyoung »

lvm - You are correct, the index values of the OID are x.y:

Output from snmpwalk:

Code: Select all

[cacti@pinky cacti]$ /usr/local/bin/snmpwalk -On -v2c -c <sanitized> 192.168.252.253 .1.3.6.1.4.1.9.9.368.1.34.17.1.13
.1.3.6.1.4.1.9.9.368.1.34.17.1.13.1.1 = INTEGER: 0
.1.3.6.1.4.1.9.9.368.1.34.17.1.13.2.1 = INTEGER: 0
.1.3.6.1.4.1.9.9.368.1.34.17.1.13.3.1 = INTEGER: 0
.1.3.6.1.4.1.9.9.368.1.34.17.1.13.6.1 = INTEGER: 0
.1.3.6.1.4.1.9.9.368.1.34.17.1.13.7.1 = INTEGER: 0
.1.3.6.1.4.1.9.9.368.1.34.17.1.13.8.1 = INTEGER: 0
Here's what the SNMP poller cache is seeing, in case that helps as well:

Code: Select all

 Host: css, SNMP Query: SNMP - cssCPUInstantIndex
Index: 1.3.6.1.4.1.9.9.368.1.34.17.1.13.1.1, Field Name: cssCPUInstantIndex, Field Value: 0
OID: .1.3.6.1.4.1.9.9.368.1.34.17.1.13.1.3.6.1.4.1.9.9.368.1.34.17.1.13.1.1
Host: css, SNMP Query: SNMP - cssCPUInstantIndex
Index: 1.3.6.1.4.1.9.9.368.1.34.17.1.13.2.1, Field Name: cssCPUInstantIndex, Field Value: 0
OID: .1.3.6.1.4.1.9.9.368.1.34.17.1.13.1.3.6.1.4.1.9.9.368.1.34.17.1.13.2.1
Host: css, SNMP Query: SNMP - cssCPUInstantIndex
Index: 1.3.6.1.4.1.9.9.368.1.34.17.1.13.3.1, Field Name: cssCPUInstantIndex, Field Value: 0
OID: .1.3.6.1.4.1.9.9.368.1.34.17.1.13.1.3.6.1.4.1.9.9.368.1.34.17.1.13.3.1
Host: css, SNMP Query: SNMP - cssCPUInstantIndex
Index: 1.3.6.1.4.1.9.9.368.1.34.17.1.13.6.1, Field Name: cssCPUInstantIndex, Field Value: 0
OID: .1.3.6.1.4.1.9.9.368.1.34.17.1.13.1.3.6.1.4.1.9.9.368.1.34.17.1.13.6.1
Host: css, SNMP Query: SNMP - cssCPUInstantIndex
Index: 1.3.6.1.4.1.9.9.368.1.34.17.1.13.7.1, Field Name: cssCPUInstantIndex, Field Value: 0
OID: .1.3.6.1.4.1.9.9.368.1.34.17.1.13.1.3.6.1.4.1.9.9.368.1.34.17.1.13.7.1
Host: css, SNMP Query: SNMP - cssCPUInstantIndex
Index: 1.3.6.1.4.1.9.9.368.1.34.17.1.13.8.1, Field Name: cssCPUInstantIndex, Field Value: 0
OID: .1.3.6.1.4.1.9.9.368.1.34.17.1.13.1.3.6.1.4.1.9.9.368.1.34.17.1.13.8.1
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Cisco CSS CPU template problem

Post by gandalf »

So we've got to change the indexing stuff. It should read
1.1
2.1
3.1
4.1
...
respectively. You should change your XML to

Code: Select all

<interface>
        <name>CSS Sub-Module CPU Info (Instantaneous)</name>
        <description>Get current CSS Sub-Module CPU usage</description>
        <index_order_type>numeric</index_order_type>
        <oid_index>.1.3.6.1.4.1.9.9.368.1.34.17.1.13</oid_index>
        <oid_index_parse>OID/REGEXP:.*([0-9]*\.[0-9]*)$</oid_index_parse>

        <fields>
                <cssCPUInstantIndex>
                        <name>Index</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>OID/REGEXP:.*([0-9]*\.[0-9]*)$</oid>
                </cssCPUInstantIndex>
        </fields>
</interface>
I hope this works. As I have no device like this, I cannot test by myself. Please post DEBUG output for this try.
Reinhard
pyoung
Posts: 13
Joined: Mon Nov 07, 2005 2:51 pm

Post by pyoung »

That didn't work - the device didn't get polled with that setting:

Code: Select all

+ Running data query [10].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/home/cacti-0.8.6h/resource/snmp_queries/cssCPUInstant.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.9.9.368.1.34.17.1.13'
+ Located input field 'cssCPUInstantIndex' [walk]
+ Executing SNMP walk for data @ 'OID/REGEXP:.*([0-9]*\.[0-9]*)$'
+ Found data query XML file at '/home/cacti-0.8.6h/resource/snmp_queries/cssCPUInstant.xml'
+ Found data query XML file at '/home/cacti-0.8.6h/resource/snmp_queries/cssCPUInstant.xml'
+ Found data query XML file at '/home/cacti-0.8.6h/resource/snmp_queries/cssCPUInstant.xml'
Nothing was found in the SNMP cache as well.

Here's the XML file in it's current state:

Code: Select all

<interface>
        <name>CSS Sub-Module CPU Info (Instantaneous)</name>
        <description>Get current CSS Sub-Module CPU usage</description>
        <index_order_type>numeric</index_order_type>
        <oid_index>.1.3.6.1.4.1.9.9.368.1.34.17.1.13</oid_index>
        <oid_index_parse>OID/REGEXP:.*([0-9]*\.[0-9]*)$</oid_index_parse>

        <fields>
                <cssCPUInstantIndex>
                        <name>Index</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>OID/REGEXP:.*([0-9]*\.[0-9]*)$</oid>
                </cssCPUInstantIndex>
        </fields>
</interface>
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

pyoung wrote:That didn't work - the device didn't get polled with that setting:

Code: Select all

<interface>
        <name>CSS Sub-Module CPU Info (Instantaneous)</name>
        <description>Get current CSS Sub-Module CPU usage</description>
        <index_order_type>numeric</index_order_type>
        <oid_index>.1.3.6.1.4.1.9.9.368.1.34.17.1.13</oid_index>
        <oid_index_parse>OID/REGEXP:.*([0-9]*\.[0-9]*)$</oid_index_parse>

        <fields>
                <cssCPUInstantIndex>
                        <name>Index</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>.1.3.6.1.4.1.9.9.368.1.34.17.1.13</oid>
                </cssCPUInstantIndex>
        </fields>
</interface>
Please try the above and post the DEBUG output
Reinhard
pyoung
Posts: 13
Joined: Mon Nov 07, 2005 2:51 pm

Post by pyoung »

DEBUG output:

Code: Select all

+ Running data query [10].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/home/cacti-0.8.6h/resource/snmp_queries/cssCPUInstant.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.9.9.368.1.34.17.1.13'
+ Located input field 'cssCPUInstantIndex' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.9.9.368.1.34.17.1.13'
+ Found item [cssCPUInstantIndex='0'] index: .1 [from value]
+ Found item [cssCPUInstantIndex='0'] index: .1 [from value]
+ Found item [cssCPUInstantIndex='0'] index: .1 [from value]
+ Found item [cssCPUInstantIndex='0'] index: .1 [from value]
+ Found item [cssCPUInstantIndex='0'] index: .1 [from value]
+ Found item [cssCPUInstantIndex='0'] index: .1 [from value]
+ Found data query XML file at '/home/cacti-0.8.6h/resource/snmp_queries/cssCPUInstant.xml'
+ Found data query XML file at '/home/cacti-0.8.6h/resource/snmp_queries/cssCPUInstant.xml'
+ Found data query XML file at '/home/cacti-0.8.6h/resource/snmp_queries/cssCPUInstant.xml'
pyoung
Posts: 13
Joined: Mon Nov 07, 2005 2:51 pm

Post by pyoung »

Had a bit of a revelation, and tried modifying the regex you sent in the last message - looking at the SNMP cache, I knew it was close, so I tried this:

Code: Select all

<interface>
        <name>CSS Sub-Module CPU Info (Instantaneous)</name>
        <description>Get current CSS Sub-Module CPU usage</description>
        <index_order_type>numeric</index_order_type>
        <oid_index>.1.3.6.1.4.1.9.9.368.1.34.17.1.13</oid_index>
        <oid_index_parse>OID/REGEXP:.*([0-9]\.[0-9])$</oid_index_parse>
        <fields>
                <cssCPUInstantIndex>
                        <name>Index</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>.1.3.6.1.4.1.9.9.368.1.34.17.1.13</oid>
                </cssCPUInstantIndex>
        </fields>
</interface>
Which gets me this in a DEBUG:

Code: Select all

+ Running data query [10].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/home/cacti-0.8.6h/resource/snmp_queries/cssCPUInstant.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.9.9.368.1.34.17.1.13'
+ Located input field 'cssCPUInstantIndex' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.9.9.368.1.34.17.1.13'
+ Found item [cssCPUInstantIndex='0'] index: 1.1 [from value]
+ Found item [cssCPUInstantIndex='0'] index: 2.1 [from value]
+ Found item [cssCPUInstantIndex='0'] index: 3.1 [from value]
+ Found item [cssCPUInstantIndex='0'] index: 6.1 [from value]
+ Found item [cssCPUInstantIndex='0'] index: 7.1 [from value]
+ Found item [cssCPUInstantIndex='0'] index: 8.1 [from value]
+ Found data query XML file at '/home/cacti-0.8.6h/resource/snmp_queries/cssCPUInstant.xml'
+ Found data query XML file at '/home/cacti-0.8.6h/resource/snmp_queries/cssCPUInstant.xml'
+ Found data query XML file at '/home/cacti-0.8.6h/resource/snmp_queries/cssCPUInstant.xml'
It's closer to working - close enough that I tried the same xml out on my busier CSS box (we have two). The integer value that's returned from the snmpwalk is being set as the index value on the 'build graphs' page. I would think that should at least be the 'x.y' we're using as the index to build the end of the OID correctly, but I don't know (yet) how to do that - I'm reading the docs to try to figure that out.

Thanks for all your help to this point!

Edit: Since the index field held the value I wanted to graph, I simply switched it to output, instead of an input. I added a field to give each slot it's name, so on the 'create graph' screen, you now see a list of the names of each card in the CSS chassis. I went through the rest of the tutorial, and am waiting on graphs now.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Fine. But I assume that you'll get problem with

Code: Select all

<oid_index_parse>OID/REGEXP:.*([0-9]\.[0-9])$</oid_index_parse>
as this will give you x.y pairs only with one digit each, e.g. not sth like 10.1 or 11.1
Reinhard
pyoung
Posts: 13
Joined: Mon Nov 07, 2005 2:51 pm

Post by pyoung »

Indeed - on a box with more than 9 slots, you'd be correct.

This one, luckily enough, has just 8.

Thank you for all your help over the weekend, I greatly appreciate it.
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests