--- On Tue, 4/21/09, Michael Hale <mh...@transcomus.com> wrote:

> From: Michael Hale <mh...@transcomus.com>
> Subject: Re: [Simple-evcorr-users] is there a way to alarm when input is NOT 
> seen after a certain amount of time?
> To: "Risto Vaarandi" <risto.vaara...@seb.ee>
> Cc: simple-evcorr-users@lists.sourceforge.net
> Date: Tuesday, April 21, 2009, 12:04 AM
> 
> On Apr 16, 2009, at 12:14 PM, Risto Vaarandi
> wrote:
> Michael
> Hale wrote:
> Hello,
> I was wondering if
> there was a way to alarm if a certain output is NOT
>  seen after a certain amount of time.
> For example, I have a
> logfile which lists transaction processing - I  want to
> alarm when nothing is written to that file for a certain
>  amount of time, or alternately, when either the string
> "STATUS = 1" or  "STATUS=0"
> hasn't appeared for a certain amount of time.
> 
> hi Michael,
> yes, the task you have described can be done quite easily.
> There is a related example in the man page 
> (see http://simple-evcorr.sourceforge.net/sec.pl.html#lbBA),
> but it can be modified for your purpose:
> 
> type=Calendar
> time=* * * * *
> desc=WAITING FOR STATUS
> action=event %s
> Thanks, Risto - that worked quite
> well.
> One thing I noticed, using this method to try to
> detect when an input isn't seen for a while, it seems
> since we're using the Calendar module that the
> granularity is limited to a 60 second window.  Is there
> a way to determine if we've not seen an input in a
> shorter windows, say 2 seconds ?

Not with the 'time' field of the Calendar rule, but you can use several 'event' 
actions for that. For example, the following rule triggers checks after 15 
second intervals:

type=Calendar
time=* * * * *
desc=WAITING FOR STATUS
action=event %s; event 15 %s; event 30 %s; event 45 %s

Of course, having checks once in 2 seconds is somewhat cumbersome to write -- 
but if you are producing alerts for a human being, the window of 15-30 seconds 
is usually more than enough (just consider how long it would take from a 
typical helpdesk guy to check the message on the screen, pick up a phone and 
make a call :). However, if you are running automatic remedy actions, it might 
be a different story.

br,
risto

>  --Michael Hale
>                
>                
>                               <mh...@transcomus.com>Manager
> of Engineering Support                                Enterprise Engineering
> GroupTranscom Enhanced Services                                       
> http://www.transcomus.com
> 
> 
> 
>  
> 
> -----Inline Attachment Follows-----
> 
> ------------------------------------------------------------------------------
> Stay on top of everything new and different, both inside
> and 
> around Java (TM) technology - register by April 22, and
> save
> $200 on the JavaOne (SM) conference, June 2-5, 2009, San
> Francisco.
> 300 plus technical and hands-on sessions. Register today. 
> Use priority code J9JMT32. http://p.sf.net/sfu/p
> -----Inline Attachment Follows-----
> 
> _______________________________________________
> Simple-evcorr-users mailing list
> Simple-evcorr-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/simple-evcorr-users
> 


      

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Simple-evcorr-users mailing list
Simple-evcorr-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/simple-evcorr-users

Reply via email to