Send Linux-ha-cvs mailing list submissions to linux-ha-cvs@lists.linux-ha.org
To subscribe or unsubscribe via the World Wide Web, visit http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs or, via email, send a message with subject or body 'help' to [EMAIL PROTECTED] You can reach the person managing the list at [EMAIL PROTECTED] When replying, please edit your Subject line so it is more specific than "Re: Contents of Linux-ha-cvs digest..." Today's Topics: 1. Linux-HA CVS: ldirectord by horms from (linux-ha-cvs@lists.linux-ha.org) 2. Linux-HA CVS: ldirectord by horms from (linux-ha-cvs@lists.linux-ha.org) 3. Linux-HA CVS: ldirectord by horms from (linux-ha-cvs@lists.linux-ha.org) ---------------------------------------------------------------------- Message: 1 Date: Mon, 14 Aug 2006 21:47:05 -0600 (MDT) From: linux-ha-cvs@lists.linux-ha.org Subject: [Linux-ha-cvs] Linux-HA CVS: ldirectord by horms from To: [EMAIL PROTECTED] Message-ID: <[EMAIL PROTECTED]> linux-ha CVS committal Author : horms Host : Project : linux-ha Module : ldirectord Dir : linux-ha/ldirectord Modified Files: ldirectord.in Log Message: Remove duplication of the 1.2 version doctoring patch =================================================================== RCS file: /home/cvs/linux-ha/linux-ha/ldirectord/ldirectord.in,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- ldirectord.in 15 Aug 2006 03:31:44 -0000 1.4 +++ ldirectord.in 15 Aug 2006 03:47:04 -0000 1.5 @@ -1,5 +1,5 @@ #!/usr/bin/perl -my($VERSION)=(qw$Id: ldirectord.in,v 1.4 2006/08/15 03:31:44 horms Exp $)[2]; +my($VERSION)=(qw$Id: ldirectord.in,v 1.5 2006/08/15 03:47:04 horms Exp $)[2]; ###################################################################### # ldirectord http://www.vergenet.net/linux/ldirectord/ @@ -467,26 +467,6 @@ $VERSION = "1.$VERSION"; } -# Doctor version, as 1.n -> 1.(n + 144) the code was maintained as -# ldirectord in CVS up until version 1.144, then the file was renamed to -# ldirectord, so the counter reset to 1.1. Its probably better to manage -# the version number a completely different way, however this has worked -# well enough in the past, and the following munging should suffice for now -if ($VERSION =~ m/1\.([0-9]+)/) { - $VERSION = $1 + 144; - $VERSION = "1.$VERSION"; -} - -# Doctor version, as 1.n -> 1.(n + 144) the code was maintained as -# ldirectord in CVS up until version 1.144, then the file was renamed to -# ldirectord, so the counter reset to 1.1. Its probably better to manage -# the version number a completely different way, however this has worked -# well enough in the past, and the following munging should suffice for now -if ($VERSION =~ m/1\.([0-9]+)/) { - $VERSION = $1 + 144; - $VERSION = "1.$VERSION"; -} - $CRLF = "\x0d\x0a"; use Getopt::Long; ------------------------------ Message: 2 Date: Mon, 14 Aug 2006 21:53:57 -0600 (MDT) From: linux-ha-cvs@lists.linux-ha.org Subject: [Linux-ha-cvs] Linux-HA CVS: ldirectord by horms from To: [EMAIL PROTECTED] Message-ID: <[EMAIL PROTECTED]> linux-ha CVS committal Author : horms Host : Project : linux-ha Module : ldirectord Dir : linux-ha/ldirectord Modified Files: ldirectord.in Log Message: Reapply 1.3, per-virtual emailalerts, which was inadvertantly reversed in 1.4 =================================================================== RCS file: /home/cvs/linux-ha/linux-ha/ldirectord/ldirectord.in,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- ldirectord.in 15 Aug 2006 03:47:04 -0000 1.5 +++ ldirectord.in 15 Aug 2006 03:53:56 -0000 1.6 @@ -1,5 +1,5 @@ #!/usr/bin/perl -my($VERSION)=(qw$Id: ldirectord.in,v 1.5 2006/08/15 03:47:04 horms Exp $)[2]; +my($VERSION)=(qw$Id: ldirectord.in,v 1.6 2006/08/15 03:53:56 horms Exp $)[2]; ###################################################################### # ldirectord http://www.vergenet.net/linux/ldirectord/ @@ -171,6 +171,24 @@ The default is to log directly to the file I</var/log/ldirectord.log>. +B<emailalert = ">I<emailaddress>B<"> + +A valid email address for sending alerts about the changed connection status +to any real server defined in the virtual service. This option requires +perl module MailTools to be installed. Automatically tries to send email +using any of the built-in methods. See perldoc Mail::Mailer for more info on +methods. + +B<emailalertfreq => I<n> + + +Delay in seconds between repeating email alerts while any given real server +in the virtual service remains inaccessible. A setting of zero seconds will +inhibit the repeating alerts. Default setting is zero. The email timing +accuracy of this setting is dependent on the number of seconds defined in +the checkinterval configuration option. + + B<execute = ">I<configuration>B<"> Use this directive to start an instance of ldirectord for @@ -225,9 +243,10 @@ string starts with I<http://...> the IP-address and port of the real server is overridden, otherwise the IP-address and port of the real server is used. -=head2 More than one of these entries may be inside a virtual section. -The quiescent and fallback options listed above may also appear inside -a virtual section, in which case the global setting is overridden. +=head2 More than one of these entries may be inside a virtual section. The +fallback, emailalert, emailalertfreq and quiescent options listed above may +also appear inside a virtual section, in which case the global setting is +overridden. B<checktype = >I<negotiate>|I<connect>|I<N>|I<ping>|I<off>|I<on> @@ -362,22 +381,6 @@ then it must be one of tcp or udp and will default to tcp. If a firewall mark then the protocol must be fwm, which is the default. -B<emailalert = ">I<emailaddress>B<"> - -A valid email address for sending alerts about the changed connection status -to any real server defined in the virtual service. This option requires -perl module MailTools to be installed. Automatically tries to send email -using any of the built-in methods. See perldoc Mail::Mailer for more info on -methods. - -B<emailalertfreq => I<n> - -Delay in seconds between repeating email alerts while any given real server -in the virtual service remains inaccessible. A setting of zero seconds will -inhibit the repeating alerts. Default setting is zero. The email timing -accuracy of this setting is dependent on the number of seconds defined in -the checkinterval configuration option. - =head1 FILES B<@sysconfdir@/ldirectord.cf> @@ -415,6 +418,8 @@ $RUNPID $CHECKTIMEOUT $QUIESCENT + $EMAILALERT + $EMAILALERTFREQ $CALLBACK $CFGNAME @@ -831,8 +836,6 @@ $vsrv{negotiatetimeout} = 0; $vsrv{num_connects} = 0; $vsrv{httpmethod} = "GET"; - $vsrv{emailalert} = ""; - $vsrv{emailalertfreq} = 0; push(@VIRTUAL, \%vsrv); while(<CFGFILE>) { $line++; @@ -1063,6 +1066,14 @@ or &config_error($line, "quiescent must be 'yes' or 'no'"); $QUIESCENT = $1; + } elsif ($_ =~ /^emailalert\s*=\s*(.*)/) { + $1 =~ /(.+)/ or &config_error($line, + "no email address specified"); + $EMAILALERT = $1; + } elsif ($_ =~ /^emailalertfreq\s*=\s*(\d*)/) { + $1 =~ /(\d+)/ or &config_error($line, + "invalid email alert frequency"); + $EMAILALERTFREQ = $1; } else { if ($_ =~ /^timeout\s*=\s*(.*)/) { &config_error($line, @@ -1678,8 +1689,18 @@ my $real_str = "$nr->{server}:$nr->{port}"; my %emailstat; $emailstat{server}=$real_str . " " . $nv->{server} . ":" . $nv->{port}; - $emailstat{emailalertfreq}=$nv->{emailalertfreq}; - $emailstat{emailalert}=$nv->{emailalert}; + if (defined $nv->{emailalertfreq}) { + $emailstat{emailalertfreq}=$nv->{emailalertfreq}; + } + else { + $emailstat{emailalertfreq}=$EMAILALERTFREQ; + } + if (defined $nv->{emailalert}) { + $emailstat{emailalert}=$nv->{emailalert}; + } + else { + $emailstat{emailalert}=$EMAILALERT; + } push(@EMAILSTATUS, \%emailstat); if (! defined($or->{$real_str}) or $or->{$real_str}->{weight} == 0) { @@ -3046,6 +3067,9 @@ my $emailfh; my $status = 0; + if (not defined $emailto) { + $emailto = $EMAILALERT; + } if ($emailto eq "") { return 0; } ------------------------------ Message: 3 Date: Mon, 14 Aug 2006 21:55:07 -0600 (MDT) From: linux-ha-cvs@lists.linux-ha.org Subject: [Linux-ha-cvs] Linux-HA CVS: ldirectord by horms from To: [EMAIL PROTECTED] Message-ID: <[EMAIL PROTECTED]> linux-ha CVS committal Author : horms Host : Project : linux-ha Module : ldirectord Dir : linux-ha/ldirectord Modified Files: ldirectord.in Log Message: typo: Description how -> Description of how Signed-off-by: Simon Horman <[EMAIL PROTECTED]> =================================================================== RCS file: /home/cvs/linux-ha/linux-ha/ldirectord/ldirectord.in,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- ldirectord.in 15 Aug 2006 03:53:56 -0000 1.6 +++ ldirectord.in 15 Aug 2006 03:55:06 -0000 1.7 @@ -1,5 +1,5 @@ #!/usr/bin/perl -my($VERSION)=(qw$Id: ldirectord.in,v 1.6 2006/08/15 03:53:56 horms Exp $)[2]; +my($VERSION)=(qw$Id: ldirectord.in,v 1.7 2006/08/15 03:55:06 horms Exp $)[2]; ###################################################################### # ldirectord http://www.vergenet.net/linux/ldirectord/ @@ -95,7 +95,7 @@ =head1 SYNTAX -=head2 Description how to write configuration files +=head2 Description of how to write configuration files B<virtual = >I<(ip_address|hostname:portnumber|servicename)|firewall-mark> ------------------------------ _______________________________________________ Linux-ha-cvs mailing list Linux-ha-cvs@lists.linux-ha.org http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs End of Linux-ha-cvs Digest, Vol 33, Issue 33 ********************************************