Cisco interface operational status monitor
Moderators: Developers, Moderators
Re: Cisco interface operational status monitor
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!
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
Re: Cisco interface operational status monitor
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.
Is there a better way to alert on interface status without alerting on a "0" status. Thanks.
-willieb
Re: Cisco interface operational status monitor
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??
Anybody else facing the issue??
Re: Cisco interface operational status monitor
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.
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
Re: Cisco interface operational status monitor
For me it is simple: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.
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
Re: Cisco interface operational status monitor
I guess it's not so easy with what I am trying to accomplish.sukanta wrote:For me it is simple: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.
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
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
Re: Cisco interface operational status monitor
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:
with this
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:
and the string you have to replace it with looks like this:
Just if anyone runs into the same problem as I did.
Code: Select all
define("REGEXP_SNMP_TRIM", "(hex|counter(32|64)|gauge|gauge(32|64)|float|ipaddress|string|integer):");
Code: Select all
define("REGEXP_SNMP_TRIM", "(hex|counter(32|64)|gauge|gauge(32|64)|float|ipaddress|string|integer):|(up|down)\(|\)$");
Code: Select all
define("REGEXP_SNMP_TRIM", "/(hex|counter(32|64)|gauge|gauge(32|64)|float|ipaddress|string|integer):/i");
Code: Select all
define("REGEXP_SNMP_TRIM", "/(hex|counter(32|64)|gauge|gauge(32|64)|float|ipaddress|string|integer):|(up|down)\(|\)$/i");
Re: Cisco interface operational status monitor
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.....
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
Cacti 0.8.8f with PIA on a Centos6 VM
Plugins Used: Infopage | RouterConfigs | Spikekill | BOOST | REALTIME | CLOG
Re: Cisco interface operational status monitor
hello
i am a new cati user
i test any possible solution but don't work
someone can help me ?
thanks very very much
i am a new cati user
i test any possible solution but don't work
someone can help me ?
thanks very very much
Re: Cisco interface operational status monitor
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
[root@tepulifc60bnk99 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 ?
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
[root@tepulifc60bnk99 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 ?
Re: Cisco interface operational status monitor
I have CentOS 6.4, cacti-0.8.8b
I only changed the lib/snmp.php to look like this:
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.
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");
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
CentOS 6.4
Re: Cisco interface operational status monitor
Thank you very much, just did a new 0.8.8b install and the old fix gave the same errors as you described.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:
with thisCode: Select all
define("REGEXP_SNMP_TRIM", "(hex|counter(32|64)|gauge|gauge(32|64)|float|ipaddress|string|integer):");
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: Select all
define("REGEXP_SNMP_TRIM", "(hex|counter(32|64)|gauge|gauge(32|64)|float|ipaddress|string|integer):|(up|down)\(|\)$");
and the string you have to replace it with looks like this:Code: Select all
define("REGEXP_SNMP_TRIM", "/(hex|counter(32|64)|gauge|gauge(32|64)|float|ipaddress|string|integer):/i");
Just if anyone runs into the same problem as I did.Code: Select all
define("REGEXP_SNMP_TRIM", "/(hex|counter(32|64)|gauge|gauge(32|64)|float|ipaddress|string|integer):|(up|down)\(|\)$/i");
New fix works very well.
Joris.
http://www.routerjanitor.com
http://www.routerjanitor.com
Re: One more strange trouble
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
[root@tepulifc60bnk99 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?
Re: Cisco interface operational status monitor
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");
define("REGEXP_SNMP_TRIM", "/(hex|counter(32|64)|gauge|gauge(32|64)|float|ipaddress|string|integer):|(up|down)\(|\)$/i");
Joris.
http://www.routerjanitor.com
http://www.routerjanitor.com
Re: Cisco interface operational status monitor
Thank you very much , it fixed my issue too.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:
with thisCode: Select all
define("REGEXP_SNMP_TRIM", "(hex|counter(32|64)|gauge|gauge(32|64)|float|ipaddress|string|integer):");
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: Select all
define("REGEXP_SNMP_TRIM", "(hex|counter(32|64)|gauge|gauge(32|64)|float|ipaddress|string|integer):|(up|down)\(|\)$");
and the string you have to replace it with looks like this:Code: Select all
define("REGEXP_SNMP_TRIM", "/(hex|counter(32|64)|gauge|gauge(32|64)|float|ipaddress|string|integer):/i");
Just if anyone runs into the same problem as I did.Code: Select all
define("REGEXP_SNMP_TRIM", "/(hex|counter(32|64)|gauge|gauge(32|64)|float|ipaddress|string|integer):|(up|down)\(|\)$/i");
Who is online
Users browsing this forum: No registered users and 4 guests