Re: fping.monitor output problems

2006-12-20 Thread Ed Ravin
On Tue, Dec 13, 2005 at 04:53:21PM +0100, Hans Kinwel wrote:
 
 I finally went to the bottom of this.  Not that it is rocket science.
 
 When I do fping 1.2.3.4 I get
 
 ICMP Host Unreachable from 194.178.10.133 for ICMP Echo sent to 1.2.3.4
 ICMP Host Unreachable from 194.178.10.133 for ICMP Echo sent to 1.2.3.4
 ICMP Host Unreachable from 194.178.10.133 for ICMP Echo sent to 1.2.3.4
 1.2.3.4 is unreachable
 
 In the (new, broken) fping.monitor I see:
 
if (/^(\S+).*unreachable/i)
{
push (@unreachable, $1);
}
...
 It is evident now.  Some well intending person (probably Jim, from
 the RCSid) added a /i and now that string matches with the ICMP Host
 Unreachable, to which it is not supposed to match. It is supposed later
 to match with a do nothing clause that is indeed the right thing to do.
 
 So if somebody would be so kind to remove that /i I will be much obliged.

I just got around to dealing with fping.monitor on my site.  I removed
the /i, got rid of my dumb idea to redirect stdout to /dev/null (it
loses the address not found error messages), and rearranged how
fping.monitor treats unidentified output, with this simple patch:

--- fping.monitor   2006/12/20 22:46:26 1.3
+++ fping.monitor   2006/12/20 23:07:36
@@ -63,6 +63,7 @@
die could not open pipe to fping: $!\n;
 
 my @unreachable;
+my @unidentified;
 my @alive;
 my @addr_not_found;
 my @slow;
@@ -122,7 +123,7 @@
 
 else
 {
-   print STDERR unidentified output from fping: [$_]\n;
+   push @unidentified, $_;
 }
 }
 
@@ -216,6 +217,17 @@
 }
 }
 
+if (@unidentified != 0)
+{
+print EOF;
+
+--
+unidentified output from fping
+--
+EOF
+   print join(\n, @unidentified), \n;
+}
+
 #
 # traceroute
 #

___
mon mailing list
mon@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/mon


Re: fping.monitor output problems

2005-12-13 Thread Hans Kinwel

On 09/01/2005 03:50 AM, Ed Ravin wrote:

On Thu, Jul 07, 2005 at 01:05:13PM +0200, Kevin Ivory wrote:


On 2005-07-07 13:00, Kevin Ivory wrote:


the fping.monitor included with mon-1.0.0pre5 doesn't semm to parse
the output of fping correctly.


...


# ./fping.monitor 192.168.140.3
192.168.140.3 ICMP ICMP ICMP ICMP


some more extra information: the problematic code must have went in
between pre3 and pre4: pre3's output looks fine.



I've been getting this too - it looks like fping sends some of its
error messages to stderr, which confuse fping.monitor.  Try the patch
below, which discards the messages, which fping.monitor would ignore
anyway.


I finally went to the bottom of this.  Not that it is rocket science.

When I do fping 1.2.3.4 I get

ICMP Host Unreachable from 194.178.10.133 for ICMP Echo sent to 1.2.3.4
ICMP Host Unreachable from 194.178.10.133 for ICMP Echo sent to 1.2.3.4
ICMP Host Unreachable from 194.178.10.133 for ICMP Echo sent to 1.2.3.4
1.2.3.4 is unreachable

In the (new, broken) fping.monitor I see:

   if (/^(\S+).*unreachable/i)
   {
   push (@unreachable, $1);
   }

Whereas the (old, good) fping monitor says:

   if (/^(\S+).*unreachable/)
   {
   push (@unreachable, $1);
   }

It is evident now.  Some well intending person (probably Jim, from
the RCSid) added a /i and now that string matches with the ICMP Host
Unreachable, to which it is not supposed to match. It is supposed later
to match with a do nothing clause that is indeed the right thing to do.

So if somebody would be so kind to remove that /i I will be much obliged.

Another thing is that the fping.monitor prints out a start time,
end time and duration time.  Where duration time is always in
the order of seconds.  Turns out that these times refer to the runtime
of the fping script.  I find this extremely confusing.  When I, or one
of my collegues, gets an alert regarding a ping-problem, which includes
a starttime, endtime and duration, one is naturally inclined to think
that the ping problem only lasted a couple of seconds.  In reality in
ping problem still remains, and that means that connectivity to some
host is still lost.

I find that if I comment out those three print statements the resulting
alert gets much more readable.  So, I would appreciate it if someone
would remove these statements from the repository as well.

Thank you and greetings,
--
  |Hans Kinwel
  | [EMAIL PROTECTED]

___
mon mailing list
mon@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/mon


Re: fping.monitor output problems

2005-07-07 Thread Kevin Ivory

On 2005-07-07 13:00, Kevin Ivory wrote:

the fping.monitor included with mon-1.0.0pre5 doesn't semm to parse
the output of fping correctly.

...

# ./fping.monitor 192.168.140.3
192.168.140.3 ICMP ICMP ICMP ICMP


some more extra information: the problematic code must have went in
between pre3 and pre4: pre3's output looks fine.

Kevin
--
  _ |  Kevin Ivory  |  Tel: +49-551-370
 |_ |\ ||  Service Network GmbH |  Fax: +49-551-379
 ._|ER  | \|ET  |  Bahnhofsallee 1b |  mailto:[EMAIL PROTECTED]
Service Network |  37081 Goettingen |http://www.SerNet.de/

___
mon mailing list
mon@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/mon