Cisco interface operational status monitor

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

Moderators: Developers, Moderators

Post Reply
aftershocks
Cacti User
Posts: 117
Joined: Fri Aug 22, 2014 2:11 pm

Re: Cisco interface operational status monitor

Post by aftershocks »

This is what is in the interface.xml

<ifOperStatus>
<name>Status</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.2.1.2.2.1.8</oid>
</ifOperStatus>


I do a snmpwalk to confirm... Values are correct.. But not graphing correctly.. Anyone having this issue?

snmpwalk -v 2c -c public 10.75.255.1 .1.3.6.1.2.1.2.2.1.8
iso.3.6.1.2.1.2.2.1.8.1 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.4 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.5 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.6 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.7 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.8 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.9 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.10 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.11 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.12 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.17 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.18 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.21 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.22 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.23 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.33 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.501 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.502 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.503 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.504 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.505 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.506 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.507 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.508 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.509 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.510 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.511 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.512 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.513 = INTEGER: 2
iso.3.6.1.2.1.2.2.1.8.514 = INTEGER: 2
iso.3.6.1.2.1.2.2.1.8.515 = INTEGER: 2
iso.3.6.1.2.1.2.2.1.8.516 = INTEGER: 2
iso.3.6.1.2.1.2.2.1.8.517 = INTEGER: 2
iso.3.6.1.2.1.2.2.1.8.518 = INTEGER: 2
iso.3.6.1.2.1.2.2.1.8.519 = INTEGER: 2
iso.3.6.1.2.1.2.2.1.8.520 = INTEGER: 2
iso.3.6.1.2.1.2.2.1.8.521 = INTEGER: 2
iso.3.6.1.2.1.2.2.1.8.522 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.523 = INTEGER: 2
iso.3.6.1.2.1.2.2.1.8.524 = INTEGER: 2
iso.3.6.1.2.1.2.2.1.8.525 = INTEGER: 2
iso.3.6.1.2.1.2.2.1.8.526 = INTEGER: 2
iso.3.6.1.2.1.2.2.1.8.527 = INTEGER: 2
iso.3.6.1.2.1.2.2.1.8.528 = INTEGER: 2
iso.3.6.1.2.1.2.2.1.8.529 = INTEGER: 2
iso.3.6.1.2.1.2.2.1.8.530 = INTEGER: 2
iso.3.6.1.2.1.2.2.1.8.531 = INTEGER: 2
iso.3.6.1.2.1.2.2.1.8.532 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.533 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.534 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.535 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.536 = INTEGER: 2
iso.3.6.1.2.1.2.2.1.8.537 = INTEGER: 2
iso.3.6.1.2.1.2.2.1.8.538 = INTEGER: 2
iso.3.6.1.2.1.2.2.1.8.539 = INTEGER: 2
iso.3.6.1.2.1.2.2.1.8.540 = INTEGER: 2
iso.3.6.1.2.1.2.2.1.8.541 = INTEGER: 2
iso.3.6.1.2.1.2.2.1.8.542 = INTEGER: 2
iso.3.6.1.2.1.2.2.1.8.543 = INTEGER: 2
iso.3.6.1.2.1.2.2.1.8.545 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.546 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.547 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.548 = INTEGER: 2
iso.3.6.1.2.1.2.2.1.8.549 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.550 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.551 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.552 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.553 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.554 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.555 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.556 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.557 = INTEGER: 7
iso.3.6.1.2.1.2.2.1.8.561 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.562 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.563 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.564 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.565 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.566 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.567 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.568 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.569 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.570 = INTEGER: 1

Not sure why there is a 7....

Same issue as these people... http://forums.cacti.net/viewtopic.php?f=21&t=56295
Rno
Cacti Pro User
Posts: 704
Joined: Wed Dec 07, 2011 9:19 am

Re: Cisco interface operational status monitor

Post by Rno »

On the interface.xml
Direction has to be output not input, and source ius wrong:
<ifOperStatus>
<name>Status</name>
<method>walk</method>
<source>VALUE/REGEXP:[a-zA-Z]{1,}\(([1-]{1})+\)$</source>
<direction>output</direction>
<oid>.1.3.6.1.2.1.2.2.1.8</oid>
</ifOperStatus>
Test
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
aftershocks
Cacti User
Posts: 117
Joined: Fri Aug 22, 2014 2:11 pm

Re: Cisco interface operational status monitor

Post by aftershocks »

Thank you so much Rno! I will give that a shot and see if it corrects it..

I didn't make any modifications to the template - I just imported it and it was working fine for almost a year, but then yesterday, when I try adding new devices and creating these graphs, it started to mess up as if it was graphing like a traffic trend.. No changes were made to the configs.. It just started to do that..

I searched around and noticed other people had the same issue.. like this guy.. http://forums.cacti.net/viewtopic.php?f=21&t=55148

So it's throwing off weathermap as it's using the interface status to display the link lights...

One thing I also did notice is this... Please check the screen shot... Is it suppose to be "IfInOctects (BytesIn)"? Or something different? Because I didn't touch any of that. It was like that when I imported the template.

Do I have to rebuild the poller after I make the changes in the interface.xml file as well as the snmp file for it to take effect?

Thanks!
Rno
Cacti Pro User
Posts: 704
Joined: Wed Dec 07, 2011 9:19 am

Re: Cisco interface operational status monitor

Post by Rno »

When you said no change, did you import other template ?

"
One thing I also did notice is this... Please check the screen shot... Is it suppose to be "IfInOctects (BytesIn)"? Or something different? Because I didn't touch any of that. It was like that when I imported the template.
"
What you mean by IfInOctets ? It's Status nothing more !

Can you do that on one of your data source:
*Turn On Data Source Debug Mode"

en return the result
Test
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
aftershocks
Cacti User
Posts: 117
Joined: Fri Aug 22, 2014 2:11 pm

Re: Cisco interface operational status monitor

Post by aftershocks »

Sorry! Forgot to attach the screen shot.. and Yes, I think I had imported other templates after importing the Interface Operation status...
Attachments
Screenshot_2.png
Screenshot_2.png (11.75 KiB) Viewed 5093 times
aftershocks
Cacti User
Posts: 117
Joined: Fri Aug 22, 2014 2:11 pm

Re: Cisco interface operational status monitor

Post by aftershocks »

The drop down doesn't have IfOperStatus (status)
Attachments
Screenshot_3.png
Screenshot_3.png (23.78 KiB) Viewed 5093 times
aftershocks
Cacti User
Posts: 117
Joined: Fri Aug 22, 2014 2:11 pm

Re: Cisco interface operational status monitor

Post by aftershocks »

Thank you so much Rno! I got it to work!

I made the changes that you suggested, but it wasn't working still.. I re-imported the template and then noticed the data source ifOperStatus (status) now selected and available in the drop down.. I then rebuilt the poller cache.. Still no luck..

I had to restart the server and then it started to graph properly again...

Thank you so much for your help Sir!! You've been a great help!
blackbrayn
Posts: 7
Joined: Sun Apr 01, 2012 12:43 pm

Re: Cisco interface operational status monitor

Post by blackbrayn »

Changing the direction from input to output in interface.xml ( so we can get the ifOperStatus field under associated data templates) disables the status feature under new graphs where is lists the SNMP - Interface Statistics for all of the interfaces@device.
Any idea how to fix this?
ps: i already made the changes in lib/snmp.php :

define("REGEXP_SNMP_TRIM", "/(hex|counter(32|64)|gauge|gauge(32|64)|float|ipaddress|string|integer):|(up|down)\(|\)$/i");

and snmp_queries/interface.xml :

<ifOperStatus>
<name>Status</name>
<method>walk</method>
<source>VALUE/REGEXP:[a-zA-Z]{1,}\(([1-]{1})+\)$</source>
<direction>output</direction>
<oid>.1.3.6.1.2.1.2.2.1.8</oid>
</ifOperStatus>
Attachments
interface_status.png
interface_status.png (26.3 KiB) Viewed 3985 times
bmfmancini
Cacti User
Posts: 250
Joined: Wed Mar 13, 2019 3:37 pm
Location: toronto
Contact:

Re: Cisco interface operational status monitor

Post by bmfmancini »

Is this template still working on 1.2.x

The default interface.xml template is set to input-output

I imported the graph template fine but when I try to create a graph I get this
status.JPG
status.JPG (68.35 KiB) Viewed 3944 times
Telecom Lifer, Monitoring and performance enthusiast, Father, Husband

Cacti Bug Hunter and Member

www.seanmancini.com
sean(at)seanmancini.com
github.com/bmfmancini

My Cacti scripts and templates ( Non official)
Cacti install wizard https://github.com/bmfmancini/cacti-install-wizard
Cacti templates https://github.com/bmfmancini/Cacti-templates

Always willing to help!
Atreides
Cacti User
Posts: 174
Joined: Mon May 31, 2010 9:26 am

Re: Cisco interface operational status monitor

Post by Atreides »

Its working, try this template wich works for me.
kevinmorales
Posts: 13
Joined: Wed Mar 13, 2013 10:57 am
Location: Nicaragua

Re: Cisco interface operational status monitor

Post by kevinmorales »

Hi, I made the change in interfaces.xml and snmp.php, but now when I query a interfaces it do not show the column "Status" and I need to see it to choose only interfaces in state "UP" to graph!,

could anyone help me please!,

Thanks in advance!
Attachments
after_direction_output.png
after_direction_output.png (13.14 KiB) Viewed 2900 times
before_direction_input.png
before_direction_input.png (9.59 KiB) Viewed 2900 times
Kevin Morales
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests