Re: [tkined] Network Monitoring in school

From: Doug Hughes (Doug.Hughes@Eng.Auburn.EDU)
Date: Sun Feb 13 2000 - 14:36:31 MET


>
>Hello
>
>I am a student from Switzerland experimenting with
>Scotty/TKined for monitoring school network. Therefor
>I have a few questions, which I could not find any
>answers yet on the internet.
>
>a) Is it possible to have a program executed as soon
> as tkined shows alarm condition (blinking icon).
> It would be nice to have a program run then, which
> pages or sends SMS to the network team. How can I
> do this?
>

Yeah, I've been doing this since versions of scotty
starting with one. Here are some diffs against 1.4.9
on the ip_monitor.tcl script in the apps directory.
They probably won't patch directly into a newer version,
but you should certainly be able to edit them in because
not a whole lot has changed in ip_monitor (I think. ;)

What it does:
        - send mail when host goes down
        - turn icon blue when host comes back up (so you
        know it was down)
        - setup an Acknowledge button to ack blue hosts back
        to original color

74a75,134
> ## 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)
> }
> }
>
>
> ##
> ## 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)
> }
> }
>
>
> ##
220a281,288
> exec echo "[ined name $id] is down - [exec date]" | /usr/ucb/mail -s "host [ined name $id] is down" admin,doug
> 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
> }
> }
230c298,306
< set reachability_color($id) ""

---
> #                 set reachability_color($id) ""
>                   ined -noupdate color $id blue
>                   set p [ined parent $id]
>                   if {$p != ""} {
>                       if {[ined type $p] == "GROUP"} {
>                           ined -noupdate color $p $reachability_color($p)
>                           ined -noupdate color $p blue
>                       }
>                   }
1051c1127
<           "Check Reachability" "Round Trip Time" "" \
---
>           "Check Reachability" "Round Trip Time" "Acknowledge" "" \

-- ____________________________________________________________________________ Doug Hughes Engineering Network Services System/Net Admin Auburn University doug@eng.auburn.edu

-- !! 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:35 MET