[hobbit] ACK with Delay

Henrik Stoerner henrik at hswn.dk
Sun Feb 13 23:50:51 CET 2005


On Sun, Feb 13, 2005 at 11:09:21AM -0500, Asif Iqbal wrote:
> On Sun, Feb 13, 2005 at 08:30:23AM, Henrik Stoerner wrote:
> > On Sat, Feb 12, 2005 at 08:23:26PM -0500, Asif Iqbal wrote:
> > > Is there a way to retrieve an alert based on the ACKCODE?
> > 
> > [snip BB script that picks out hostname+service for an ack code]
> > 
> > I hope you don't mind my asking: Why ?
> 
> This way I can keep the delay script simple. I do not have to parse the
> host.service info from the subject or body of the message. Plus with
> skytel it looses the subject. So I just look for the [12345] code in the
> email and just use that as a reference to pick up the host.service

Well, I still don't understand what you're using it for - what does
your "delay" script do ?

But there is a way of doing what you want. Send a "hobbitdboard"
request to the server, and look for the output to contain the
ack-code in field 11 (separated by '|' chars). Like the following
awk-script does (substitute "12345" with the ack-code you want):

  ~hobbit/server/bin/bb 127.0.0.1 "hobbitdboard" | \
     awk -F '|' '$11 == "12345" {print $1 " " $2 }'


Regards,
Henrik



More information about the Xymon mailing list