monit-general
[Top][All Lists]
Advanced

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

Alert mail with custom content


From: Julian Berkner
Subject: Alert mail with custom content
Date: Thu, 18 Nov 2010 15:31:19 +0100

Hello everybody,

currently i'm trying to do the following:
If my system goes busy, monit should send me an email.
After reading the documentation i used 'loadavg' and 'memory usage' and
emails started to fly around.

But, these emails to not fulfill what i expected them to, i do not want
to be simply alerted, i want some details in that email.

So i created a script "processlist.sh", that will check top and some
other information sources in order to determine where all
my ram and cpu is going. (This script is going to be implemented on a
webserver and is supposed to find out what apache thread is
currently making the system unstable.)

Is there any possibility to send the scripts output via email? 
I tried the following: (mention the backquotes)




set mail-format {            
      Description: $DESCRIPTION 
        `/home/julian/Dokumente/processlist.sh m`            
}
set alert address@hidden                       
set httpd port 2812 and
    use address localhost 
    allow admin:monit
check system localhost
    if loadavg (1min) > 1 then alert
    if memory usage > 75% then alert



Is it possible to make monit execute my script and send me the result?
I even thought of simply calling a script that will handle the
processing and emailing of my processlist.sh .

What way should be preferred?
-- 
Kind regards,
Julian





reply via email to

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