<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>hobbit-alerts.cfg: behaviour of TIME and DURATION together</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.5730.11" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Arial size=2>Bizarrely and somewhat
contradictory to the behaviour below is the behaviour of DURATION well inside of
the times specified with the TIME rule. Is DURATION not reset when the
colour of the alert changes??? That seems to be the only explanation for
what I'm seeing (though it is early days to be certain). Or, to put it
another way, is DURATION the non-green DURATION, rather than the duration of
being in a certain colour?</FONT></DIV>
<DIV> </DIV>
<DIV dir=ltr align=left><FONT face=Arial size=2>The config I currently have
is:</FONT></DIV>
<DIV> </DIV>
<DIV dir=ltr align=left><FONT face=Arial size=2>$pg-sebsms=me AT
mysms2emailprovider.com TIME=W:0845:2355</FONT></DIV>
<DIV> </DIV>
<DIV dir=ltr align=left><FONT face=Arial size=2>HOST=DbR1
SERVICE=Special<BR> MAIL me AT work.co.uk COLOR=red
DURATION>2 REPEAT=30 RECOVERED<BR> MAIL $pg-sebsms
COLOR=red DURATION>15 REPEAT=300 RECOVERED</FONT></DIV>
<DIV> </DIV>
<DIV dir=ltr align=left><FONT face=Arial size=2>I was hoping (and expecting) the
above rules to only alert after 2 minutes and 15 minutes repectively of being
red, given that COLOR=red is part of the rule. I do, however, acknowledge
that there may be (rare) cases where you would want to include the yellow time
in the DURATION. In which case, we really need REDDURATION, YELLOWDURATION
and PURPLEDURATION rules. Or perhaps just a way of specifying how you want
the DURATION to be calculated in that rule:
DURATIONTYPE=<NONGREEN|LASTCHANGE> (that's either or). Or even more
powerfully: DURATIONCALC=color[,color] (adds up the duration of being in these
colour states). (However, this could become resource intensive if you
specify DURATIONCALC=red,yellow,purple,green or something! On the other hand,
one only needs to check back as far as DURATION, rather than calculate the total
time in these colour states.)</FONT></DIV>
<DIV> </DIV>
<DIV dir=ltr align=left><FONT face=Arial size=2>I am using Hobbit 4.3 (trunk)
from Dec 9 2008.</FONT></DIV>
<DIV> </DIV>
<DIV dir=ltr align=left><FONT face=Arial size=2>Looking carefully at <SPAN
class=516281419-28012009>'</SPAN>man hobbitd_alert<SPAN
class=516281419-28012009>'</SPAN> this appears to be most relevant
part:<BR>'When a status first goes to one of the ALERTCOLORS, hobbitd_alert is
notified of this change. It notes that the status is now in an alert state, and
records the timestamp when this event started, and adds the alert to the list
statuses that may potentially trigger one or more alert messages.'<BR>I do not,
however, think that this timestamp should be what is used by the DURATION rule
(it being far too simplistic), but it looks like it may very well be.
Maybe this explains the behaviour I have with Big Brother's rules that I always
considered a weird bug: sometimes the 'initial page delay' is not
respected. This actually happened twice today and I got SMSes
simultaneously from BB and Hobbit when they had 5 minute and 15 minute initial
page delays respectively, and I got the SMS immediately after the red. It
had however been yellow for some time before, but on BB my pagelevels is set to
"red purple", so the yellow should have been ignored and not come into the
equation. How frustrating! One of the main reasons I wanted to move
to Hobbit was to eliminate this 'bug' in Big Brother!</FONT></DIV>
<DIV> </DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT size=2>Still awaiting a reply on
my message below BTW. Given my unfortunate theory<SPAN
class=516281419-28012009>,</SPAN> above<SPAN class=516281419-28012009>,</SPAN>
on what is going here, I suspect the TIME rule is causing this magic timestamp
to never be recorded! Somehow it appears to be taking precedence over the
DURATION rule<SPAN class=516281419-28012009> when I wish the DURATION rule to
take precedence (and I think that is more logical: if I wanted to mark it as
downtime, I'd have put the TIME rule into bb-hosts not
hobbit-alerts.cfg!)</SPAN>.<SPAN class=516281419-28012009>
;)</SPAN></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT size=2><SPAN
class=516281419-28012009></SPAN></FONT></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT size=2><SPAN
class=516281419-28012009><SPAN class=516281419-28012009>'</SPAN>man
hobbitd_alert<SPAN class=516281419-28012009>'</SPAN> could be clearer, e.g. on
how rules interact with each other!</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT size=2><SPAN
class=516281419-28012009>Many thanks</SPAN>,</FONT></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial size=2>SebA<BR></FONT></DIV>
<DIV><BR></DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> SebA [mailto:spa@syntec.co.uk]
<BR><B>Sent:</B> 27 January 2009 14:35<BR><B>To:</B>
hobbit@hswn.dk<BR><B>Subject:</B> [hobbit] hobbit-alerts.cfg: behaviour of
TIME and DURATION together<BR></FONT><BR></DIV>
<DIV></DIV><!-- Converted from text/rtf format -->
<P><FONT face=Arial size=2>It seems the combination of TIME=W:0845:2355 and
DURATION>15 in hobbit-alerts.cfg means the earliest an alert can be sent
out is 9 am. Is this what you would expect? I would have expected
these two rules to mean the test should be in an alarm colour for more than 15
minutes and be between the times of 08:45 and 23:55, weekdays. Instead
it seems to be relating the DURATION with the time such that the DURATION only
applies _during_ the TIME…</FONT></P>
<P><FONT face=Arial size=2>If the current behaviour is intended, than will
using EXTIME instead of TIME be what I want? Oh! There is no
EXTIME?! I assumed there was but I see no documentation for it apart
from Henrik's suggestion that he might add it:</FONT></P>
<P><A href="http://www.hswn.dk/hobbiton/2006/06/msg00417.html"><U><FONT
face=Arial color=#0000ff
size=2>http://www.hswn.dk/hobbiton/2006/06/msg00417.html</FONT></U></A> </P>
<P><FONT face=Arial size=2>Kind regards,</FONT> </P>
<P><FONT face=Arial size=2>SebA</FONT> </P></BLOCKQUOTE></BODY></HTML>