Cisco interface operational status monitor

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

Moderators: Developers, Moderators

Post Reply
ch3i
Posts: 17
Joined: Tue Mar 03, 2015 6:22 am

Re: Cisco interface operational status monitor

Post by ch3i »

Hi,

I've modified the graph template with a CDEF to have status like that :
UP > 1
Down > 0

I've applied that CDEF :

Code: Select all

cdef=CURRENT_DATA_SOURCE,-1,*,2,+
Atreides
Cacti User
Posts: 174
Joined: Mon May 31, 2010 9:26 am

Re: Cisco interface operational status monitor

Post by Atreides »

proohu01 wrote:I have CentOS 6.4, cacti-0.8.8b

I only changed the lib/snmp.php to look like this:

Code: Select all

define("REGEXP_SNMP_TRIM", "/(hex|counter(32|64)|gauge|gauge(32|64)|float|ipaddress|string|integer):|(up|down|dormant|testing|notpresent)\(|\)$/i");
Note that I also included dormant;testing and notpresent. We use the status "dormant" to see if a router is using the celular interface or not. If it is, the status becomes 5, THOLD gives us a warning. See Cisco page: http://tools.cisco.com/Support/SNMP/do/ ... .1.2.2.1.8

Make sure to change the comment field in the graph template "Interface - Status" to read "(1=Up | 2=Down | 3=Testing | 4=Unknown | 5=Dormant | 6=notPresent)"

The graph works perfect. Also in preview mode.
Hi,
Anyone knows if there's a way to get a different value for admin down vs down. Right now I get a "2" no matter if the interface is down or if its in admin down status.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Cisco interface operational status monitor

Post by Howie »

Admin status comes from a different OID (I think it's .9 instead of .8 at the end)
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
wisperwind
Posts: 1
Joined: Wed Jun 01, 2016 2:10 am

Re: Cisco interface operational status monitor

Post by wisperwind »

I had the same problem before but the problem is solved now. I googled a lot and seems they all didn't solve my problem.once I replaced cmd.php with spine then everything goes fine.

and I can show you guys some of my configuration then you can compare with yours.
1. vim /var/www/html/cacti/resource/snmp_queries/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>
2.vim /etc/php.d/snmp.ini
extension=snmp.so
aftershocks
Cacti User
Posts: 117
Joined: Fri Aug 22, 2014 2:11 pm

Re: Cisco interface operational status monitor

Post by aftershocks »

Hi there,

Does anyone have the same issue as me? Please see the pictures... Not sure why it's doing that... How do I fix something like that?

Anyone with any suggestions?

Thanks..
Attachments
sample2.jpg
sample2.jpg (183.64 KiB) Viewed 5555 times
sample1.jpg
sample1.jpg (203.89 KiB) Viewed 5555 times
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Cisco interface operational status monitor

Post by Howie »

Maybe you have your status RRA configured as a COUNTER instead of a GAUGE?

Then, when the value goes from 2 to 1, Cacti has to assume that it went all the way to the maximum, and then back around to 1, because counters only ever go up.

Not sure about the second graph...
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
aftershocks
Cacti User
Posts: 117
Joined: Fri Aug 22, 2014 2:11 pm

Re: Cisco interface operational status monitor

Post by aftershocks »

Hey Howie,

Good to hear from you again... How abouts do I go and change from COUNTER to GAUGE for the RRA?
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Cisco interface operational status monitor

Post by Howie »

aftershocks wrote:Hey Howie,

Good to hear from you again... How abouts do I go and change from COUNTER to GAUGE for the RRA?
For an existing datasource, I'm not sure. I believe you use the rrdtune tool that comes with RRDtool. Have you confirmed that this is the issue?
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
aftershocks
Cacti User
Posts: 117
Joined: Fri Aug 22, 2014 2:11 pm

Re: Cisco interface operational status monitor

Post by aftershocks »

I've confirmed that it's on GAUGE...
Attachments
guage.jpg
guage.jpg (104.24 KiB) Viewed 5547 times
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Cisco interface operational status monitor

Post by Howie »

Can you also confirm the OID? The top one looks more like uptime, and the bottom one looks more like traffic.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
aftershocks
Cacti User
Posts: 117
Joined: Fri Aug 22, 2014 2:11 pm

Re: Cisco interface operational status monitor

Post by aftershocks »

.. Still doesn't work.. :(
aftershocks
Cacti User
Posts: 117
Joined: Fri Aug 22, 2014 2:11 pm

Re: Cisco interface operational status monitor

Post by aftershocks »

My mistake.. I'm tyring to graph other vendors besides cisco.. Maybe that's why it's throwing the results off...

I tested on Cisco and it works.. I did an snmpwalk on juniper and other vendors and timed out.. So I'm guessing there is no way of telling the operational status of non-cisco device in cacti? Unless I modify the OID in interface.xml to suit each vendor?
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Cisco interface operational status monitor

Post by Howie »

This is not cisco specific. IF-MIB is an IETF standard...
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
aftershocks
Cacti User
Posts: 117
Joined: Fri Aug 22, 2014 2:11 pm

Re: Cisco interface operational status monitor

Post by aftershocks »

I started from scratch as I couldn't fix it before and it was graphing the interface status properly... It was working fine for the longest time...

A day ago, it started to graph the interface status all weird again... Any clue why this is happening? Nothing was touched...
aftershocks
Cacti User
Posts: 117
Joined: Fri Aug 22, 2014 2:11 pm

Re: Cisco interface operational status monitor

Post by aftershocks »

Check it out... It seems like any interface status graphs that I create moving forward is all going to be messed up... It's reading 45.01M... What is happening?

It's like it's graphing traffic and not the proper interface status state...
Attachments
weird.jpg
weird.jpg (53.1 KiB) Viewed 3851 times
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests