[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [xymon] Hobbit-mailack
- To: xymon (at) xymon.com
- Subject: Re: [xymon] Hobbit-mailack
- From: Geoff Hallford <geoff.hallford (at) gmail.com>
- Date: Thu, 22 Jul 2010 13:53:32 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=mxJww3ntRF0RlhFKpecVj4v7QRT+pTCVjafioVtaSc4=; b=ltS7P23WeNm/LCKsUeyzdA6YIA+TwldYNvt/uwl33HFMaYc6SfJaam2JTzi9LyLZ4i hQqvTVqpGPdt5uHffUcuadwVIaBT1mQoVA5MOCVBt00WIJkDqUsnwZYpl9zJ3wTJHZPD 4ESRrMY05q68WxsbBJKIktNyjOXHKV2xwa5YY=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=YCaQcumkbPnQvMyq3kBS+Wp1dO5DkI9N8L9j9uLzjgqnsXfcildqkP7pVmITDVtMAn br80pB7RqGk19nrBO+OtNGoMG5P3hX5kiI0I+AaRpP0GSpb0D+i6ZEQUwe9V7JU/6M5T bAkqGSDCPsgK/F5cwd0uPujBlCfBIeVzDJ/7k=
- References: <AANLkTimhPmtfokvu-NbGbHiwpfK5e0e_J9kIwN1uttmM (at) mail.gmail.com> <AANLkTikIvrkHy0B1ZWD1P8Q3c-auWPpOWl9gCwP1zIWE (at) mail.gmail.com>
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
>
>
>