[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Changing `mail-format` for Multiple Recipients
From: |
Martin Pala |
Subject: |
Re: Changing `mail-format` for Multiple Recipients |
Date: |
Wed, 10 Sep 2014 10:15:18 +0200 |
Hello,
you can override the mail format using single "set mail-format" statement
(outside of any service check context):
--8<--
set mail-format {
message: $DESCRIPTION
The service is currently down. Please restart the application pool.
Your faithful employee,
Monit
}
--8<--
Similarly it's not necessary to duplicate list of recipients in each service
check, just use "set alert ...":
--8<--
set alert address@hidden
--8<--
Regards,
Martin
On 10 Sep 2014, at 09:50, David Aaron Fendley <address@hidden> wrote:
> I want to notify multiple email addresses with a custom mail-format on a
> certain condition. The only way I have been able to do so is with:
>
> ---
>
> check host example.com with address example.com
> if failed port 80 protocol HTTP
> request "/"
> with timeout 7 seconds
> then alert
> alert address@hidden with mail-format {
> message: $DESCRIPTION
>
> The service is currently down. Please restart the application pool.
>
> Your faithful employee,
> Monit
> }
> alert address@hidden with mail-format {
> message: $DESCRIPTION
>
> The service is currently down. Please restart the application pool.
>
> Your faithful employee,
> Monit
> }
> alert address@hidden with mail-format {
> message: $DESCRIPTION
>
> The service is currently down. Please restart the application pool.
>
> Your faithful employee,
> Monit
> }
> alert address@hidden with mail-format {
> message: $DESCRIPTION
>
> The service is currently down. Please restart the application pool.
>
> Your faithful employee,
> Monit
> }
>
> —
>
> Must I duplicate `mail-format` each time? Note that I want to keep the
> default `mail-format` for other notifications. I only want to modify it for
> this specific check.
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general