[Top][All Lists]

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

Re: Completely overwrite alert with exec script

From: Guillaume François
Subject: Re: Completely overwrite alert with exec script
Date: Thu, 7 Jan 2016 14:33:28 +0100


We are using something like this in each rule.

if status != 0 for 2 cycles then exec "/var/lib/monit/scripts/ echo 1" else if succeeded then exec "/var/lib/monit/scripts/"

Script need exec permission for root user.

We are not aware of a way to put it globally.

Best Regards

2016-01-07 14:11 GMT+01:00 Matt J Davies <address@hidden>:
Hello everyone


I’ve got roughly 30 Ubuntu servers.  We’ve been using monit for some time, but now our SMTP server is starting to go down the pan, and we’re not getting alerts from our servers for sometimes up to 15 minutes after the event, which is pretty pointless sometimes as we start getting errors from other systems before the monit emails arrive.

So, what I’d like to accomplish is to remove the alert function, or replace the alert function with exec /path/to/myscript.rb.

myscript.rb is going push the messages in the first instance to slack, so we get them in real time.

The first server I’m trying this out on is a bit old though.

monit 5.0.3
Ubuntu 10.04.4 LTS

Whats the easiest way to accomplish this/Is it possible?

Thanks in advance

Matt Davies

To unsubscribe:

Version: 3.1
GCS/IT d(+) s++:- a C++$ ULC(+)>+++$ !P--- L+>$ !E---? W+++$ !N* !o-- K--? w(+) !O---? !M- !V--? PS+? !PE Y+ PGP++>+++ !t-- !5 !X- R(+)>++* tv-? b(-) DI !D- G(+)>+ e+++ h--() r->$ y?*

reply via email to

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