*** ip_monitor.tcl.orig Tue Sep 19 11:21:14 1995
--- ip_monitor.tcl Tue Sep 19 14:04:03 1995
***************
*** 61,66 ****
--- 61,95 ----
}
##
+ ## Once an icon has turned blue, we need to acknowledge it to
+ ## Get it back to its original color
+ ##
+
+ proc Acknowledge { list } {
+ global reachability_color
+
+ if {![info exists reachability_ids]} { set reachability_ids "" }
+
+ foreach litem $list {
+ set type [lindex $litem 0]
+ set id [lindex $litem 1]
+ if {$type == "GROUP"} {
+ ined -noupdate color $id $reachability_color($id)
+ set reachability_color($id) ""
+ foreach m [ined member $id] {
+ if {[ined type $m] != "NODE"} { continue }
+ if {[ined color $m] == "blue"} {
+ ined -noupdate color $m $reachability_color($m)
+ set reachability_color($m) ""
+ }
+ }
+ }
+ set reachability_color($id) ""
+ ined -noupdate color $id $reachability_color($id)
+ }
+ }
+
+ ##
## Restart a monitor job by calling cmd. Build the list of objects
## from tkined using ined retrieve commands.
##
***************
*** 177,182 ****
--- 206,219 ----
set reachability_color($id) [ined -noupdate color $id]
set reachability_label($id) [ined -noupdate label $id]
ined -noupdate color $id red
+ exec echo "[ined name $id] is down - [exec date]" | /usr/ucb/mail -s "host [ined name $id] is down" help
+ set p [ined parent $id]
+ if {$p != ""} {
+ if {[ined type $p] == "GROUP"} {
+ set reachability_color($p) [ined -noupdate color $p]
+ ined -noupdate color $p red
+ }
+ }
}
ined flash $id [expr {[[job current] interval] / 1000}]
ined -noupdate attribute $id \
***************
*** 188,194 ****
} else {
if {$reachability_color($id) != ""} {
ined -noupdate color $id $reachability_color($id)
! set reachability_color($id) ""
}
if {$reachability_label($id) != ""} {
ined -noupdate label $id $reachability_label($id)
--- 225,239 ----
} else {
if {$reachability_color($id) != ""} {
ined -noupdate color $id $reachability_color($id)
! ined -noupdate color $id blue
! # set reachability_color($id) ""
! set p [ined parent $id]
! if {$p != ""} {
! if {[ined type $p] == "GROUP"} {
! ined -noupdate color $p $reachability_color($p)
! ined -noupdate color $p blue
! }
! }
}
if {$reachability_label($id) != ""} {
ined -noupdate label $id $reachability_label($id)
***************
*** 1002,1008 ****
}
set menus [ ined create MENU "IP-Monitor" \
! "Check Reachability" "Round Trip Time" "" \
"NTP Offset" "" \
"System Load" "CPU Activity" \
"Disk Activity" "Interface Activity" "" \
--- 1047,1053 ----
}
set menus [ ined create MENU "IP-Monitor" \
! "Check Reachability" "Round Trip Time" "Acknowledge" "" \
"NTP Offset" "" \
"System Load" "CPU Activity" \
"Disk Activity" "Interface Activity" "" \
You'd want to change the exec that sends mail. All this does is send
mail to the 'help' alias we have local here when a machine goes down.
Either comment it out or change it to reflect your site if you decide
to use it.
Versions: scotty-2.0.0 (tkined version should be completely irrelevant)
May work on others (I think ip_monitor.tcl has remained relatively
constant throughout the revisions)
Doug Hughes Engineering Network Services
doug@eng.auburn.edu Auburn University