[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bigsister-general] Using %Autoconn for checking connectivity


Kai Schaetzl wrote:
It's started to work now, but it's not working reliably. It flipflops between purple and green.

Unfortunately you are right. The attached patch against bbd will fix
this.

On first glance it looks like it expects a report every 5 minutes and the default for the reports is every ten minutes.

That's pretty near ... the %Autoconn stati are sent to the display
monitor (bsmon) without an explicit expiry time. So bsmon kicks them
out every time it runs expiry (which is about every 8 minutes). Since
at the same time your uxmon is connecting every 5 minutes, green status
is coming in every 5 minutes. So, in 5 minutes periods where expiry is
not running you won't see a purple report, in 5 minutes periods with
expiry running you get a purple report until the 5 minutes interval is
over and a new green report is posted.

Silly bug.

Best regards,
Tom

--
------------------------------------------------------------------------
Thomas Aeby, Kirchweg 52, 1735 Giffers, Switzerland
Voice : (+41)26 4180040
Internet: suppressed                       PGP public key available
------------------------------------------------------------------------
Index: bbd.pl
===================================================================
RCS file: /cvsroot/bigsister/bigsister/bbd.pl,v
retrieving revision 1.50
diff -u -r1.50 bbd.pl
--- bbd.pl	3 Aug 2005 07:57:01 -0000	1.50
+++ bbd.pl	9 May 2008 14:43:37 -0000
@@ -151,11 +151,11 @@
 		    ($host,$what) = BigSister::common::separate_service( $item );
 		    if( ($what eq "conn") && grep( $$_[1] eq $host, @$autoconn ) ) { 
 			my $text = "red ".($scalar=localtime)." no status report";
-			$statuslog->log( "127.0.0.1: status $item $text" );
+			$statuslog->log( "127.0.0.1: status+20 $item $text" );
 		    }
 		    else {
 			my $text = "purple (".time.") ".(scalar localtime)." no status report";
-			$statuslog->log( "127.0.0.1: status $item $text" );
+			$statuslog->log( "127.0.0.1: status+20 $item $text" );
 		    }
 		}
 	    }
@@ -388,7 +388,7 @@
     foreach $ref( @hosts ) {
 	$host = $$ref[1];
 	next if( time-$last_update{$host.".conn"} < 60 );
-	$statuslog->log( "127.0.0.1: status $host.conn green (".(time).") ".(scalar localtime)." connected to status collector" );
+	$statuslog->log( "127.0.0.1: status+20 $host.conn green (".(time).") ".(scalar localtime)." connected to status collector" );
 	&inject( $host, "conn", "green (".time.") ".(localtime)." connected to status collector" );
     }
 }
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Bigsister-general mailing list
suppressed
https://lists.sourceforge.net/lists/listinfo/bigsister-general

Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.