[xymon] Hobbit-mailack

Geoff Hallford geoff.hallford at gmail.com
Thu Jul 22 19:53:32 CEST 2010


Thank you very much. I don't want to really mess with the code itself. I
fixed it by filtering it through sed in my procmailrc file. For anyone else
that is interested, here is the scenario:

My alert subject: "ALERT: [$ACKCODE] $BBHOSTNAME - $SERVICE"
Hobbit expects: "Hobbit [$ACKCODE] ......"

The contents of my ~/.procmailrc file to make hobbit-mailack accept the
acknowledgement (until the code is changed):

DEFAULT=$HOME/Mailbox
LOGFILE=$HOME/procmail.log
:0
| sed -e s/"ALERT: "/"Hobbit "/ | $HOME/server/bin/hobbit-mailack
--env=$HOME/server/etc/hobbitserver.cfg




On Thu, Jul 22, 2010 at 11:37 AM, Asif Iqbal <vadud3 at gmail.com> wrote:

> On Thu, Jul 22, 2010 at 11:16 AM, Geoff Hallford
> <geoff.hallford at gmail.com> wrote:
> > Hi All,
> >
> > Does anyone know of a way to allow my custom email alerts to be used with
> > hobbit-mailack? Currently, the only way to get Xymon 4.3.0-0 beta 2 to
> > acknowledge an alert via email reply is for the subject line to start
> with
> > "Hobbit [$ACKCODE]". My alerts start off with either "ALERT:" or
> > "RECOVERED:" and not matter where I put the $ACKCODE, it only works if
> you
> > do it as "Hobbit [$ACKCODE]".
>
> You just have to modify few lines starting here, excerpted from
> hobbitd/hobbit-mailack.c
>
>  98         /* Get the alert cookie */
>  99         subjexp = pcre_compile(".*(Hobbit|BB)[ -]*
> \\[*(-*[0-9]+)[\\]!]*", PCRE_CASELESS, &errmsg, &errofs, NULL);
> 100         if (subjexp == NULL) {
> 101                 dbgprintf("pcre compile failed - 1\n");
> 102                 return 2;
> 103         }
>
> So it is really pcre match. Then make clean; make and then save your
> old hobbit-mailack and
> replace it your new hobbit-mailack
>
> >
> > I think there should be something in the hobbitserver.cfg to allow people
> to
> > change this, as we are supposed to be able to customize our alerting and
> > this breaks mailack.
> >
> > Any thoughts?
> >
> > Thanks.
> >
> > P.S. I can't develop in C.
> >
> > Geoff.
> >
>
>
>
> --
> Asif Iqbal
> PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
>
> To unsubscribe from the xymon list, send an e-mail to
> xymon-unsubscribe at xymon.com
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20100722/89814b08/attachment.html>


More information about the Xymon mailing list