Cisco 6500 CatOS Port Names - Maybe this works?
Moderators: Developers, Moderators
Cisco 6500 CatOS Port Names - Maybe this works?
Hi
I believe that people have had problems matching the port names to the interface numbers in Cisco 6500 routers (see the following)
http://forums.cacti.net/about4844.html
http://forums.cacti.net/about2125.html
Now in my 6500 I have the port descriptions set using the "set portname" command, and Cacti messes up the matching to the interface numbers. For example, it shows "Nova - 3/12" instead of "Nova - 4/10".
However, just to test, I set a port description using the "set description" command, which translates to ifAlias. For this port, Cacti does the matching correctly.
Does anyone have any information regarding this? Whether this solution works without having to change to Cisco IOS?
Thanks[/url][/code]
I believe that people have had problems matching the port names to the interface numbers in Cisco 6500 routers (see the following)
http://forums.cacti.net/about4844.html
http://forums.cacti.net/about2125.html
Now in my 6500 I have the port descriptions set using the "set portname" command, and Cacti messes up the matching to the interface numbers. For example, it shows "Nova - 3/12" instead of "Nova - 4/10".
However, just to test, I set a port description using the "set description" command, which translates to ifAlias. For this port, Cacti does the matching correctly.
Does anyone have any information regarding this? Whether this solution works without having to change to Cisco IOS?
Thanks[/url][/code]
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
cacti saves some "pseudo-static" readings from devices when accessing them for the first time. Data is stored into the table poller_cache. Cacti uses Re-Indexing, that may be triggered by three different events: When uptimes goes backwards, e.g. device is rebootet, when Index Count Changed, e.g. new Ports added, or Verify All Fields means checking always everything (this is not THAT performant).
You may run php ./dev/recache.php, e.g. from crontab, to recache manually
Reinhard
You may run php ./dev/recache.php, e.g. from crontab, to recache manually
Reinhard
do you have snmp ifindex-persist enabled on your switch?
Cacti1 OS: CentOS 5.6 | 300+ devices
Cacti2 OS: CentOS 5.6 | 300+ devices
King of the Elves
Local Anarchists Union #427
"Anarchism is founded on the observation that since few men are wise enough to rule themselves, even fewer are wise enough to rule others." -Edward Abbey
Cacti2 OS: CentOS 5.6 | 300+ devices
King of the Elves
Local Anarchists Union #427
"Anarchism is founded on the observation that since few men are wise enough to rule themselves, even fewer are wise enough to rule others." -Edward Abbey
reinhard and egarnel, thanks for your replies. I think I know what the problem is. Typically if you do an SNMP query for ifAlias, the router returns the results in the form of .1.3.6.1.2.1.31.1.1.1.1.<index>.
However, as I said, in the Cisco CatOS, the port descriptions are stored not in ifAlias, but in ifPortName. When you do an SNMP query for that, the results are returned in the form of 1.3.6.1.4.1.9.5.1.4.1.1.4<blade>.<port>
So as you can see (and as mentioned in http://forums.cacti.net/about2125.html), if you want to use the ifPortName, you need to do some parsing because you have the <blade>.<port> instead of the typical <index>.
Reinhard, is there any way to specify 1.3.6.1.4.1.9.5.1.4.1.1.4<blade>.<port> in the graph template?
However, as I said, in the Cisco CatOS, the port descriptions are stored not in ifAlias, but in ifPortName. When you do an SNMP query for that, the results are returned in the form of 1.3.6.1.4.1.9.5.1.4.1.1.4<blade>.<port>
So as you can see (and as mentioned in http://forums.cacti.net/about2125.html), if you want to use the ifPortName, you need to do some parsing because you have the <blade>.<port> instead of the typical <index>.
Reinhard, is there any way to specify 1.3.6.1.4.1.9.5.1.4.1.1.4<blade>.<port> in the graph template?
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
You may use a 2-number index like x.y. But this must be used throughout the Data Query (= XML file). You cannot change from "normal" index to "2-number index" in the same XML.ar1 wrote:Reinhard, is there any way to specify 1.3.6.1.4.1.9.5.1.4.1.1.4<blade>.<port> in the graph template?
But if all the data you want to retrieve is within the same table indexed by x.y, this is doable. This will requires some OID/REGEXP magic.
If this approach fits your need, please let me know.
Reinhard
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
I fought with this one. It was kind of a low priority for me. I finally developed another OID gathering method that would call a script to return port names and thus allow the use of the standard snmp data query type.
However, I no longer have access to these devices and therefore, no way to test out a data query.
One thing I can say is that it is not strait forward.
TheWitness
However, I no longer have access to these devices and therefore, no way to test out a data query.
One thing I can say is that it is not strait forward.
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
- darkmatter
- Posts: 3
- Joined: Thu Apr 20, 2006 3:17 pm
- Location: Fort Belvoir, VA
- Contact:
Hello, I am a new user to Cacti, and I love it so far. I have been spending the past few hours searching the forums for information about this issue. I just wanted to ping this thread to see if anyone had come up with a solution yet.
I already wrote a modified version of the bb-xsnmp.pl script for Big Brother to fix this same thing; it now pulls the ports from the STACK-MIB instead of the IF-MIB, and creates an index based off the blade.port style. Then uses the portIfIndex so it can fetch the port speed from ifSpeed. Works great within the Big Brother context, but I'm not sure how to tweak this for Cacti yet. I'll start looking at how some of the Cacti scripts handle data, but in the meantime, has anyone got another solution before I attempt this?
I already wrote a modified version of the bb-xsnmp.pl script for Big Brother to fix this same thing; it now pulls the ports from the STACK-MIB instead of the IF-MIB, and creates an index based off the blade.port style. Then uses the portIfIndex so it can fetch the port speed from ifSpeed. Works great within the Big Brother context, but I'm not sure how to tweak this for Cacti yet. I'll start looking at how some of the Cacti scripts handle data, but in the meantime, has anyone got another solution before I attempt this?
I have a 6509 running IOS so I don't know if it will work the same under Catos but have you tried the [ifAlias] command here was my thread that I had on the portname issue
http://forums.cacti.net/viewtopic.php?t ... highlight=
after I modified the interface.xml everything worked the way I wanted it to so now my |host_description|-Port-|query_ifName|-|query_ifAlias| provides me with the correct description I want 6509-Port-Fa3/1-PortDescription
http://forums.cacti.net/viewtopic.php?t ... highlight=
after I modified the interface.xml everything worked the way I wanted it to so now my |host_description|-Port-|query_ifName|-|query_ifAlias| provides me with the correct description I want 6509-Port-Fa3/1-PortDescription
- darkmatter
- Posts: 3
- Joined: Thu Apr 20, 2006 3:17 pm
- Location: Fort Belvoir, VA
- Contact:
I wish it were that simple. None of the ifAlias values were set by the networking team here, only the portName values. Sorry I forgot to specify that we're running CatOS. I could very easily write a script to just return the portName for any given host and interface number, but I'm not sure how I'd include that into the index of values for the interface.xml.
No chance of your network team going back and adding them i guess??? I am the Network Admin so I can say it has taken me a while to get the descriptions on the 6509 the way I wanted them, but the nice thing is once all the work is set on cacti and the 6509 changes/updates are a breeze and it doesn't take long to add new graphs
- darkmatter
- Posts: 3
- Joined: Thu Apr 20, 2006 3:17 pm
- Location: Fort Belvoir, VA
- Contact:
Yeah I could, I was trying to alleviate some work on their part though, and I'd have to make sure we establish a new procedure where names are stored in ifAlias from now on. I was primarily trying to stick to the portName because there are other OIDs in the CISCO-STACK-MIB that are also valuable for troubleshooting. I'll write a quick script to generate the commands for setting the portNames to the appropriate ifAliases.
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
I had a roadmap to a patch developed, but my time is scarce. I would still be willing to complete the code, but I will need access and incentive to finish it at this point.
Larry
Larry
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Were you able to come up with the correct XML file fot this?darkmatter wrote:I wish it were that simple. None of the ifAlias values were set by the networking team here, only the portName values. Sorry I forgot to specify that we're running CatOS. I could very easily write a script to just return the portName for any given host and interface number, but I'm not sure how I'd include that into the index of values for the interface.xml.
Who is online
Users browsing this forum: No registered users and 0 guests