[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: proposed changes to the alert statement
From: |
Martin Pala |
Subject: |
Re: proposed changes to the alert statement |
Date: |
Fri, 12 May 2006 12:55:54 +0200 |
User-agent: |
Thunderbird 1.5.0.2 (Windows/20060308) |
It looks good at first sight, but i think that the current syntax
provides few advantages as well, mainly in more complicated cases, for
example:
--8<--
set alert address@hidden
check process p1 ...
start program ...
stop program ...
if failed <test1> then alert
if failed <test2> then alert
if failed <test3> then alert
if failed <test3> then restart
if 3 restarts within 5 cycles then timeout
alert address@hidden on {timeout}
alert address@hidden
check process p2 ...
--8<--
where:
- the global alert for address@hidden is set once and inherited by all
services (p1 and p2)
- the address@hidden alert is send just on timeout of p1 (it could be
complicated to join the syntax of statements like "timeout" with alert)
- in all cases the alert contact is set once. The proposed syntax can
lead to redundant definitions such as:
if failed <test1> then alert address@hidden, address@hidden
if failed <test2> then alert address@hidden, address@hidden
if failed <test3> then alert address@hidden, address@hidden
(when there are tens of services per server and many contact persons,
the configuration will be very verbose in such case)
- there are several implicit alerts which don't need to be defined - for
example in the case that the process is not running and monit performs
restart ("nonexistent" event). In the case of current syntax it is clear
were to send alert, in the case of new syntax it will be needed to add
another alert rule such as:
if non existent then alert address@hidden
Martin
Jan-Henrik Haukeland wrote:
I just browsed through the doc and saw these statements;
(1) if failed .. then alert
(2) alert address@hidden
It hit me that it would be more elegant to append the standalone alert
statement in (2) directly to alert in (1). That is,
if failed .. then alert address@hidden
In other words I suggest that we change the alert action statement to this,
ALERT address@hidden [,address@hidden, address@hidden
What do you think?