spong-cvs Mailing List for Spong
Brought to you by:
apremselaar,
sljohnson
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(5) |
Aug
(3) |
Sep
(1) |
Oct
(3) |
Nov
(2) |
Dec
(3) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(7) |
Feb
(2) |
Mar
|
Apr
|
May
(7) |
Jun
(1) |
Jul
(8) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
From: <slj...@us...> - 2003-08-08 20:37:44
|
Update of /cvsroot/spong/spong/utils In directory sc8-pr-cvs1:/tmp/cvs-serv32230 Modified Files: convert-history Log Message: added confirmation of Spong VAR directory value to warning message Index: convert-history =================================================================== RCS file: /cvsroot/spong/spong/utils/convert-history,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** convert-history 17 Dec 2002 21:22:34 -0000 1.1 --- convert-history 8 Aug 2003 20:37:38 -0000 1.2 *************** *** 15,25 **** $|++; # disable buffering for stdin ! print "This utility will convert the Spong History files into the new format/\n"; ! print "This utility should be run as the spong user in order to maintain "; ! print "proper ownerships.\n"; ! print "\nPress enter to proceeded\n"; my $t = <STDIN>; ! my $SPONG_ARCHIVE = "/usr/local/spong/var/archives"; opendir(DIR,$SPONG_ARCHIVE) || die "Could not opendir $SPONG_ARCHIVE: $!"; --- 15,33 ---- $|++; # disable buffering for stdin ! my $VARDIR = "/usr/local/spong/var"; ! ! print qq( ! This utility will convert the Spong History files into the new format. ! This utility should be run as the spong user in order to maintain ! proper ownerships. ! ! The VAR directory is configured as $VARDIR ! If this not correct, stop the program with CTRL-C, and edit the \$VARDIR ! variable. ! ! Press enter to proceeded); my $t = <STDIN>; ! my $SPONG_ARCHIVE = "$VARDIR/archives"; opendir(DIR,$SPONG_ARCHIVE) || die "Could not opendir $SPONG_ARCHIVE: $!"; |
From: <slj...@us...> - 2003-07-27 03:59:25
|
Update of /cvsroot/spong/spong/pod In directory sc8-pr-cvs1:/tmp/cvs-serv8411 Modified Files: spong.message.pod Log Message: updated documention for latest changes Index: spong.message.pod =================================================================== RCS file: /cvsroot/spong/spong/pod/spong.message.pod,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** spong.message.pod 8 May 2002 15:15:51 -0000 1.8 --- spong.message.pod 27 Jul 2003 03:59:22 -0000 1.9 *************** *** 68,72 **** A list of one or more regular expressions that are matched against the service ! name of the status event. If one of the expression matches the service name, the term is considered matched. --- 68,72 ---- A list of one or more regular expressions that are matched against the service ! name of the status event. If one of the expressions match the service name, the term is considered matched. *************** *** 77,80 **** --- 77,86 ---- combinations matched, the term is considered matched. + =item * colors or status + + A list of one or more status colors ('red', 'yellow','green','clear', or + 'purple') that are matched against the status color of the status event. IF one + of the colors match the status color, the term is considered matched. + =item * exclude_hosts *************** *** 91,102 **** =item * exclude_host_groups ! A list of one or more host group names from the F<spong.groups> (see L<spong.groups>). If the host name of the status event is a member of one of the host ! groups, the term is considered an exclusion match. =item * exclude_colors or exclude_status ! A list of one of more status colors ('red', 'yellow', or 'green'). If the ! status color is the event matches one of the colors in the list, the term is ! considered an exclusion match. =item * last_if_match --- 97,109 ---- =item * exclude_host_groups ! A list of one or more host group names from the F<spong.groups> (see ! L<spong.groups>). If the host name of the status event is a member of one of ! the host groups, the term is considered an exclusion match. =item * exclude_colors or exclude_status ! A list of one of more status colors ('red', 'yellow', 'green', 'clear' or ! 'purple'). If the status color is the event matches one of the colors in the ! list, the term is considered an exclusion match. =item * last_if_match |
From: <slj...@us...> - 2003-07-27 03:40:20
|
Update of /cvsroot/spong/spong/src In directory sc8-pr-cvs1:/tmp/cvs-serv5893 Modified Files: www-spong.pl Log Message: removed an extra '@' from the @@LIBDIR@@ token Index: www-spong.pl =================================================================== RCS file: /cvsroot/spong/spong/src/www-spong.pl,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** www-spong.pl 14 May 2003 05:49:46 -0000 1.22 --- www-spong.pl 27 Jul 2003 03:40:17 -0000 1.23 *************** *** 15,19 **** # $Id$ ! use lib "@@@LIBDIR@@"; use Sys::Hostname; --- 15,19 ---- # $Id$ ! use lib "@@LIBDIR@@"; use Sys::Hostname; |
From: <slj...@us...> - 2003-07-27 03:04:30
|
Update of /cvsroot/spong/spong/src In directory sc8-pr-cvs1:/tmp/cvs-serv941 Modified Files: spong-cleanup.pl Log Message: fixed time comparison problem in remove_old_events() and added -v flag for verbose output Index: spong-cleanup.pl =================================================================== RCS file: /cvsroot/spong/spong/src/spong-cleanup.pl,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** spong-cleanup.pl 17 Dec 2002 21:31:21 -0000 1.7 --- spong-cleanup.pl 27 Jul 2003 03:04:27 -0000 1.8 *************** *** 37,40 **** --- 37,49 ---- $HOST =~ tr/A-Z/a-z/; + if ($#ARGV > -1) { + if ( $ARGV[0] ne '-v' ) { + print "Invalid parameter. Usage:\n\n spong-clean [-v] \n\n"; + } + else { + $VERBOSE = 1; + } + } + &load_config_files(); # Loads the user specified configuration information *************** *** 44,47 **** --- 53,58 ---- next if $host eq ".."; + print "Cleaning out host $host...\n" if $VERBOSE; + &remove_old_acks( $host ); &remove_old_services( $host ); *************** *** 64,67 **** --- 75,80 ---- return if ! -d $dir; + print " deleting old acks\n" if $VERBOSE; + opendir( ACK, $dir ) || die "Can't open $dir: $!"; while( $ack = readdir( ACK ) ) { *************** *** 97,100 **** --- 110,115 ---- return if ! -d $dir; + print " deleting stale old status entries\n" if $VERBOSE; + opendir( SERVICE, $dir ) || die "Can't open $dir: $!"; while( $service = readdir( SERVICE ) ) { *************** *** 131,134 **** --- 146,151 ---- } + print " trimming history log files\n" if $VERBOSE; + open( HISTORY, $file ) || die "Can't open $file: $!"; *************** *** 179,182 **** --- 196,201 ---- } + print " moving old history status files to archive\n" if $VERBOSE; + opendir( STDIR,$eventdir ) || die "Could not opendir $eventdir: $!"; *************** *** 186,190 **** my( $stamp ) = ( $file =~ /^(\d+)-/ ); # Get the event timestamp ! if ( $time < (time() - ($main::OLD_HISTORY * 24*60*60)) ) { system "mv $eventdir/$file $archdir/$file" || die "Could not mv $event/$file to $archdir/$file: $!"; --- 205,209 ---- my( $stamp ) = ( $file =~ /^(\d+)-/ ); # Get the event timestamp ! if ( $stamp < (time() - ($main::OLD_HISTORY * 24*60*60)) ) { system "mv $eventdir/$file $archdir/$file" || die "Could not mv $event/$file to $archdir/$file: $!"; |
From: <slj...@us...> - 2003-07-27 02:53:23
|
Update of /cvsroot/spong/spong/src In directory sc8-pr-cvs1:/tmp/cvs-serv31650 Modified Files: www-spong-ack.pl Log Message: Replaced faulty sort and compare method for checking lists with List::Compare CPAN module Index: www-spong-ack.pl =================================================================== RCS file: /cvsroot/spong/spong/src/www-spong-ack.pl,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** www-spong-ack.pl 29 Jan 2003 23:01:51 -0000 1.10 --- www-spong-ack.pl 27 Jul 2003 02:53:20 -0000 1.11 *************** *** 23,26 **** --- 23,28 ---- use Spong::Host; + use List::Compare; + # Load our configuration variables, including the user specified configuration # information (spong.conf, spong.hosts, and spong.groups files). *************** *** 381,387 **** # Fallback, if we didn't read things correctly... - if( sort ( @HOSTS_LIST ) != sort ( keys %HOSTS ) ) { - @HOSTS_LIST = sort keys %HOSTS; } # Do the same thing for the groups file. --- 383,389 ---- # Fallback, if we didn't read things correctly... + my $lc = List::Compare->new( \@HOSTS_LIST, \@{[keys %HOSTS]} ); + if( ! $lc->is_LequivalentR ) { @HOSTS_LIST = sort keys %HOSTS; } # Do the same thing for the groups file. *************** *** 398,403 **** eval $evalme || die "Invalid spong.groups file: $@"; ! if( sort ( @GROUPS_LIST ) != sort ( keys %GROUPS ) ) { ! @GROUPS_LIST = sort keys %GROUPS; } } --- 400,405 ---- eval $evalme || die "Invalid spong.groups file: $@"; ! $lc = List::Compare->new( \@GROUPS_LIST, \@{[keys %GROUPS]} ); ! if( ! $lc->is_LequivalentR ) { @GROUPS_LIST = sort keys %GROUPS; } } |
From: <slj...@us...> - 2003-07-26 20:36:49
|
Update of /cvsroot/spong/spong/src In directory sc8-pr-cvs1:/tmp/cvs-serv5253 Modified Files: spong-message.pl Log Message: added matching term for color/status Index: spong-message.pl =================================================================== RCS file: /cvsroot/spong/spong/src/spong-message.pl,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** spong-message.pl 11 May 2003 02:57:42 -0000 1.39 --- spong-message.pl 26 Jul 2003 20:36:46 -0000 1.40 *************** *** 418,425 **** # # Match on hosts and host_groups # ! # If no matech elements defined, match automatically if ( ! defined $rule->{'hosts'} && ! defined $rule->{'host_groups'} ) { --- 418,451 ---- # + # Match on colors or status + # + + if ( ! defined $rule->{'colors'} and + ! defined $rule->{'status'} ) { + + debug("Color/Status default match for $color on rule $c $rule->{'name'}"); + } else {a + $m = 0; + + # Scan though each color in the rule + foreach my $clr ( @{$rule->{'colors'}}, + @{$rule->{'status'}} ) { + if ($color eq $clr) { + $m = 1; last; + } + } + + if ( ! $m ) { + debug("No color/status match for $color on rule $c $rule->{'name'}"); next RULE; + } else { + debug("Color match for $color on rule $c $rule->{'name'}"); + } + } + + # # Match on hosts and host_groups # ! # If no match elements defined, match automatically if ( ! defined $rule->{'hosts'} && ! defined $rule->{'host_groups'} ) { |
From: <slj...@us...> - 2003-07-17 02:45:44
|
Update of /cvsroot/spong/spong/src In directory sc8-pr-cvs1:/tmp/cvs-serv8418 Modified Files: spong-server.pl Log Message: really, really fixed that regexp problem in remove_np_files(). (David Bronder) Index: spong-server.pl =================================================================== RCS file: /cvsroot/spong/spong/src/spong-server.pl,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** spong-server.pl 16 Jul 2003 20:15:43 -0000 1.62 --- spong-server.pl 17 Jul 2003 02:45:33 -0000 1.63 *************** *** 1306,1310 **** foreach $file (@files) { ! if ( $file =~ m/^np-.*-${host}-${service}/o ) { unlink "$SPONGTMP/$file"; } --- 1306,1310 ---- foreach $file (@files) { ! if ( $file =~ m/^np-.*-${host}-${service}/ ) { unlink "$SPONGTMP/$file"; } |
From: <slj...@us...> - 2003-07-16 20:15:46
|
Update of /cvsroot/spong/spong/src In directory sc8-pr-cvs1:/tmp/cvs-serv10868 Modified Files: spong-server.pl Log Message: really fixed regexp bug in remove_np_files() Index: spong-server.pl =================================================================== RCS file: /cvsroot/spong/spong/src/spong-server.pl,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** spong-server.pl 16 Jul 2003 17:50:40 -0000 1.61 --- spong-server.pl 16 Jul 2003 20:15:43 -0000 1.62 *************** *** 1306,1310 **** foreach $file (@files) { ! if ( $file =~ m/^np-[^\-]+-$host-$service/ ) { unlink "$SPONGTMP/$file"; } --- 1306,1310 ---- foreach $file (@files) { ! if ( $file =~ m/^np-.*-${host}-${service}/o ) { unlink "$SPONGTMP/$file"; } |
From: <slj...@us...> - 2003-07-16 17:50:44
|
Update of /cvsroot/spong/spong/src In directory sc8-pr-cvs1:/tmp/cvs-serv14160 Modified Files: spong-server.pl Log Message: added code to skip a status that are already purple in the stale data scan Index: spong-server.pl =================================================================== RCS file: /cvsroot/spong/spong/src/spong-server.pl,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** spong-server.pl 2 Jun 2003 20:54:27 -0000 1.60 --- spong-server.pl 16 Jul 2003 17:50:40 -0000 1.61 *************** *** 452,456 **** foreach $service ( $host->service_names() ) { $main::SERVICES{$service}=1; ! my ($color )=($host->service($service))->color(); my ($summary)=($host->service($service))->summary(); my ($message)=($host->service($service))->message(); --- 452,458 ---- foreach $service ( $host->service_names() ) { $main::SERVICES{$service}=1; ! my ($rcolor)=($host->service($service))->rcolor(); # If real color is purple ! next if $rcolor eq 'purple'; # don't bother updating ! my ($color)=($host->service($service))->color(); my ($summary)=($host->service($service))->summary(); my ($message)=($host->service($service))->message(); |
From: <slj...@us...> - 2003-06-02 20:54:32
|
Update of /cvsroot/spong/spong/src In directory sc8-pr-cvs1:/tmp/cvs-serv17447 Modified Files: spong-server.pl Log Message: Fixed problem with file name regexp in remove_np_files(). Thank to John Faichney Index: spong-server.pl =================================================================== RCS file: /cvsroot/spong/spong/src/spong-server.pl,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** spong-server.pl 14 May 2003 06:02:01 -0000 1.59 --- spong-server.pl 2 Jun 2003 20:54:27 -0000 1.60 *************** *** 1304,1308 **** foreach $file (@files) { ! if ( $file =~ m/^np-[^-]-$host-$service/ ) { unlink "$SPONGTMP/$file"; } --- 1304,1308 ---- foreach $file (@files) { ! if ( $file =~ m/^np-[^\-]+-$host-$service/ ) { unlink "$SPONGTMP/$file"; } |
From: <slj...@us...> - 2003-05-14 06:02:05
|
Update of /cvsroot/spong/spong/src In directory sc8-pr-cvs1:/tmp/cvs-serv22509 Modified Files: spong-server.pl Log Message: Replaced $SPONGWWW var with $SPONGTMP in remove_np_files function. Thanks to John Faichney Index: spong-server.pl =================================================================== RCS file: /cvsroot/spong/spong/src/spong-server.pl,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** spong-server.pl 14 May 2003 05:49:46 -0000 1.58 --- spong-server.pl 14 May 2003 06:02:01 -0000 1.59 *************** *** 1305,1309 **** foreach $file (@files) { if ( $file =~ m/^np-[^-]-$host-$service/ ) { ! unlink "$SPONGWWW/$file"; } } --- 1305,1309 ---- foreach $file (@files) { if ( $file =~ m/^np-[^-]-$host-$service/ ) { ! unlink "$SPONGTMP/$file"; } } |
From: <slj...@us...> - 2003-05-14 05:49:49
|
Update of /cvsroot/spong/spong/src In directory sc8-pr-cvs1:/tmp/cvs-serv16981 Modified Files: wap-spong.pl spong-server.pl spong-network.pl www-spong.pl Log Message: Replaced faulty sort and compare method for checking lists with List::Compare CPAN module Index: wap-spong.pl =================================================================== RCS file: /cvsroot/spong/spong/src/wap-spong.pl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** wap-spong.pl 17 Apr 2001 02:58:12 -0000 1.3 --- wap-spong.pl 14 May 2003 05:49:46 -0000 1.4 *************** *** 14,17 **** --- 14,19 ---- # (4) Did a whole bunch of stuff (Ed Hill, 06/18/1998) + use lib "@@LIBDIR@@"; + use Sys::Hostname; use Getopt::Long; *************** *** 19,22 **** --- 21,26 ---- use POSIX; + use List::Compare; + # Load our configuration variables, including the user specified configuration # information (spong.conf, spong.hosts, and spong.groups files). *************** *** 663,669 **** # Fallback, if we didn't read things correctly... - if( sort ( @HOSTS_LIST ) != sort ( keys %HOSTS ) ) { - @HOSTS_LIST = sort keys %HOSTS; } # Do the same thing for the groups file. --- 667,673 ---- # Fallback, if we didn't read things correctly... + my $lc = List::Compare->new( \@HOSTS_LIST, \@{[keys %HOSTS]} ); + if( ! $lc->is_LequivalentR ) { @HOSTS_LIST = sort keys %HOSTS; } # Do the same thing for the groups file. *************** *** 680,685 **** eval $evalme || die "Invalid spong.groups file: $@"; ! if( sort ( @GROUPS_LIST ) != sort ( keys %GROUPS ) ) { ! @GROUPS_LIST = sort keys %GROUPS; } } --- 684,689 ---- eval $evalme || die "Invalid spong.groups file: $@"; ! $lc = List::Compare->new( \@GROUPS_LIST, \@{[keys %GROUPS]} ); ! if( ! $lc->is_LequivalentR ) { @GROUPS_LIST = sort keys %GROUPS; } } Index: spong-server.pl =================================================================== RCS file: /cvsroot/spong/spong/src/spong-server.pl,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** spong-server.pl 14 May 2003 03:47:13 -0000 1.57 --- spong-server.pl 14 May 2003 05:49:46 -0000 1.58 *************** *** 22,25 **** --- 22,27 ---- use Spong::ConfigFile; + use List::Compare; + use Sys::Hostname; use File::Path; *************** *** 1341,1347 **** # Fallback, if we didn't read things correctly... ! ! if( sort ( @HOSTS_LIST ) != sort ( keys %HOSTS ) ) { ! @HOSTS_LIST = sort keys %HOSTS; } # Do the same thing for the groups file. --- 1343,1348 ---- # Fallback, if we didn't read things correctly... ! my $lc = List::Compare->new( \@HOSTS_LIST, \@{[keys %HOSTS]} ); ! if( ! $lc->is_LequivalentR ) { @HOSTS_LIST = sort keys %HOSTS; } # Do the same thing for the groups file. *************** *** 1358,1363 **** eval $evalme || die "Invalid spong.groups file: $@"; ! if( sort ( @GROUPS_LIST ) != sort ( keys %GROUPS ) ) { ! @GROUPS_LIST = sort keys %GROUPS; } } --- 1359,1364 ---- eval $evalme || die "Invalid spong.groups file: $@"; ! $lc = List::Compare->new( \@GROUPS_LIST, \@{[keys %GROUPS]} ); ! if( ! $lc->is_LequivalentR ) { @GROUPS_LIST = sort keys %GROUPS; } } Index: spong-network.pl =================================================================== RCS file: /cvsroot/spong/spong/src/spong-network.pl,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** spong-network.pl 29 Jan 2003 22:47:57 -0000 1.46 --- spong-network.pl 14 May 2003 05:49:46 -0000 1.47 *************** *** 35,38 **** --- 35,40 ---- use Spong::Log; + use List::Compare; + # Check to see if the Time::HiRes module is available eval { require Time::HiRes; import Time::HiRes qw(time); }; *************** *** 490,495 **** # Fallback, if we didn't read things correctly... ! if( sort ( @HOSTS_LIST ) != sort ( keys %HOSTS ) ) { ! @HOSTS_LIST = sort keys %HOSTS; } &debug( "host file loaded" ); } --- 492,498 ---- # Fallback, if we didn't read things correctly... ! my $lc = List::Compare->new( \@HOSTS_LIST, \@{[keys %HOSTS]} ); ! ! if( ! $lc->is_LequivalentR ) { @HOSTS_LIST = sort keys %HOSTS; } &debug( "host file loaded" ); } Index: www-spong.pl =================================================================== RCS file: /cvsroot/spong/spong/src/www-spong.pl,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** www-spong.pl 29 Jan 2003 23:00:12 -0000 1.21 --- www-spong.pl 14 May 2003 05:49:46 -0000 1.22 *************** *** 15,18 **** --- 15,20 ---- # $Id$ + use lib "@@@LIBDIR@@"; + use Sys::Hostname; use Getopt::Long; *************** *** 20,23 **** --- 22,27 ---- use POSIX; + use List::Compare; + # Load our configuration variables, including the user specified configuration # information (spong.conf, spong.hosts, and spong.groups files). *************** *** 643,650 **** # Fallback, if we didn't read things correctly... - if( sort ( @HOSTS_LIST ) != sort ( keys %HOSTS ) ) { - @HOSTS_LIST = sort keys %HOSTS; } - # Do the same thing for the groups file. --- 647,653 ---- # Fallback, if we didn't read things correctly... + my $lc = List::Compare->new( \@HOSTS_LIST, \@{[keys %HOSTS]} ); + if( ! $lc->is_LequivalentR ) { @HOSTS_LIST = sort keys %HOSTS; } # Do the same thing for the groups file. *************** *** 660,665 **** eval $evalme || die "Invalid spong.groups file: $@"; ! if( sort ( @GROUPS_LIST ) != sort ( keys %GROUPS ) ) { ! @GROUPS_LIST = sort keys %GROUPS; } } --- 663,669 ---- eval $evalme || die "Invalid spong.groups file: $@"; ! $lc = List::Compare->new( \@GROUPS_LIST, \@{[keys %GROUPS]} ); ! if( ! $lc->is_LequivalentR ) { @GROUPS_LIST = sort keys %GROUPS; } ! } |
From: <slj...@us...> - 2003-05-14 05:32:31
|
Update of /cvsroot/spong/spong/src/lib/List In directory sc8-pr-cvs1:/tmp/cvs-serv8118 Added Files: Compare.pm Log Message: Added List::Compare CPAN module into library directory --- NEW FILE: Compare.pm --- package List::Compare; $VERSION = 0.16; # 03/08/2003 use strict; # use warnings; # commented out so module will run on pre-5.6 versions of Perl use Carp; sub new { my $class = shift; my @args = @_; my ($option, $self, $dataref); $option = $args[0] eq '-a' ? shift(@args) : 0; my @arrayrefs = @args; foreach (@arrayrefs) { croak "Must pass array references: $!" unless ref($_) eq 'ARRAY'; } # bless a ref to an empty hash into the invoking class if (@arrayrefs > 2) { [...1541 lines suppressed...] this module are some for intersection, union, etc. To install Set::Array, you must first install the Want module, also available on CPAN. =back =head1 AUTHOR James E. Keenan (jk...@co...). Creation date: May 20, 2002. Last modification date: March 8, 2003. Copyright (c) 2002-3 James E. Keenan. United States. All rights reserved. This is free software and may be distributed under the same terms as Perl itself. =cut |
From: <slj...@us...> - 2003-05-14 05:30:36
|
Update of /cvsroot/spong/spong/src/lib/List In directory sc8-pr-cvs1:/tmp/cvs-serv7741/List Log Message: Directory /cvsroot/spong/spong/src/lib/List added to the repository |
From: <slj...@us...> - 2003-05-14 03:47:19
|
Update of /cvsroot/spong/spong/src In directory sc8-pr-cvs1:/tmp/cvs-serv25725 Modified Files: spong-server.pl Log Message: Fixed problem is mis-named STATUS_HISTORY variable (no $) Thanks to John Faichney. Index: spong-server.pl =================================================================== RCS file: /cvsroot/spong/spong/src/spong-server.pl,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** spong-server.pl 29 Jan 2003 22:56:25 -0000 1.56 --- spong-server.pl 14 May 2003 03:47:13 -0000 1.57 *************** *** 937,941 **** &save_data( ">>", $file, $data ); ! if ( STATUS_HISTORY ) { # Save the status update information $untiltime = POSIX::strftime( "%H:%M, %D", localtime($time) ); --- 937,941 ---- &save_data( ">>", $file, $data ); ! if ( $STATUS_HISTORY ) { # Save the status update information $untiltime = POSIX::strftime( "%H:%M, %D", localtime($time) ); |
From: <slj...@us...> - 2003-05-11 03:03:57
|
Update of /cvsroot/spong/spong/config In directory sc8-pr-cvs1:/tmp/cvs-serv25088 Modified Files: spong.message Log Message: Added comments to include and exclude color global rules Index: spong.message =================================================================== RCS file: /cvsroot/spong/spong/config/spong.message,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** spong.message 16 Oct 2000 13:58:48 -0000 1.6 --- spong.message 11 May 2003 03:03:54 -0000 1.7 *************** *** 9,12 **** --- 9,26 ---- $RULES_MATCH = 'FIRST-MATCH'; + $GLOBAL_FILTERS = { + + # Global status color filters for all messages + # (These are applied _before_ the message rules) + + # Valid values are 'all','red','yellow','green','blue','purple','clear' + # Defaults to 'all' if not defined + include_colors = ['all'], + + # Valid values are 'red','yellow','green','blue','purple','clear' + # Defaults to no colors if not defined + exclude_colors = ['purple','clear'], + }; + $MESSAGING_RULES = [ |
From: <slj...@us...> - 2003-05-11 02:57:46
|
Update of /cvsroot/spong/spong/src In directory sc8-pr-cvs1:/tmp/cvs-serv20814 Modified Files: spong-message.pl Log Message: Added exclude_colors and include_color global matching rule Index: spong-message.pl =================================================================== RCS file: /cvsroot/spong/spong/src/spong-message.pl,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** spong-message.pl 7 Nov 2002 21:59:18 -0000 1.38 --- spong-message.pl 11 May 2003 02:57:42 -0000 1.39 *************** *** 1,10 **** ! #!@@PERL@@ # # Spong messaging program. This script gets called when something that spong # is monitoring goes red. This script then runs through a number of tests # to decided if, who, and how to send a message to someone letting them know ! # of the problem. Currently this script only knows how to send email and ! # send messages to skytel pagers (currently it does it via email as well - but ! # I will soon try doing it vi the skytel web server). # # History: --- 1,8 ---- ! #!/usr/bin/perl # # Spong messaging program. This script gets called when something that spong # is monitoring goes red. This script then runs through a number of tests # to decided if, who, and how to send a message to someone letting them know ! # of the problem. # # History: *************** *** 135,138 **** --- 133,139 ---- if (! $DATETIMEFMT) { $DATETIMEFMT = "%c"; } + # If notifications are turned off, just exit + if ( $SEND_MESSAGE eq 'NONE' ) { exit 0; } + # Read the little message history database, so we can prevent message overload *************** *** 329,336 **** # Check excluded colors ! if ( defined($GLOBAL_FILTERS{'exclude_colors'} ) { foreach my $mcolor ( $GLOBAL_FILTERS{'exclude_colors'} ) { if ( $color eq $mcolor ) { ! main::debug("Hit on exclude_colors in default filters"; return; } --- 330,337 ---- # Check excluded colors ! if ( defined($GLOBAL_FILTERS{'exclude_colors'} )) { foreach my $mcolor ( $GLOBAL_FILTERS{'exclude_colors'} ) { if ( $color eq $mcolor ) { ! main::debug("Hit on exclude_colors in default filters"); return; } *************** *** 338,351 **** } ! if ( defined( $GLOBAL_FILTERS{'include_colors'} ) { my $hit = 0; foreach my $mcolor ( $GLOBAL_FILTERS{'include_colors'} ) { ! if $color eq $mcolor || $mcolor eq 'all' { $hit = 1; last; } } - } if (! $hit ) { ! main::debug("No Hit on include_colors in default filters"; return; } --- 339,351 ---- } ! if ( defined( $GLOBAL_FILTERS{'include_colors'} )) { my $hit = 0; foreach my $mcolor ( $GLOBAL_FILTERS{'include_colors'} ) { ! if ( $color eq $mcolor || $mcolor eq 'all' ) { $hit = 1; last; } } if (! $hit ) { ! main::debug("No Hit on include_colors in default filters"); return; } |
From: <slj...@us...> - 2003-02-26 15:07:37
|
Update of /cvsroot/spong/spong/src In directory sc8-pr-cvs1:/tmp/cvs-serv26638 Modified Files: spong-status.pl Log Message: added missing debug and error procedures Index: spong-status.pl =================================================================== RCS file: /cvsroot/spong/spong/src/spong-status.pl,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** spong-status.pl 4 Jun 2002 01:10:01 -0000 1.9 --- spong-status.pl 26 Feb 2003 15:07:33 -0000 1.10 *************** *** 144,148 **** # Output functions ! sub error { print STDERR scalar localtime,": $_\n"; } # This function initializes the debug and error logging contexts in the --- 144,150 ---- # Output functions ! sub debug { Spong::Log::debug($_[0],$_[1]); } ! sub error { Spong::Log::error($_[0]); } ! # This function initializes the debug and error logging contexts in the |
From: <slj...@us...> - 2003-02-22 20:55:48
|
Update of /cvsroot/spong/spong/src/lib/Spong/Network/plugins In directory sc8-pr-cvs1:/tmp/cvs-serv19324 Modified Files: check_telnet Log Message: Changed getlines() to getline() for one line logins and increased timeout. Thanks to Mical Dorocinski. Index: check_telnet =================================================================== RCS file: /cvsroot/spong/spong/src/lib/Spong/Network/plugins/check_telnet,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** check_telnet 29 Nov 2000 17:14:30 -0000 1.3 --- check_telnet 22 Feb 2003 20:55:45 -0000 1.4 *************** *** 32,36 **** $con->print("\n\n"); ! my @data = $con->getlines((Timeout => 6)); if (@data) { $message .= "$host:$port -\n@data\n"; --- 32,36 ---- $con->print("\n\n"); ! my @data = $con->getline((Timeout => 15)); if (@data) { $message .= "$host:$port -\n@data\n"; |
From: <slj...@us...> - 2003-01-29 23:01:57
|
Update of /cvsroot/spong/spong/src In directory sc8-pr-cvs1:/tmp/cvs-serv408 Modified Files: www-spong-ack.pl Log Message: FInal commit for Ack enhancements Index: www-spong-ack.pl =================================================================== RCS file: /cvsroot/spong/spong/src/www-spong-ack.pl,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** www-spong-ack.pl 17 Apr 2001 02:58:12 -0000 1.9 --- www-spong-ack.pl 29 Jan 2003 23:01:51 -0000 1.10 *************** *** 14,17 **** --- 14,19 ---- # $Id$ + use lib "@@LIBDIR@@"; + use CGI; use Sys::Hostname; *************** *** 19,22 **** --- 21,25 ---- use POSIX; use Time::Local; + use Spong::Host; # Load our configuration variables, including the user specified configuration *************** *** 41,45 **** $cmd = $ENV{'PATH_INFO'}; ! if( $cmd =~ m!^/delete/(.+?)-(\w+)-(\d+)$! ) { &remove( $1, $2, $3 ); exit; } if( $cmd =~ m!^/help$! ) { &help(); exit; } --- 44,48 ---- $cmd = $ENV{'PATH_INFO'}; ! if( $cmd =~ m!^/delete/(.+?)-(.+?)-(\d+)$! ) { &remove( $1, $2, $3 ); exit; } if( $cmd =~ m!^/help$! ) { &help(); exit; } *************** *** 60,63 **** --- 63,67 ---- my( $group, $service ) = @_; my( @hostlist ) = hostlist( $group ); + my $cgi = new CGI; my $host; *************** *** 85,89 **** if( $#hostlist >= 1 ) { print "<select name=\"host\">\n"; ! foreach $host ( @hostlist ) { print "<option>$host\n";} print "</select></td></tr><tr>\n"; } else { --- 89,93 ---- if( $#hostlist >= 1 ) { print "<select name=\"host\">\n"; ! foreach $host ( sort @hostlist ) { print "<option>$host\n";} print "</select></td></tr><tr>\n"; } else { *************** *** 92,106 **** } ! print "<p><b>Service:</b> <font size=-1>(The service you are acknowledging"; print ", or \"<i>all</i>\" to signify all services)</font><br>\n"; ! print "<input type=text name=services size=30 value=\"$service\">"; print "<p><b>Duration:</b> <font size=-1>(When service will be "; print "available, +5h, +2d, 18:00, 7/28/97)</font><br>\n"; print "<input type=text name=duration size=30>\n"; print "<p><b>Email:</b> <font size=-1>(Email address of the contact person"; print ")</font><br>\n"; ! print "<input type=text name=user size=30>\n"; print "<p><b>Message:</b> <font size=-1>(Description of the "; --- 96,144 ---- } ! print "<p><b>Service:</b> <font size=-1>(The services you are acknowledging"; print ", or \"<i>all</i>\" to signify all services)</font><br>\n"; ! if( $#hostlist >= 1 ) { ! print "<input type=text name=services size=30 value=\"$service\">"; ! } else { ! my ($h) = new Spong::Host($hostlist[0]); ! $service = 'all' unless defined $service; ! ! print "<select name=services multiple>\n"; ! print " <option"; ! print " selected" if $service eq 'all'; ! print ">all\n"; ! foreach $serv (sort $h->service_names()) { ! print "<option"; ! print " selected" if $service eq $serv; ! print ">$serv\n"; ! } ! print "</select>\n"; ! } print "<p><b>Duration:</b> <font size=-1>(When service will be "; print "available, +5h, +2d, 18:00, 7/28/97)</font><br>\n"; + print "<select name=duration_select>\n"; + print " <option selected>custom\n"; + print " <option>+5m\n"; + print " <option>+15m\n"; + print " <option>+30m\n"; + print " <option>+1h\n"; + print " <option>+4h\n"; + print " <option>+8h\n"; + print " <option>+1d\n"; + print " <option>+1w\n"; + print " <option>+2w\n"; + print "</select><br>\n"; + print " If custom:\n"; print "<input type=text name=duration size=30>\n"; print "<p><b>Email:</b> <font size=-1>(Email address of the contact person"; print ")</font><br>\n"; ! ! if (defined $cgi->remote_user() && defined $HUMANS{$cgi->remote_user()}{'email'}) { ! print "<input type=text name=user size=30 value=\"" . $HUMANS{$cgi->remote_user()}{'email'} . "\">\n"; ! } else { ! print "<input type=text name=user size=30>\n"; ! } print "<p><b>Message:</b> <font size=-1>(Description of the "; *************** *** 122,126 **** my $cgi = new CGI; my $host = $cgi->param( 'host' ); ! my $services = $cgi->param( 'services' ); my $date = $cgi->param( 'duration' ); my $user = $cgi->param( 'user' ); --- 160,164 ---- my $cgi = new CGI; my $host = $cgi->param( 'host' ); ! my (@serv) = $cgi->param( 'services' ); my $date = $cgi->param( 'duration' ); my $user = $cgi->param( 'user' ); *************** *** 128,131 **** --- 166,177 ---- my $group = $cgi->param( 'group' ); + my ($services) = join(',', @serv); + $services =~ s/ //g; # Make sure there aren't any spaces... + + my $date = $cgi->param( 'duration' ); + if ($cgi->param('duration_select') ne 'custom') { + $date = $cgi->param('duration_select'); + } + if( $services eq "" ) { &error( "Service name not supplied." ); } if( $host eq "" ) { &error( "Host name not supplied." ); } *************** *** 143,146 **** --- 189,196 ---- $time = time() + ( $1 * $secs{$2} ); $ok = 1; } + # Check for a duration in the format HH:MM... + if( $date =~ /\b(\d+):(\d+)\b/ ) { + ( $hour, $min, $sec ) = ( $1, $2, 0 ); $ok = 1; } + # Check for a duration in the format HH:MM:SS... if( $date =~ /\b(\d+):(\d+):(\d+)\b/ ) { *************** *** 158,162 **** $time = timelocal( $sec, $min, $hour, $mday, $mon, $year) unless $time; } else { ! &error( "Invalid duration specifier, view the " . "<a href=\"$main::WWWACK/help\">Help</a> screen for more " . "information on valid formats." ); --- 208,212 ---- $time = timelocal( $sec, $min, $hour, $mday, $mon, $year) unless $time; } else { ! &error( "Invalid duration ($date) specifier, view the " . "<a href=\"$main::WWWACK/help\">Help</a> screen for more " . "information on valid formats." ); *************** *** 174,178 **** print "<font size=+2><b>Acknowledge Problems - Success</b></font><hr>\n"; print "Your acknowledgment has been successfully registered. Please "; ! print "press <a href=\"$main::WWWSPONG/group/$group\" target=_top>here"; print "</a> to refresh the spong display.<p>\n"; } --- 224,234 ---- print "<font size=+2><b>Acknowledge Problems - Success</b></font><hr>\n"; print "Your acknowledgment has been successfully registered. Please "; ! ! if ($group eq 'all' && $main::WWW_DEFAULT_VIEW eq 'GROUPS') { ! print "press <a href=\"$main::WWWSPONG/bygroup/\" target=_parent>here"; ! } else { ! print "press <a href=\"$main::WWWSPONG/group/$group\" target=_parent>here"; ! } ! print "</a> to refresh the spong display.<p>\n"; } *************** *** 195,199 **** if( $r ne "ok" ) { ! &error( "Could not acknowledge $host/$service!<p>Message: $r"); } else { --- 251,255 ---- if( $r ne "ok" ) { ! &error( "Could not remove acknowledgement for $host/$service!<p>Message: $r"); } else { *************** *** 401,405 **** my $str = "<table width=100% border=0 cellspacing=0 cellpadding=0>"; ! foreach $ack ( split( /\n/, $results ) ) { ($host, $service, $time) = (split( /:/, $ack )); my $id = "$host-$service-$time"; --- 457,461 ---- my $str = "<table width=100% border=0 cellspacing=0 cellpadding=0>"; ! foreach $ack ( sort split( /\n/, $results ) ) { ($host, $service, $time) = (split( /:/, $ack )); my $id = "$host-$service-$time"; |
From: <slj...@us...> - 2003-01-29 23:00:18
|
Update of /cvsroot/spong/spong/src In directory sc8-pr-cvs1:/tmp/cvs-serv32048 Modified Files: www-spong.pl Log Message: Final commits for enhanced Ack changes Index: www-spong.pl =================================================================== RCS file: /cvsroot/spong/spong/src/www-spong.pl,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** www-spong.pl 17 Apr 2001 02:58:12 -0000 1.20 --- www-spong.pl 29 Jan 2003 23:00:12 -0000 1.21 *************** *** 227,231 **** print "<frame src=\"$main::WWWSPONG/ovcommands/\" marginwidth=5 "; print "marginheight=5 noshade>\n"; ! print "<frame src=\"$main::WWWSPONG/igrp-summary/\" marginwidth=10 "; print "marginheight=5 noshade name=\"right\" border=1>\n"; print "</frameset>\n"; --- 227,237 ---- print "<frame src=\"$main::WWWSPONG/ovcommands/\" marginwidth=5 "; print "marginheight=5 noshade>\n"; ! ! if ($main::WWW_OVERVIEW == 1) { ! print "<frame src=\"$main::WWWSPONG/igrp-overview/\" marginwidth=10 "; ! } else { ! print "<frame src=\"$main::WWWSPONG/igrp-summary/\" marginwidth=10 "; ! } ! print "marginheight=5 noshade name=\"right\" border=1>\n"; print "</frameset>\n"; *************** *** 282,286 **** print "<hr>\n"; ! print "<a href=\"$main::WWWACK\">Ack</a> || \n"; print "<a href=\"$me/isummary/$group\">Summary</a> || \n"; print "<a href=\"$me/ihistory/$group\">History</a> || \n"; --- 288,292 ---- print "<hr>\n"; ! print "<a href=\"$main::WWWACK/$group\">Ack</a> || \n"; print "<a href=\"$me/isummary/$group\">Summary</a> || \n"; print "<a href=\"$me/ihistory/$group\">History</a> || \n"; |
From: <slj...@us...> - 2003-01-29 22:56:30
|
Update of /cvsroot/spong/spong/src In directory sc8-pr-cvs1:/tmp/cvs-serv30209 Modified Files: spong-server.pl Log Message: Misc whitespace changes Index: spong-server.pl =================================================================== RCS file: /cvsroot/spong/spong/src/spong-server.pl,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** spong-server.pl 31 Oct 2002 22:56:23 -0000 1.55 --- spong-server.pl 29 Jan 2003 22:56:25 -0000 1.56 *************** *** 1243,1246 **** --- 1243,1247 ---- } } elsif ( $SEND_MESSAGE eq "CHANGE" ) { + # If status has changed my $firstrun = 1; |
From: <slj...@us...> - 2003-01-29 22:48:02
|
Update of /cvsroot/spong/spong/src In directory sc8-pr-cvs1:/tmp/cvs-serv24410 Modified Files: spong-network.pl Log Message: Disabled --kill until runaway issues are fixed. Index: spong-network.pl =================================================================== RCS file: /cvsroot/spong/spong/src/spong-network.pl,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** spong-network.pl 31 Oct 2002 22:14:27 -0000 1.45 --- spong-network.pl 29 Jan 2003 22:47:57 -0000 1.46 *************** *** 63,71 **** - - - - - # signal the current server is asked if ( $restart || $kill ) { --- 63,66 ---- *************** *** 541,550 **** if( $restart ) { ! &debug( "telling pid $pid to restart" ); kill( 'HUP', $pid ); } if( $kill ) { &debug( "telling pid $pid to die" ); kill( 'QUIT', $pid );} } else { ! debug("Can't find instance of spong-network running"); } --- 536,551 ---- if( $restart ) { ! # &debug( "telling pid $pid to restart" ); kill( 'HUP', $pid ); } ! print qq{ ! --restart has been disabled due to a runaway process spawning problem. ! Please use --kill to stop and restart spong-network. ! }; ! } ! if( $kill ) { &debug( "telling pid $pid to die" ); kill( 'QUIT', $pid );} } else { ! print ("Can't find instance of spong-network running\n"); } |
From: <slj...@us...> - 2003-01-29 22:39:24
|
Update of /cvsroot/spong/spong/pod In directory sc8-pr-cvs1:/tmp/cvs-serv19755a Modified Files: spong.groups.pod Log Message: Corrected syntax error in an an example. Thanks to Raymond Popwich. Index: spong.groups.pod =================================================================== RCS file: /cvsroot/spong/spong/pod/spong.groups.pod,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** spong.groups.pod 12 Sep 2000 19:21:00 -0000 1.2 --- spong.groups.pod 29 Jan 2003 22:39:20 -0000 1.3 *************** *** 89,94 **** 'godzilla.monsters.org', ], ! compress = 0; ! display = 1; } --- 89,94 ---- 'godzilla.monsters.org', ], ! compress => 0; ! display => 1; } |
From: <slj...@us...> - 2003-01-06 20:13:53
|
Update of /cvsroot/spong/spong In directory sc8-pr-cvs1:/tmp/cvs-serv27630 Modified Files: .version Log Message: converted to release.major.minor format and up rev'd the version Index: .version =================================================================== RCS file: /cvsroot/spong/spong/.version,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** .version 8 Feb 2000 19:09:48 -0000 1.2 --- .version 6 Jan 2003 20:13:43 -0000 1.3 *************** *** 1 **** ! spong 2.7 --- 1 ---- ! spong 2.7.8 |