Re: Threshold SPAN and persistent-alarms is not working

"Naveen Baldeo" <[email protected]>
Newsgroups gmane.network.cricket.user
Message-ID <[email protected]>
Hi Francois,

After checking the meta file and logMonitor I have found that the SPAN
is working. 

If I clear all the .meta files. I can see that they is 2 hour delay
before the alarm start to run my script. Now the persistent-alarms is
still not working. I have made the changes as you said. Where in the
script does it check for persistent-alarms value.



Regards,
 
Naveen Baldeo
 
<mailto:[email protected]>
 
-----Original Message-----
From: Francois Mikus [mailto:[email protected]] 
Sent: Wednesday, 21 March 2007 3:30 PM
To: Naveen Baldeo
Cc: [email protected]
Subject: Re: [cricket-users] Threshold SPAN and persistent-alarms is not
working

Hello Naveen,

That one is for me...

If not, here is how to check you meta processing:

- check your meta files in the data portion of your config tree to see 
if they are not corrupted.
- check the output from logMonitor:

	You should always see this, if your monitor test failed :
LogMonitor("$name -  $mt - $Threshold failed.");
Then depending on if there is no span event: LogMonitor("Triggering
alarm for $Threshold.");
Or if there is a span event: LogMonitor("Triggering a span event for
$Threshold.");

A span event is when the time period = (your span value *
rrdpollinginterval).

Though I think the bug is here: 

  241 if ($span && $mt < ($time - ($spanlength * $rrdpollinterval) -
90)) {
  242                         $spanfail = 1;
  243                 }

I think the $span && $mt is being evaluated together, then the < is 
evaluated...

The logic should have been like this:

  241 if ($span && ($mt < ($time - ($spanlength * $rrdpollinterval) -
90))) {
  242                         $spanfail = 1;
  243                 }

I am wrong in my though process. If that is what it is, it would explain

why you would be getting repeated span events. When in reality your are 
just getting a regular threshold failure.

Change the line and see if it fixes your problem.Depending on the 
version of HandleTarget.pm you have, the line number may differ.

Cheers,

Francois Mikus

Naveen Baldeo wrote:

>Hi All,
>
> 
>
>I have configured cricket thresholds as below.
>
> 
>
>config standard-interface-hc
>
>   monitor-thresholds = 
>
> 
>"ifHCOutOctets:quotient:>45pct::%rrd-max-octets%::EXEC:/srv/cricket/scr
i
>pts/threshold-add-warning.pl:/srv/cricket/scripts/threshold-clear-warni
n
>g.pl:SPAN:24,
>
> 
>ifHCInOctets:quotient:>45pct::%rrd-max-octets%::EXEC:/srv/cricket/scrip
t
>s/threshold-add-warning.pl:/srv/cricket/scripts/threshold-clear-warning
.
>pl:SPAN:24,
>
> 
>ifHCOutOctets:quotient:>80pct::%rrd-max-octets%::EXEC:/srv/cricket/scri
p
>ts/threshold-add-critical.pl:/srv/cricket/scripts/threshold-clear-criti
c
>al.pl:SPAN:24,
>
> 
>ifHCInOctets:quotient:>80pct::%rrd-max-octets%::EXEC:/srv/cricket/scrip
t
>s/threshold-add-critical.pl:/srv/cricket/scripts/threshold-clear-critic
a
>l.pl:SPAN:24"
>
> 
>
> 
>
>I can not get it working. I have 2 problems.
>
>1.         The above generates alarm every 5 min (persistent-alarms =
>false does not work).
>
>I have tried putting this in target -default--
>target --default--
>    mail-pgm = /usr/bin/mailx
>    persistent-alarms = false
> 
>also tried under 
>
>config standard-interface-hc
>
> persistent-alarms = false
>
>   monitor-thresholds = 
>
> 
>"ifHCOutOctets:quotient:>45pct::%rrd-max-octets%::EXEC:/srv/cricket/scr
i
>pts/threshold-add-warning.pl:/srv/cricket/scripts/threshold-clear-warni
n
>g.pl:SPAN:24,
>
> 
>ifHCInOctets:quotient:>45pct::%rrd-max-octets%::EXEC:/srv/cricket/scrip
t
>s/threshold-add-warning.pl:/srv/cricket/scripts/threshold-clear-warning
.
>pl:SPAN:24,
>
> 
>ifHCOutOctets:quotient:>80pct::%rrd-max-octets%::EXEC:/srv/cricket/scri
p
>ts/threshold-add-critical.pl:/srv/cricket/scripts/threshold-clear-criti
c
>al.pl:SPAN:24,
>
> 
>ifHCInOctets:quotient:>80pct::%rrd-max-octets%::EXEC:/srv/cricket/scrip
t
>s/threshold-add-critical.pl:/srv/cricket/scripts/threshold-clear-critic
a
>l.pl:SPAN:24"
>
> 
>
>and also not putting in persistent-alarm as by default it is false.
>
> 
>
>2.         An alarm is generated as soon as it happens (SPAN:24 does
not
>work).
>
> 
>
>Can you please help?
>
> 
>
>Regards,
>
> 
>
>Naveen Baldeo
>
>Technical Specialist
>
>Network Growth
>
>Mailto:              [email protected]
><mailto:Mailto:[email protected]> 
>
> 
>
>****DISCLAIMER****
>
>This e-mail may contain confidential information.  If you are not the
>intended recipient, please notify the sender immediately and delete
this
>e-mail from your system.  You must not disclose this e-mail to anyone
>without express permission from the sender.  The contents of all
e-mails
>sent to and received from Optus may be scanned, stored, or disclosed to
>others at Optus' discretion.
>
> 
>
>Optus has exercised care to avoid errors in the information contained
in
>this e-mail but does not warrant that the information is error or
>omission free.  The information (including any pricing information)
>contained in this e-mail is subject to change.  This e-mail is not a
>quotation or proposal and no contractual obligations arise until you
and
>Optus sign a formal written contract or formal variation to your
>existing contract.  
>
> 
>
>Any pricing contained in this e-mail is exclusive of GST unless
>otherwise stated.
>
> 
>
>-----------------------------------------------------------------------
--
>Take Surveys. Earn Cash. Influence the Future of IT
>Join SourceForge.net's Techsay panel and you'll get the chance to share
your
>opinions on IT & business topics through brief surveys-and earn cash
>http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVD
EV
>_______________________________________________
>cricket-users mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/cricket-users
>  
>


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.