Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Tue Jul 25, 2017 11:41 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 127 posts ]  Go to page Previous  1 ... 4, 5, 6, 7, 8, 9  Next
Author Message
 Post subject: Re: Cisco interface operational status monitor
PostPosted: Wed Aug 03, 2011 9:06 am 
Offline
Cacti User
User avatar

Joined: Thu Jan 22, 2009 10:09 am
Posts: 160
Location: South GA
I installed this template and it works great.

One thing to note is that I figured out you can create 1 baseline threshold template to apply to all interface status monitors. I based it on 2 hours. What this does is alert upon an up or down change. Then within 2 hours it restores and uses the new value as the base.

For example I set the template to baseline with a deviation up and down of 25%. So when the interface is up (1) and changes to down (2), it alerts because the new value is above 1.25. Then after the average for 2 hours goes above 1.25, the alert will be restored. Then after 2 hours the new threshold for down is 1.5. So when the status changes back to up (1), you will be alerted again. Then once again it will reset itself after 2 hours. I love it!

_________________
-willieb


Top
 Profile  
 
 Post subject: Re: Cisco interface operational status monitor
PostPosted: Tue Oct 11, 2011 6:02 pm 
Offline
Cacti User
User avatar

Joined: Thu Jan 22, 2009 10:09 am
Posts: 160
Location: South GA
Question: What is status of "0" mean? Does anyone know? I had to disable interface alerts because occasionally some of my switches, all interfaces will randomly go to "0" which cacti alerts me on. It gets pretty irritating dealing with all the false alerts. I only want it to alert if it goes to "1" or "2". So typically an interface should be a 1 (up) or a 2 (down). so if a 2 goes to 1 or a 1 goes to 2, then I want to know.

Is there a better way to alert on interface status without alerting on a "0" status. Thanks.

_________________
-willieb


Top
 Profile  
 
 Post subject: Re: Cisco interface operational status monitor
PostPosted: Sat Oct 29, 2011 10:43 am 
Offline
Cacti User

Joined: Tue Jan 26, 2010 6:12 am
Posts: 141
After Upgrading to Cacti 0.8.7h .. Facing intermittent link down status in graph although in router CLI there is no such log.It is happening only for one polling. Next polling again normal.


Anybody else facing the issue??


Top
 Profile  
 
 Post subject: Re: Cisco interface operational status monitor
PostPosted: Sat Oct 29, 2011 11:26 am 
Offline
Cacti User
User avatar

Joined: Thu Jan 22, 2009 10:09 am
Posts: 160
Location: South GA
I am still on "g" release. I think an snmp response of 0 is legit as I get it from several different vendor switches (including Cisco). I don't know what 0 means nor do I want to alert on it. I only want to know if an interface goes from up (1) to down (2) or down (2) to up (1).

The way I have mine setup now is all intefaces above 1.5 is breached so all downed interfaces are active breached thresholds. This works great until it gets a response of 0 and alerts for no actual status change.

I even have tried setting minimum trigger duration to 10 minutes (2 queries) to no avail. Funny thing is also, on the graph it never shows a drop to 0...??

Any ideas how I can setup thresholds to only alert from 1 to 2 or 2 to 1 change? Thanks in advance.

_________________
-willieb


Top
 Profile  
 
 Post subject: Re: Cisco interface operational status monitor
PostPosted: Sat Oct 29, 2011 1:30 pm 
Offline
Cacti User

Joined: Tue Jan 26, 2010 6:12 am
Posts: 141
willieb wrote:
I am still on "g" release. I think an snmp response of 0 is legit as I get it from several different vendor switches (including Cisco). I don't know what 0 means nor do I want to alert on it. I only want to know if an interface goes from up (1) to down (2) or down (2) to up (1).

The way I have mine setup now is all intefaces above 1.5 is breached so all downed interfaces are active breached thresholds. This works great until it gets a response of 0 and alerts for no actual status change.

I even have tried setting minimum trigger duration to 10 minutes (2 queries) to no avail. Funny thing is also, on the graph it never shows a drop to 0...??

Any ideas how I can setup thresholds to only alert from 1 to 2 or 2 to 1 change? Thanks in advance.


For me it is simple:

High Threshold 1 with exact value, in normal condition it will be 1 only.0 will come when there is no response from that device/port.It happened when the card gone faulty.

0=No Response
1=up
2=Down
3=Loop

Also you can set low threshold as .1


Top
 Profile  
 
 Post subject: Re: Cisco interface operational status monitor
PostPosted: Sat Oct 29, 2011 2:15 pm 
Offline
Cacti User
User avatar

Joined: Thu Jan 22, 2009 10:09 am
Posts: 160
Location: South GA
sukanta wrote:
willieb wrote:
I am still on "g" release. I think an snmp response of 0 is legit as I get it from several different vendor switches (including Cisco). I don't know what 0 means nor do I want to alert on it. I only want to know if an interface goes from up (1) to down (2) or down (2) to up (1).

The way I have mine setup now is all intefaces above 1.5 is breached so all downed interfaces are active breached thresholds. This works great until it gets a response of 0 and alerts for no actual status change.

I even have tried setting minimum trigger duration to 10 minutes (2 queries) to no avail. Funny thing is also, on the graph it never shows a drop to 0...??

Any ideas how I can setup thresholds to only alert from 1 to 2 or 2 to 1 change? Thanks in advance.


For me it is simple:

High Threshold 1 with exact value, in normal condition it will be 1 only.0 will come when there is no response from that device/port.It happened when the card gone faulty.

0=No Response
1=up
2=Down
3=Loop

Also you can set low threshold as .1


I guess it's not so easy with what I am trying to accomplish.

With no low threshold set, and a high threshold set to exactly 1, then downed ports that come up (from 2 to 1) will not alert.

I have mine set to 1.5 for the high threshold. It works great alerting me from 1's to 2's and 2's to 1's. But there are times when I guess there's no response from the ports therefore the switch returns a "0" for all ports. This means I get alerted on 2 to 0 status changes when the downed ports never changed status, if that makes sense.

I don't think it means a card or switch is bad, but I can surely understand a no response from the port maybe. My reasoning for this is that I have many switches that all of a sudden return 0's for all ports so I am alerted for all downed ports saying they came up, when indeed they didn't.

I have disabled int stat alerts for now until I can find a better solution.

Long story short, I want to be alerted from a 2 to 1 but not a 2 to 0 change.

_________________
-willieb


Top
 Profile  
 
 Post subject: Re: Cisco interface operational status monitor
PostPosted: Fri Nov 25, 2011 10:28 am 
Offline
Cacti User

Joined: Tue Oct 13, 2009 6:26 am
Posts: 50
Just recently made a new installation of cacti with Cacti 0.8.7h and the new PIA 3.0. As always I downloaded the templates in this post and made the modification to /lib/snmp.php replacing:

Code:
define("REGEXP_SNMP_TRIM", "(hex|counter(32|64)|gauge|gauge(32|64)|float|ipaddress|string|integer):");


with this

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


Which is described earlier in this post, but ater I did this my polling failed all the time. After some investigation I noticed that there has been made a small change in Cacti 0.8.7h so that the string you have to replace looks like this:

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


and the string you have to replace it with looks like this:

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


Just if anyone runs into the same problem as I did.


Top
 Profile  
 
 Post subject: Re: Cisco interface operational status monitor
PostPosted: Wed Dec 28, 2011 11:58 pm 
Offline

Joined: Fri Apr 15, 2011 7:13 am
Posts: 30
Location: Australia
Hey All,

Thanks to all who have gone before and made it work.
I like this template but one thing annoys me.... if up = 1 is up then down should = -1. This way the graph can show almost like a gauge.

I tried to do this by using a CDEF but I am just too new to understand where and if this is possible...
My logic is - IF Result = up then return 1, IF result = down then return -1
Still a little confused after reading this : http://oss.oetiker.ch/rrdtool/tut/cdeftutorial.en.html
CDEF:result=value,UN,0,value,IF

My best guess is : CDEF:result=1,UN,0,-1,IF
But NFI if that is correct.......help..... :)

_________________
++++++ Cacti Newbie ++++++++++++++++++++++++++++++++++++++++++
Cacti 0.8.8f with PIA on a Centos6 VM
Plugins Used: Infopage | RouterConfigs | Spikekill | BOOST | REALTIME | CLOG


Top
 Profile  
 
 Post subject: Re: Cisco interface operational status monitor
PostPosted: Thu Nov 15, 2012 5:30 am 
Offline

Joined: Wed Nov 14, 2012 9:36 am
Posts: 6
hello
i am a new cati user
i test any possible solution but don't work
someone can help me ?
thanks very very much


Top
 Profile  
 
 Post subject: Re: Cisco interface operational status monitor
PostPosted: Wed Sep 04, 2013 2:33 pm 
Offline

Joined: Wed Nov 14, 2012 9:36 am
Posts: 6
I have centos 6.3, cacti-0.8.8b

I do:
1. Import Template from Local File cacti_data_query_snmp_interface_statistics_730.xml, cacti_data_template_interface_status_190.xml, cacti_graph_template_interface_status_679.xml

2. Make changes in file interface.xml
[[email protected] snmp_queries]# cat 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>
......................

3. Make changes as said yeled in /var/www/html/cacti/lib/snmp.php
define("REGEXP_SNMP_TRIM", "(hex|counter(32|64)|gauge|gauge(32|64)|float|ipaddress|string|integer):|(up|down)\(|\)$");

Results:
1. No error mesages
2. I see graph of status interface in tree view mode


Why I can't see the status of interface in preview mode ?


Top
 Profile  
 
 Post subject: Re: Cisco interface operational status monitor
PostPosted: Tue Nov 05, 2013 4:20 am 
Offline
User avatar

Joined: Mon Dec 20, 2004 3:13 am
Posts: 45
Location: The Netherlands
I have CentOS 6.4, cacti-0.8.8b

I only changed the lib/snmp.php to look like this:
Code:
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/BrowseOID.do?translate=true&objectInput=1.3.6.1.2.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.

_________________
Cacti Version - 0.8.8b
CentOS 6.4


Top
 Profile  
 
 Post subject: Re: Cisco interface operational status monitor
PostPosted: Fri Jan 24, 2014 8:48 am 
Offline
Cacti User
User avatar

Joined: Mon Oct 02, 2006 1:22 pm
Posts: 193
Location: Belgium
madsn wrote:
Just recently made a new installation of cacti with Cacti 0.8.7h and the new PIA 3.0. As always I downloaded the templates in this post and made the modification to /lib/snmp.php replacing:

Code:
define("REGEXP_SNMP_TRIM", "(hex|counter(32|64)|gauge|gauge(32|64)|float|ipaddress|string|integer):");


with this

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


Which is described earlier in this post, but ater I did this my polling failed all the time. After some investigation I noticed that there has been made a small change in Cacti 0.8.7h so that the string you have to replace looks like this:

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


and the string you have to replace it with looks like this:

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


Just if anyone runs into the same problem as I did.


Thank you very much, just did a new 0.8.8b install and the old fix gave the same errors as you described.
New fix works very well.

_________________
Joris.
http://www.routerjanitor.com


Top
 Profile  
 
 Post subject: Re: One more strange trouble
PostPosted: Fri Jul 25, 2014 3:33 am 
Offline

Joined: Fri Apr 04, 2014 2:41 am
Posts: 11
maxxic wrote:
I have FedoreCore 6, cacti-0.8.6j

I do:
1. Import Template from Local File cacti_data_query_snmp_interface_statistics_730.xml, cacti_data_template_interface_status_190.xml, cacti_graph_template_interface_status_679.xml

2. Make changes in file interface.xml
[[email protected] snmp_queries]# cat 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>
......................

3. Make changes as said yeled in /var/www/html/cacti/lib/snmp.php
define("REGEXP_SNMP_TRIM", "(hex|counter(32|64)|gauge|gauge(32|64)|float|ipaddress|string|integer):|(up|down)\(|\)$");

Results:
1. No error mesages
2. I don't see graph of status interface
3. But if I click in place where graf is must be - I SEE it!

Why I can't see the status of interface in tree view mode?

Pleease, help! :'-(



I am on cacti 0.8.8b,and i have done the modification as above, as i have the "output: U" error. But once i change the define("REGEXP_SNMP_TRIM", "(hex|counter(32|64)|gauge|gauge(32|64)|float|ipaddress|string|integer):|(up|down)\(|\)$");
, i got the " Host did not respond to SNMP" error.

I found that in my file , it is written originally
define("REGEXP_SNMP_TRIM", "/(hex|counter(32|64)|gauge|gauge(32|64)|float|ipaddress|string|integer):/i");
not exactly as you mentioned. So what should i do to modify this line?


Top
 Profile  
 
 Post subject: Re: Cisco interface operational status monitor
PostPosted: Fri Jul 25, 2014 4:03 am 
Offline
Cacti User
User avatar

Joined: Mon Oct 02, 2006 1:22 pm
Posts: 193
Location: Belgium
My install is using this line :

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

_________________
Joris.
http://www.routerjanitor.com


Top
 Profile  
 
 Post subject: Re: Cisco interface operational status monitor
PostPosted: Fri Jul 25, 2014 4:09 am 
Offline

Joined: Fri Apr 04, 2014 2:41 am
Posts: 11
madsn wrote:
Just recently made a new installation of cacti with Cacti 0.8.7h and the new PIA 3.0. As always I downloaded the templates in this post and made the modification to /lib/snmp.php replacing:

Code:
define("REGEXP_SNMP_TRIM", "(hex|counter(32|64)|gauge|gauge(32|64)|float|ipaddress|string|integer):");


with this

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


Which is described earlier in this post, but ater I did this my polling failed all the time. After some investigation I noticed that there has been made a small change in Cacti 0.8.7h so that the string you have to replace looks like this:

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


and the string you have to replace it with looks like this:

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


Just if anyone runs into the same problem as I did.


Thank you very much , it fixed my issue too.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 127 posts ]  Go to page Previous  1 ... 4, 5, 6, 7, 8, 9  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group