[Top][All Lists]

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

Re: alert mail config

From: Martin Pala
Subject: Re: alert mail config
Date: Mon, 24 Oct 2011 20:18:11 +0200


the mailformat option cannot be used as the action option (i.e. not as extension of "… then alert"), but you can use it in the alert contact settings:

    alert address@hidden with mail-format …

You can also set it globally using the "set mail-format" statement.

You can also alert via http (indirectly) - using the "exec" action to execute your custom script.


On Oct 3, 2011, at 4:41 PM, Mark Olliver wrote:

Hi All,
I have the check below but it would seem monit does not like the second line. Ideally I would like message part to be the same for all the alerts for this check but email address to be different. Is there a way to do this.
check device datafs with path /
    if space usage > 94% for 10 times then alert address@hidden if succeeded for 5 times then alert address@hidden with mail-format{ subject: $SERVICE at $DATE, message: Monit has detected an issue on $HOST @$DATE $DISCRIPTION; the current status is $STATUS}
    if space usage > 96% for 8 times then alert else if succeeded for 2 times then alert
    if space usage > 98% then alert else if succeeded for 2 times then alert
    if space usage > 99% then alert
    group system
My plan is to use pagerduty to ensure correct routing of the message, it would be even better if I could dispatch the alert via the http api but I am not sure that is possible with monit?
Any help gratefully appreciated.,
To unsubscribe:

reply via email to

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