[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Q] Alert string

From: Christian Hopp
Subject: Re: [Q] Alert string
Date: Wed, 30 Apr 2003 16:08:17 +0200 (CEST)

On Wed, 30 Apr 2003, Jan-Henrik Haukeland wrote:

> Does anyone use the alert statement with a single username instead of
> a full email address? Like "alert foobar" instead of "alert
> address@hidden" If the former is used monit adds the hostname to the
> username to compose a "real" email address, as shown in this excerpt
> from the parser:

Not me... but user who do not read the list might use it.

> alertmail       : ALERT MAILADDR { $<string>$= $2; }
>                 | ALERT STRING { $<string>$= append_hostname($2); }
> The problem is that I would like to use the ALERT STRING part to
> implement the notify program, like
>   alert "/bin/program" on { checksum }
> I do not think many know off and use this "alert username" feature and
> if I do not hear anything I'm planning on changing the semantics for
> the ALERT STRING statement to use it for executing an external
> program.

what about something like

  alert "/bin/program --foo @ALERT@ @SERVICE@ @REPORT@ --bar " on {
      checksum }

with @FOO@ being subsituted accordingly?


Christian Hopp                                email: address@hidden
Institut für Elektrische Informationstechnik             fon: +49-5323-72-2113
TU Clausthal, Leibnizstr. 28, 38678 Clausthal-Zellerf.   fax: +49-5323-72-3197

reply via email to

[Prev in Thread] Current Thread [Next in Thread]