fping.monitor improvement

2004-11-29 Thread Ed Ravin
I needed fping to use a larger packet size in order to monitor when a
tunnel loses the ability to pass full-sized packets.  Hence the patches
below to fping.monitor to pass on the "-b " option.  Patch is also
attached to avoid mail client munging.

-- Ed

--- fping.monitor   2004/11/24 23:20:36 1.1
+++ fping.monitor   2004/11/24 23:23:53
@@ -4,7 +4,7 @@
 #
 # Jim Trocki, [EMAIL PROTECTED]
 #
-# $Id: fping.monitor,v 1.1 2004/11/24 23:20:36 root Exp root $
+# $Id: fping.monitor,v 1.1.1.1.2.1 2004/07/29 21:10:19 trockij Exp $
 #
 #Copyright (C) 1998, Jim Trocki
 #
@@ -27,7 +27,7 @@
 use Getopt::Std;
 
 my %opt;
-getopts ("ahr:s:t:T", \%opt);
+getopts ("ab:hr:s:t:T", \%opt);
 
 sub usage
 {
@@ -35,6 +35,7 @@
 usage: fping.monitor [-a] [-r num] [-s num] [-t num] [-T] host [host...]
 
 -a only report failure if all hosts are unreachable
+-b num  send "num" bytes of ping data (default 56, like regular ping)
 -r num retry "num" times for each host before reporting failure
 -s num consider hosts which respond in over "num" msecs failures
 -t num wait "num" msecs before sending retries
@@ -50,7 +51,8 @@
 
 my $TIMEOUT = $opt{"t"} || 2000;
 my $RETRIES = $opt{"r"} || 3;
-my $CMD = "fping -e -r $RETRIES -t $TIMEOUT";
+my $NUMBYTES = $opt{"b"} || 56;
+my $CMD = "fping -e -r $RETRIES -t $TIMEOUT -b $NUMBYTES";
 my $START_TIME = time;
 my $END_TIME;
 my %details;
--- fping.monitor   2004/11/24 23:20:36 1.1
+++ fping.monitor   2004/11/24 23:23:53
@@ -4,7 +4,7 @@
 #
 # Jim Trocki, [EMAIL PROTECTED]
 #
-# $Id: fping.monitor,v 1.1 2004/11/24 23:20:36 root Exp root $
+# $Id: fping.monitor,v 1.1.1.1.2.1 2004/07/29 21:10:19 trockij Exp $
 #
 #Copyright (C) 1998, Jim Trocki
 #
@@ -27,7 +27,7 @@
 use Getopt::Std;
 
 my %opt;
-getopts ("ahr:s:t:T", \%opt);
+getopts ("ab:hr:s:t:T", \%opt);
 
 sub usage
 {
@@ -35,6 +35,7 @@
 usage: fping.monitor [-a] [-r num] [-s num] [-t num] [-T] host [host...]
 
 -a only report failure if all hosts are unreachable
+-b num  send "num" bytes of ping data (default 56, like regular ping)
 -r num retry "num" times for each host before reporting failure
 -s num consider hosts which respond in over "num" msecs failures
 -t num wait "num" msecs before sending retries
@@ -50,7 +51,8 @@
 
 my $TIMEOUT = $opt{"t"} || 2000;
 my $RETRIES = $opt{"r"} || 3;
-my $CMD = "fping -e -r $RETRIES -t $TIMEOUT";
+my $NUMBYTES = $opt{"b"} || 56;
+my $CMD = "fping -e -r $RETRIES -t $TIMEOUT -b $NUMBYTES";
 my $START_TIME = time;
 my $END_TIME;
 my %details;
___
mon mailing list
[EMAIL PROTECTED]
http://linux.kernel.org/mailman/listinfo/mon


Re: Alert escalation even if acknowledged

2004-11-29 Thread Michael Vogt
Jim,

--- Jim Trocki <[EMAIL PROTECTED]> wrote:

> On Wed, 24 Nov 2004, Michael Vogt wrote:
> 
> 
> maybe this would be better off as a per-period config setting. for
> example,
> 
> watch abc
> service lmnop
>   monitor fping.monitor
>   interval 5m
>   period L1: wd {Sun-Sat}
>   alert mail.alert peeps
>   alertevery 8h
>   period L2: wd {Sun-Sat}
>   alert mail.alert ack-peeps
>   continue_after_ack
> 
> where the alerts in L2: will keep going even after the failure is
> ack'd, but
> the ones in L1 will stop being sent after the ack.
> 

Thanks.  Yes.  The suggested per period config setting seems very
natural.  I'll try the inferred code change and, if it works out for
me, suggest it as a future enhancement.

I still see some potential for basing an escalation alert on a mon
status report, since that would offer a single alert (both for the
receiver and for the config file) with an overview suitable for a
person that may not be hands-on.

Thanks,
Michael Vogt





__ 
Do you Yahoo!? 
Read only the mail you want - Yahoo! Mail SpamGuard. 
http://promotions.yahoo.com/new_mail 

___
mon mailing list
[EMAIL PROTECTED]
http://linux.kernel.org/mailman/listinfo/mon