[Top][All Lists]

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

Re: [Q] Alert string

From: Rory Toma
Subject: Re: [Q] Alert string
Date: Wed, 30 Apr 2003 20:28:08 -0000

I like this too. As a matter of fact, it sort of makes adding snmp trap
support redundant... you can just call snmptrap from the alert line.

On Wed, 2003-04-30 at 11:19, Jan-Henrik Haukeland wrote:
> 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
> error``
> $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
Rory Toma               address@hidden
VP of Run Level 9
Digeo Digital 

Attachment: signature.asc
Description: This is a digitally signed message part

reply via email to

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