[hobbit] Extend timers to avoid purples

Kevin.Hanrahan at novainfo.com Kevin.Hanrahan at novainfo.com
Mon Jun 27 22:03:49 CEST 2005


OK, ...thanks for the reply... I tried that, I think.

I made a custom script for checking domain registration expiration dates and
I am calling it from hobbitlaunch as such:

	[Domain Registration]
        CMD /home/hobbit/server/ext/ext-domainname.sh
        INTERVAL 1400m



I am passing the status of the test (using an allready existing BB test)
like this:



	#  Get Status proc - used to get all responses
#
get_status()
{
   DaysLeft=`$PROBE $1`
   RESULT="OK: Remaining days - $DaysLeft"
   COLOR="green"

   if [ "$DaysLeft" != "Record not found" ]
   then
      if [ "$DaysLeft" -le "$DAYSLEFTWARN" ]
      then
         RESULT="WARNING: Remaining days - $DaysLeft"
         COLOR="yellow"
      fi
      if [ "$DaysLeft" -le "$DAYSLEFTERROR" ]
      then
         RESULT="ERROR: Remaining days - $DaysLeft"
         COLOR="red"
      fi
   else
      RESULT="ERROR: $DaysLeft"
      COLOR="red"
   fi
   echo "$COLOR+1430m `date` $RESULT"

}

#  Main body
$GREP "$TEST" $BBHOSTS |
while read line; do
    TESTNAME=`echo "$line" | awk '{print $2}'`
    STATUS=`get_status $TESTNAME`
    if [ ! -z "$STATUS" ]
    then
        # NOW USE THE BB COMMAND TO SEND THE DATA ACROSS
        SDISPLAY="status $TESTNAME.$TEST $STATUS"
        echo "$SDISPLAY" >> /tmp/ext-domainname.output
        $BB $BBDISP "$SDISPLAY"
    fi
done
	


After 30 minutes it always goes purple! I thought I was adding 1430 minutes
to the result time...am I wrong?


I am no coder so please be patient but I could use some direction here
please.


Thank you


kevin

 
	

-----Original Message-----
From: henrik at hswn.dk [mailto:henrik at hswn.dk] 
Sent: Saturday, June 25, 2005 2:16 AM
To: hobbit at hswn.dk
Subject: Re: [hobbit] Extend timers to avoid purples


On Sat, Jun 25, 2005 at 01:59:45PM +1200, Andy France wrote:
> 
> 
> Kevin Hanrahan wrote on 25/06/2005 07:49:42:
> 
> > Can anybody tell me how to get a test to avoid purples if it is only 
> > run once a day?  Thanks
> >
> 
> As Hobbit doesn't have it's own client (yet!), I'll assume it 
> understands all of the standard bb client options.
> 
> If you read the help pages on the bb4.org site

Or do a "man bb".

Except I hadn't gotten around to describing the full syntax of the status
command. It's in there now.

> When you call the bb client executable from your script, change 
> "status" to "status+1440" in the message header for the lifetime to be 
> 24 hours.

Hobbit also accepts "status+25h"


Regards,
Henrik


To unsubscribe from the hobbit list, send an e-mail to
hobbit-unsubscribe at hswn.dk


Note:  The information contained in this email and in any attachments is
intended only for the person or entity to which it is addressed and may
contain confidential and/or privileged material.  Any review,
retransmission, dissemination or other use of, or taking of any action in
reliance upon, this information by persons or entities other than the
intended recipient is prohibited.  The recipient should check this email and
any attachments for the presence of viruses.  Sender accepts no liability
for any damages caused by any virus transmitted by this email. If you have
received this email in error, please notify us immediately by replying to
the message and delete the email from your computer.  This e-mail is and any
response to it will be unencrypted and, therefore, potentially unsecure.
Thank you.  NOVA Information Systems, Inc.



More information about the Xymon mailing list