280 |
TESTING below) |
TESTING below) |
281 |
o A checksum error occurred (see also the section MD5 CHECKSUM |
o A checksum error occurred (see also the section MD5 CHECKSUM |
282 |
below) |
below) |
283 |
|
o A permission error occurred |
284 |
|
|
285 |
More than one alert statement can be used in a service entry. |
More than one alert statement can be used in a service entry. |
286 |
This means that you can send different emails to different |
This means that you can send different emails to different |
294 |
alert foo@bar |
alert foo@bar |
295 |
|
|
296 |
will send a default email alert to the address foo@bar whenever a |
will send a default email alert to the address foo@bar whenever a |
297 |
timeout, start, restart, checksum, resource, stop, connection, size |
timeout, start, restart, checksum, resource, stop, connection, size, |
298 |
or timestamp error occurs. |
permission or timestamp error occurs. |
299 |
|
|
300 |
If you only want an alert message sent when a certain event |
If you only want an alert message sent when a certain event |
301 |
occurs for example a timeout or when a service is restarted, |
occurs for example a timeout or when a service is restarted, |
318 |
email addresses like: |
email addresses like: |
319 |
|
|
320 |
alert foo@bar { restart, timeout, resource, connection } |
alert foo@bar { restart, timeout, resource, connection } |
321 |
alert security@bar on { checksum, stop } |
alert security@bar on { checksum, permission, stop } |
322 |
alert manager@bar |
alert manager@bar |
323 |
|
|
324 |
This will send an alert message to foo@bar whenever a restart, |
This will send an alert message to foo@bar whenever a restart, |
325 |
timeout, resource or connection error occurs and a message to |
timeout, resource or connection error occurs and a message to |
326 |
security@bar if a checksum or stop error occurs. And finally, a |
security@bar if a checksum, permission or stop error occurs. |
327 |
message to manager@bar whenever any error event occurs. |
And finally, a message to manager@bar whenever any error event |
328 |
|
occurs. |
329 |
|
|
330 |
The following alert-statement: |
The following alert-statement: |
331 |
|
|
332 |
alert foo@bar {stop |
alert foo@bar {checksum |
333 |
start |
connection |
334 |
restart |
permission |
|
timeout |
|
|
checksum |
|
335 |
resource |
resource |
336 |
timestamp |
restart |
337 |
|
start |
338 |
size |
size |
339 |
connection} |
stop |
340 |
|
timeout |
341 |
|
timestamp} |
342 |
|
|
343 |
is equivalent to: |
is equivalent to: |
344 |
|
|
345 |
alert foo@bar |
alert foo@bar |
346 |
|
|
347 |
which as stated above, will send a message whenever a timeout, a |
which as stated above, will send a message whenever a timeout, a |
348 |
start, restart, checksum, resource, stop, connection, size or |
start, restart, checksum, resource, stop, connection, size, |
349 |
timestamp error occurs. (If the postfix variant is used, then |
permission or timestamp error occurs. (If the postfix variant is |
350 |
note that the parenthesis are I<mandatory>). |
used, then note that the parenthesis are I<mandatory>). |
351 |
|
|
352 |
A start, stop or restart alert is also sent I<if monit fails to |
A start, stop or restart alert is also sent I<if monit fails to |
353 |
execute> a start or stop program for an entry. B<It is therefore |
execute> a start or stop program for an entry. B<It is therefore |
405 |
|
|
406 |
I<$EVENT> A string describing the event that occured. The values |
I<$EVENT> A string describing the event that occured. The values |
407 |
are fixed and are, "Started", "Stopped", "Restarted", Checksum |
are fixed and are, "Started", "Stopped", "Restarted", Checksum |
408 |
error", "Resource limit matched", "Timeout", "Size rule matched" |
error", "Resource limit matched", "Timeout", "Size rule matched", |
409 |
and "Timestamp rule matched". |
"Permission error" and "Timestamp rule matched". |
410 |
|
|
411 |
I<$SERVICE> The service entry name in monitrc (old form |
I<$SERVICE> The service entry name in monitrc (old form |
412 |
I<$PROGRAM> is supported too but not recommended). |
I<$PROGRAM> is supported too but not recommended). |
1075 |
permissions. |
permissions. |
1076 |
|
|
1077 |
In the case that permission test will fail, monit will call |
In the case that permission test will fail, monit will call |
1078 |
start/stop methods whenever defined if it is running in active |
stop method whenever defined if it is running in active |
1079 |
mode. In the case that it is running in passive mode or |
mode and sent alert. In the case that it is running in passive mode |
1080 |
start/stop methods are not defined, it will just send a failure |
or stop method is not defined, it will just send a failure |
1081 |
alert. |
alert. |
1082 |
|
|
1083 |
|
|