I modified library to page me. However it pages constantly.
I would like it to page me when it goes down and comes up. Presently
it pages me every polling interval during an outage
what am I doing wrong
here is the section I added email and paging to
------------------
proc MoJoAction { id msg } {
global default
set action [ined attribute $id "Monitor:ThresholdAction"]
if {$action == ""} {
if {[info exists default(Monitor.ThresholdAction)]} {
set action $default(Monitor.ThresholdAction)
} else {
return
}
}
if {[lsearch $action syslog] >= 0} {
syslog warning $msg
}
if {[lsearch $action flash] >= 0} {
set jobid [job current]
if {$jobid != ""} {
set secs [expr {[$jobid cget -interval] / 1000}]
} else {
set secs 2
}
ined flash $id $secs
}
if {[lsearch $action write] >= 0} {
writeln "[clock format [clock seconds]]:"
writeln $msg
writeln
}
if {[lsearch $action page] >= 0} {
exec echo "[ined name $id] is down [exec date]" | /usr/ucb/mail -s "[ined
name $id] is down" 7168262@syktel.com <mailto:7168262@syktel.com>
writeln "page sent"
writeln
}
if {[lsearch $action email] >= 0} {
exec echo "[ined name $id] is down [exec date]" | /usr/ucb/mail -s "[ined
name $id] is down" net-ops@thinklinkinc.com
<mailto:net-ops@thinklinkinc.com>
writeln "email sent"
writeln
}
}
Bob Jaques
Director, Technical Operations
ThinkLink Inc.
650 Townsend, Suite 350
San Francisco, CA 94103
ThinkLink (Ph/Fax) 415-462-0675
Main 415-252-6200 x 295
< <mailto:bjaques@thinklinkinc.com> mailto:bjaques@thinklinkinc.com>
Free voicemail, fax and email
accessible over the internet
with five cent a minute calling:
www.thinklink.com <http://www.thinklink.com/>
-- !! This message is brought to you via the `tkined & scotty' mailing list. !! Please do not reply to this message to unsubscribe. To subscribe or !! unsubscribe, send a mail message to <tkined-request@ibr.cs.tu-bs.de>. !! See http://wwwsnmp.cs.utwente.nl/~schoenw/scotty/ for more information.
This archive was generated by hypermail 2b29 : Mon Jan 08 2001 - 15:27:33 MET