alert on port link

Support questions about the Threshold plugin

Moderators: Developers, Moderators

Post Reply
User avatar
cyrill
Cacti User
Posts: 271
Joined: Fri Jan 25, 2008 8:43 am
Location: California - USA

alert on port link

Post by cyrill »

Hello.

I've a problem. I just want send an email with thold when a port of a Switch is down !

Why can I set up this threshold ???

thanks for your help
Cacti 0.8.7b

-> Architecture plugin
-> Thold plugin
-> Monitor plugin
-> Weathermap plugin
User avatar
cyrill
Cacti User
Posts: 271
Joined: Fri Jan 25, 2008 8:43 am
Location: California - USA

Post by cyrill »

no idea ??
Cacti 0.8.7b

-> Architecture plugin
-> Thold plugin
-> Monitor plugin
-> Weathermap plugin
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

When traffic=0? Even on a quiet link there are a few bytes of traffic usually.

Other than that, you would need to find something to graph, so that threshold can see it - e.g. ifOperStatus.
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!)
User avatar
cyrill
Cacti User
Posts: 271
Joined: Fri Jan 25, 2008 8:43 am
Location: California - USA

Post by cyrill »

ok. and what's ifOperStatus ? is the status of my ethernet card ? what's return it ?
Cacti 0.8.7b

-> Architecture plugin
-> Thold plugin
-> Monitor plugin
-> Weathermap plugin
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

cyrill wrote:ok. and what's ifOperStatus ? is the status of my ethernet card ? what's return it ?
It's the SNMP MIB variable that shows if the interface is up, down or disabled. Search on these forums for ifOperStatus.
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!)
User avatar
cyrill
Cacti User
Posts: 271
Joined: Fri Jan 25, 2008 8:43 am
Location: California - USA

Post by cyrill »

hum ! it's very interressant concept ! it's very accurate !!!

And it's possible to use this concept with thold ?
Cacti 0.8.7b

-> Architecture plugin
-> Thold plugin
-> Monitor plugin
-> Weathermap plugin
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

It's a number that you can apply a threshold to. I haven't tried it, but it should work.
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!)
User avatar
cyrill
Cacti User
Posts: 271
Joined: Fri Jan 25, 2008 8:43 am
Location: California - USA

Post by cyrill »

And can I set up a threshold template with this system ? How can I insert it to the Thold ? Must I create a new Data Template ?
Cacti 0.8.7b

-> Architecture plugin
-> Thold plugin
-> Monitor plugin
-> Weathermap plugin
User avatar
cyrill
Cacti User
Posts: 271
Joined: Fri Jan 25, 2008 8:43 am
Location: California - USA

Post by cyrill »

please help me ! how can I get this value ? Must I set a new sample OID ? I just want to say the way that I must take !
Cacti 0.8.7b

-> Architecture plugin
-> Thold plugin
-> Monitor plugin
-> Weathermap plugin
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

YES you need to make a new data template. YES it's a new OID. YES it's in another forum thread already.
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!)
User avatar
cyrill
Cacti User
Posts: 271
Joined: Fri Jan 25, 2008 8:43 am
Location: California - USA

Post by cyrill »

I've search but i don't found...

I've found that I must use the OID .1.3.6.2.1.2.2.1.8 and it's return all status of each interface (1 for up and 2 for down). I've understand that I must use this in a new Simple OID. But I don't understand the next step....
Cacti 0.8.7b

-> Architecture plugin
-> Thold plugin
-> Monitor plugin
-> Weathermap plugin
User avatar
chrisgapske
Cacti User
Posts: 278
Joined: Tue May 22, 2007 7:56 am
Location: Pensacola, Fl - Padacuh, Ky-Alpena, MI-Gulf Shores,AL

Post by chrisgapske »

I use this all the time.

So I am basically polling the OID index for interface status.



It is best to ignora MIB data because we don’t want to have it translate
to UP or Down for you .. You want the data to come back as 1 or 2



These are the changed necessary to monitor interface



And if you want you can do a customer CDF





Interface Status..



Update



(Cacti install path)/resource/snmp_queries/interfaces.xml



Make Change



<ifOperStatus

<name>Status</name>

<method>walk</method>

<source>VALUE/REGEXP:[a-zA-Z]{1,}\(([1-9]{1})+\)$</source>

<direction>output</direction>

<oid.1.3.6.1.2.1.2.2.1.8</oid>

</ifOperStatus>







(Cacti install path)/lib/snmp.php



Change



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)\(|\)$");




After you have made these changes you should be able to graph port status just like you would traffic or any other.


you will get a 1 for up and 2 for down. You can do a CDF to convert the number but I don't know how.
Attachments
cacti_data_template_interface_-_status.xml
Import this template.
(9.21 KiB) Downloaded 363 times
cacti_graph_template_interface_-_status_1up_0down.xml
Import this template.
(14.08 KiB) Downloaded 385 times
User avatar
cyrill
Cacti User
Posts: 271
Joined: Fri Jan 25, 2008 8:43 am
Location: California - USA

Post by cyrill »

thanks but i've an error !

Code: Select all

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-20 \
--title="swi13001 - IntStatus - |query_ifDescr|" \
--rigid \
--base=1000 \
--height=50 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="status" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/var/www/cacti/rra/swi13001_int_status_1341.rrd":int_status:AVERAGE \
CDEF:cdefa=a,2,-,-1,* \
AREA:cdefa#00BF47FF:"Current status\:"  \
GPRINT:a:LAST:"%8.2lf %s\n"  \
COMMENT:"(1 = Up | 0 = Down)\n" 
RRDTool Says:

ERROR: opening '/var/www/cacti/rra/swi13001_int_status_1341.rrd': No such file or directory

snifff help me
Cacti 0.8.7b

-> Architecture plugin
-> Thold plugin
-> Monitor plugin
-> Weathermap plugin
apm13
Posts: 3
Joined: Wed Dec 17, 2008 3:54 am
Contact:

Post by apm13 »

cyrill wrote:thanks but i've an error !

Code: Select all

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-20 \
--title="swi13001 - IntStatus - |query_ifDescr|" \
--rigid \
--base=1000 \
--height=50 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="status" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/var/www/cacti/rra/swi13001_int_status_1341.rrd":int_status:AVERAGE \
CDEF:cdefa=a,2,-,-1,* \
AREA:cdefa#00BF47FF:"Current status\:"  \
GPRINT:a:LAST:"%8.2lf %s\n"  \
COMMENT:"(1 = Up | 0 = Down)\n" 
RRDTool Says:

ERROR: opening '/var/www/cacti/rra/swi13001_int_status_1341.rrd': No such file or directory

snifff help me
User avatar
chrisgapske
Cacti User
Posts: 278
Joined: Tue May 22, 2007 7:56 am
Location: Pensacola, Fl - Padacuh, Ky-Alpena, MI-Gulf Shores,AL

Post by chrisgapske »

looks like you did not edit your snmp.conf file for cacti.

cyrill wrote:thanks but i've an error !

Code: Select all

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-20 \
--title="swi13001 - IntStatus - |query_ifDescr|" \
--rigid \
--base=1000 \
--height=50 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="status" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/var/www/cacti/rra/swi13001_int_status_1341.rrd":int_status:AVERAGE \
CDEF:cdefa=a,2,-,-1,* \
AREA:cdefa#00BF47FF:"Current status\:"  \
GPRINT:a:LAST:"%8.2lf %s\n"  \
COMMENT:"(1 = Up | 0 = Down)\n" 
RRDTool Says:

ERROR: opening '/var/www/cacti/rra/swi13001_int_status_1341.rrd': No such file or directory

snifff help me
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests