Xymon Mailing List Archive search

acks through email

list Kevin Grady
Wed, 23 Feb 2005 08:25:51 -0500
Message-Id: <user-22a9015107b4@xymon.invalid>

Well to make a small contribution back to hobbit, attached is a
modified version of bb-mailack.sh that assumes you are using RC3 (I
removed the settings for AWK, etc.) Also, sets BBDISPLAYS to BBDISP,
BBPAGERS to BBPAGE (you'll need to change this if you have multiple
displays or pagers). One other mod is when you ack by email, the
message in the acknowledgement will read: email ack from [user's name]
 Duration [delay] min

Also, included are the changes suggested by Asif and Henrik in this thread.
This script still uses ack ack_event as I did not have a chance to
test with hobbitdack.

There are 2 places you will need to change the path if your home is
not /usr/local/hobbit.

I'll add comments soon. If this is not the proper method of
distributing mods for hobbit please let me know what is and I'll
adhere to it.

Thanks and great software.


On Tue, 22 Feb 2005 22:37:33 -0500, kevin grady <user-50dc3c45bc73@xymon.invalid> wrote:
Ok, after walking away for a while I apologize for wasting people's
time. I was missing defs for SED, AWK, etc.

Works like a champ now


On Wed, 23 Feb 2005 00:02:57 +0100, Henrik Stoerner <user-ce4a2c883f75@xymon.invalid> wrote:
On Tue, Feb 22, 2005 at 05:43:22PM -0500, kevin grady wrote:
So looking at the format of bb alert messages the subject line is:

!BB - 2827410! prodsqlclstr1.prod.smartbargains.com.sql-server -
999010100001240

Where in hobbit without bb the subject line format is:

BB [770509] vicious.smartbargains.com:ftp is RED

Is there a way to modify the subject line format in hobbit to match bb
the bb format or does bb-mailack.sh need some mods for this to work?
It shouldn't matter. bb-mailack does some processing to filter out the
"fluff" in a mail message, and picks up all of the data it needs from
the subject line - regardless of whether it is in BB or Hobbit format.

I'd start the troubleshooting by adding a line or two to echo the
data bb-mailack sends to Hobbit. Just before the line
  $BB $BBPAGE "ack ack_event ${NUMBER} ${DELAY} ${MESSAGE}"
could you add this:
  echo "ack ack_event ${NUMBER} ${DELAY} ${MESSAGE}"  >>/tmp/mailack.log

Then do a couple of mail-ack's and check out what's in the log file.
My first suspicion is that the ack-number is wrong, since that will
mean that Hobbit silently discards the ack-message.


Henrik

Attachments (1)