monit-general
[Top][All Lists]
Advanced

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

Re: Monit alert execute script


From: Martin Pala
Subject: Re: Monit alert execute script
Date: Thu, 6 Dec 2012 17:05:36 +0100

Such setup is not supported by current Monit version directly - M/Monit can execute custom script on event.

For example run the text-to-speech program for the event:





On Dec 6, 2012, at 4:55 PM, Poffet Gaël <address@hidden> wrote:

I's a workaround but not so clean...
What would be nice is to have the possibly to do something like:

set mailserver localhost
set mail-format { from: address@hidden
subject: $SERVICE $EVENT at $DATE
message: Monit $ACTION $SERVICE at $DATE on $HOST: $DESCRIPTION.
}
set alert address@hidden
set alert "/the/path/to/my/shell 'Monit $ACTION $SERVICE at $DATE on $HOST'"

Hope this will be possible in future release...

G



-----Original Message-----
From: address@hidden [mailto:monit-address@hidden] On Behalf Of Martin Pala
Sent: Thursday, 06 December 2012 16:49
To: This is the general mailing list for monit
Subject: Re: Monit alert execute script

Yes, the exec action is per test - there is no support for global exec action.

The alert is implicit as mentioned - if you replace "... then alert" with "... then exec ..."  it should still send the alert.

Regards,
Martin


On Dec 6, 2012, at 4:45 PM, Poffet Gaël <address@hidden> wrote:

Hello,
Thanks for your email. I have seen this possibilities but there some limitation:

- It must be defined for each monitoring configuration
- When we use exec we replace the default alert so we don't receive the emails anymore.

Any idea ?
Gael



-----Original Message-----
From: address@hidden [mailto:monit-address@hidden] On Behalf Of Martin Pala
Sent: Thursday, 06 December 2012 16:42
To: This is the general mailing list for monit
Subject: Re: Monit alert execute script

Hello,

you can use the exec action:

--8<--
check file httpd.conf path /usr/local/apache/conf/httpd.conf
   if changed checksum then exec "/usr/local/apache/bin/apachectl graceful"
--8<--

The alert is implicit (sent along then exec)

Regards,
Martin


On Dec 6, 2012, at 4:37 PM, Poffet Gaël <address@hidden> wrote:

Hello,
My monit installation works well. Now I would like to go a bit further.
I need to have monit, in addition of sending email, to execute a local shell script. Is it possible to do that ?
I didn't found any exemple on the net. Thanks in advance Gael
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general


reply via email to

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