Niko Tyni | 1 May 19:52 2005
Picon
Picon

Re: using fping's future -S option

On Sat, Apr 30, 2005 at 01:42:12PM +0200, Marc Haber wrote:
> On Sat, Apr 30, 2005 at 02:29:58PM +0300, Niko Tyni wrote:
> > ++ FPingExternal
> > 
> > binary = /usr/bin/fping -S a.b.c.d

> ERROR: FPing 'binary' does not point to an executable at (eval 11) line 1

Oops. Sorry, my mistake. I'd have sworn I've done something like that
sometime..

> I am currently working with wrappers, which is even -more- ugly ;)
> But it works.

:)

Cheers,
--

-- 
niko

Steve Bondy | 3 May 22:03 2005

Newbie problem - perl RRDs.so error

I have smokeping 1.40 running with rrdtool 1.0.48 and perl 5.8.1 on a
RedHat 9 server fine.  But a newer server is giving me fits.  This one
is Fedora Core 3, smokeping 1.40, rrdtool 1.2.1 and perl 5.8.5.  (Note
that SELinux is disabled) 

rrdtool was built with "configure --enable-perl-site-install"
But when trying to start smokeping, I get:

WARNING: ISG::ParseConfig is obsolete! Use Config::Grammar instead.
Can't load
'/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/RRDs/RRDs.s
o' for module RRDs: librrd.so.2: cannot open shared object file: No such
file or directory at
/usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm line 230.
 at /usr/local/smokeping/lib/Smokeping.pm line 13
Compilation failed in require at /usr/local/smokeping/lib/Smokeping.pm
line 13.
BEGIN failed--compilation aborted at
/usr/local/smokeping/lib/Smokeping.pm line 13.
Compilation failed in require at ./smokeping line 7.
BEGIN failed--compilation aborted at ./smokeping line 7.

I'm not good enough at perl to figure this out, but the RRDs.so is in
the location specified... A test perl script that simply has the line
"use RRDs" fails as well, with the same error.  Can anyone point me in
the right direction?

Thanks,
Steve

(Continue reading)

Marc Haber | 8 May 16:40 2005
Picon

How to stop alert from triggering on each cycle?

Hi,

Debian's default configuration has a pre-configured alert "someloss"
which is defined as follows:

+someloss
type = loss
pattern = >0%,*12*,>0%,*12*,>0%
comment = loss 3 times  in a row

I am currently experiencing an extended outage, and my smokeping sends
me one mail per host and cycle:

Got a match for alert "intsomeloss" for <URL>

Pattern
-------
>0%,*12*,>0%,*12*,>0%

Data (old --> now)
------------------
loss: 100%, 100%, 100%, 100%, 100%, 100%, 100%, 100%, 100%, 100%, 100%, 100%, 100%, 100%, 100%, 100%, 100%,
100%, 100%, 100%, 100%, 100%, 100%, 100%, 100%, 100%, 100%
rtt: U, U, U, U, U, U, U, U, U, U, U, U, U, U, U, U, U, U, U, U, U, U, U, U, U, U, U

Comment
-------
loss 3 times  in a row

The mails are idential, only the Dates given change, of course.
(Continue reading)

Tobias Oetiker | 8 May 17:05 2005
Picon
Picon

Re: How to stop alert from triggering on each cycle?

Hi Marc,

you have to 'anchor' your pattern ... eg

pattern = ==0%,>0%,*12*,>0%,*12*,>0%

cheers
tobi

Today Marc Haber wrote:

>
> man smokeping_config gives me the impression that smokeping _should_
> only send out e-mail in case of a state change, which is clearly not
> the case at the moment.
>
> What might I be doing wrong?
>
> Greetings
> Marc
>
>

--

-- 
 ______    __   _
/_  __/_  / /  (_) Oetiker  <at>  ISG.EE, ETL F24.2, ETH, CH-8092 Zurich
 / // _ \/ _ \/ /  System Manager, Time Lord, Coder, Designer, Coach
/_/ \.__/_.__/_/   http://people.ee.ethz.ch/oetiker +41(0)44-632-5286

(Continue reading)

Marc Haber | 8 May 17:18 2005
Picon

Re: How to stop alert from triggering on each cycle?

Hi,

On Sun, May 08, 2005 at 05:05:28PM +0200, Tobias Oetiker wrote:
> you have to 'anchor' your pattern ... eg
> 
> pattern = ==0%,>0%,*12*,>0%,*12*,>0%

If I see correctly, it will then send out one mail per cycle unless
the "unreachable" has filled up all values, right?

In my Opinion, smokeping should check whether it would have sent out a
message the cycle before (that check is possible since history data is
available) and only send out a message if it wouldn't have sent a
message in the last cycle and would send one now.

Greetings
Marc

--

-- 
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany  |  lose things."    Winona Ryder | Fon: *49 621 72739834
Nordisch by Nature |  How to make an American Quilt | Fax: *49 621 72739835

Tobias Oetiker | 8 May 17:24 2005
Picon
Picon

Re: How to stop alert from triggering on each cycle?

Today Marc Haber wrote:

> Hi,
>
> On Sun, May 08, 2005 at 05:05:28PM +0200, Tobias Oetiker wrote:
> > you have to 'anchor' your pattern ... eg
> >
> > pattern = ==0%,>0%,*12*,>0%,*12*,>0%
>
> If I see correctly, it will then send out one mail per cycle unless
> the "unreachable" has filled up all values, right?

no ... with your pattern it will send out alerts all the time since
the pattern matches always ... the trick with the patterns is that
you make them so that they only match when the condition starts to
occure ... so in your case the interesting ting is if you have

loss ... no-loss ... loss ... no-loss ... loss

in your test you are only testing

loss ... loss ... loss

cheers
tobi

>
> In my Opinion, smokeping should check whether it would have sent out a
> message the cycle before (that check is possible since history data is
> available) and only send out a message if it wouldn't have sent a
(Continue reading)

Marc Haber | 8 May 17:32 2005
Picon

Re: How to stop alert from triggering on each cycle?

Hi,

Ok, I must be missing something.

On Sun, May 08, 2005 at 05:24:22PM +0200, Tobias Oetiker wrote:
> Today Marc Haber wrote:
> > On Sun, May 08, 2005 at 05:05:28PM +0200, Tobias Oetiker wrote:
> > > you have to 'anchor' your pattern ... eg
> > >
> > > pattern = ==0%,>0%,*12*,>0%,*12*,>0%
> >
> > If I see correctly, it will then send out one mail per cycle unless
> > the "unreachable" has filled up all values, right?
> 
> no ... with your pattern it will send out alerts all the time since
> the pattern matches always ... the trick with the patterns is that
> you make them so that they only match when the condition starts to
> occure ... so in your case the interesting ting is if you have
> 
> loss ... no-loss ... loss ... no-loss ... loss
> 
> in your test you are only testing
> 
> loss ... loss ... loss

Let's have a pattern ==0,>5%,*3*,>5%

Everything is fine:

  0    0    0    0    0    0    0    0
(Continue reading)

Marc Haber | 8 May 20:21 2005
Picon

Re: How to stop alert from triggering on each cycle?

On Sun, May 08, 2005 at 06:08:01PM +0200, Tobias Oetiker wrote:
> yep now you got it ... so the trick is to create a pattern that
> makes sense for you ... you may want to anchore it with a more
> substantial stretch of 0% to start with ... then you will only get
> a match when trouble starts ...

Ok. How would a pattern look like which only sends mail when there are
exactly three >5% points are in the history? *x* matches everything,
how do I match an arbitrary long stretch of zeroes?

Additionally the manpage text ">10%,*10*,>10% will fire if more than
10% of the packets have been losst twice over the last 10 samples." is
wrong. It will fire if more than 10% of the packets have been lost
_at_ _least_ twice over the last 10 samples.

Greetings
Marc

--

-- 
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany  |  lose things."    Winona Ryder | Fon: *49 621 72739834
Nordisch by Nature |  How to make an American Quilt | Fax: *49 621 72739835

Tobias Oetiker | 8 May 21:57 2005
Picon
Picon

Re: How to stop alert from triggering on each cycle?

Hi Marc,

Today Marc Haber wrote:

> On Sun, May 08, 2005 at 06:08:01PM +0200, Tobias Oetiker wrote:
> > yep now you got it ... so the trick is to create a pattern that
> > makes sense for you ... you may want to anchore it with a more
> > substantial stretch of 0% to start with ... then you will only get
> > a match when trouble starts ...
>
> Ok. How would a pattern look like which only sends mail when there are
> exactly three >5% points are in the history? *x* matches everything,
> how do I match an arbitrary long stretch of zeroes?
>
> Additionally the manpage text ">10%,*10*,>10% will fire if more than
> 10% of the packets have been losst twice over the last 10 samples." is
> wrong. It will fire if more than 10% of the packets have been lost
> _at_ _least_ twice over the last 10 samples.

sorry yes ... exactly as wrong as if I say, you loose your driving
license if you are caught driving faster than 100 MPH twice, since
this would imply that you would NOT lookse the license if you were
caught three times ... right ? :-) in any event, I changed the
docus in the 2.0 svn archive to not further confuse readers ...

Note that for more complex alerting requirements there is a special
matcher module interface in smokeping where you can write alerting
plugins that trigger on whatever conditions you imagine/express in
perl ...

(Continue reading)

Marc Haber | 9 May 07:57 2005
Picon

Re: How to stop alert from triggering on each cycle?

Hi Tobi,

On Sun, May 08, 2005 at 09:57:28PM +0200, Tobias Oetiker wrote:
> Today Marc Haber wrote:
> > Additionally the manpage text ">10%,*10*,>10% will fire if more than
> > 10% of the packets have been losst twice over the last 10 samples." is
> > wrong. It will fire if more than 10% of the packets have been lost
> > _at_ _least_ twice over the last 10 samples.
> 
> sorry yes ... exactly as wrong as if I say, you loose your driving
> license if you are caught driving faster than 100 MPH twice, since
> this would imply that you would NOT lookse the license if you were
> caught three times ... right ? :-) in any event, I changed the
> docus in the 2.0 svn archive to not further confuse readers ...

Thanks for the clarification.

This makes writing smokeping alerts, IMO, unnecessarily hard and
error-prone. Unfortunately, I don't quite understand the code that
builds the alerts subroutine in init_alerts and agree that this code
is already complicated enough.

I don't know enough about object oriented perl to write correct code,
but I'd like to suggest something nevertheless. I hope that you
understand me.

That code needs to be in the update_rrds subroutine.

if ( $tree->{alerts} ) {
  $tree->{stack} = {loss=>['S'],rtt=>['S']} unless defined $tree->{stack};
(Continue reading)


Gmane