[Top][All Lists]

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

Re: [Q] Alert string

From: Jan-Henrik Haukeland
Subject: Re: [Q] Alert string
Date: 30 Apr 2003 20:19:20 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Civil Service)

I just got an email off-list from a Mike Long (a mailinglist digest
subscriber) where he says:

  [..] might it not be more intuitive to use backticks to mean command
  as in

  alert `/bin/program` on { checksum }

I like this suggestion and think it's a good idea. So unless anyone
disagree? .. to summarize: The syntax for executing an arbitary
program via an alert statement will be:

                       ALERT COMMAND [{events}]

where COMMAND is a string enclosed by backticks. An example:

 alert `/usr/bin/snpp -m "Monit: $EVENT for $PROGRAM on $HOST" rladams`

Where $EVENT, $PROGRAM, $DATE and $HOST can be used as variables in
the command string and will be expanded as usual/follows:

$EVENT A string describing the event that occured. The values are
fixed and are, ``restarted'', ``timed out'', ``stopped and ''checksum

$PROGRAM The program entry name in monitrc

$DATE The current time and date (C time style).

$HOST The name of the host monit is running on

Jan-Henrik Haukeland

reply via email to

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