check filesystem datafs with path /dev/drbd0
    if space usage > 50% for 5 times within 15 cycles then alert
    if space usage > 80% for 5 times within 15 cycles then alert
    if inode usage > 50% for 5 times within 15 cycles then alert
    if inode usage > 95% for 5 times within 15 cycles then alert
    group server

check process dbmail-imapd with pidfile /var/run/dbmail/dbmail-imapd.pid
    group dbmail
    start program = "/etc/init.d/dbmail imapd start"
    stop  program = "/etc/init.d/dbmail imapd stop"
if failed port 143 protocol imap with timeout 2 seconds within 2 cycles then restart if failed port 993 type TCPSSL protocol imap with timeout 15 seconds within 3 cycles then restart
    if memory > 1024 MB for 3 cycles then alert
    if memory > 1524 MB for 3 cycles then restart
    if cpu > 80% for 5 cycles then alert
    if cpu > 80% for 15 cycles then restart

check process dbmail-lmtpd with pidfile /var/run/dbmail/dbmail-lmtpd.pid
    group dbmail
    start program = "/etc/init.d/dbmail lmtpd start"
    stop  program = "/etc/init.d/dbmail lmtpd stop"
if failed host 172.22.14.195 port 24000 protocol lmtp with timeout 15 seconds within 3 cycles then restart
    if 3 restarts within 5 cycles then timeout
    if totalmemory > 1024 MB for 3 cycles then restart
    if cpu > 80% for 5 cycles then alert

check process dbmail-pop3d with pidfile /var/run/dbmail/dbmail-pop3d.pid
    group dbmail
    start program = "/etc/init.d/dbmail pop3d start"
    stop  program = "/etc/init.d/dbmail pop3d stop"
if failed port 110 protocol pop with timeout 15 seconds within 3 cycles then restart
    if 3 restarts within 5 cycles then timeout
if failed port 995 type TCPSSL protocol pop with timeout 15 seconds within 3 cycles then restart
    if 3 restarts within 5 cycles then timeout
    if totalmemory > 1024 MB for 3 cycles then restart
    if cpu > 80% for 5 cycles then alert

check system $HOST
    if loadavg (1min) > 4 then alert
    if loadavg (5min) > 2 then alert
    if memory usage > 95% then alert
    if swap usage > 25% then alert
    if cpu usage (user) > 70% then alert
    if cpu usage (system) > 70% then alert
    if cpu usage (wait) > 70% then alert


---

I modified the default init script so I can start stop each daemon separate (not a good idea to kill all pop3 connections if imap unresponsive)

I don't know if you could use restart, but I see no reason why to use the restart parameter, because if dbmail dies monit uses the start command to start it. (replaces startup script if you like)





Am 14.10.2013, 21:26 Uhr, schrieb Jorge Bastos <[email protected]>:

check process dbmail-imapd with pidfile /var/run/dbmail/dbmail-
imapd.pid
     group dbmail
     start program = "/etc/init.d/dbmail imapd start"
     stop  program = "/etc/init.d/dbmail imapd stop"
     if failed port 143 protocol imap with timeout 2  seconds within 2
cycles then restart
     if failed port 993 type TCPSSL protocol imap with timeout 15
seconds within 3 cycles then restart
     if memory > 1024 MB for 3 cycles then alert
     if memory > 1524 MB for 3 cycles then restart
     if cpu > 80% for 5 cycles then alert
     if cpu > 80% for 15 cycles then restart


I wonder if it's possible to use instead restart, "stop" only ? do you know
if?

_______________________________________________
DBmail mailing list
[email protected]
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


--
Harald Leithner

ITronic
Wiedner Hauptstraße 120-124/5.1, 1050 Wien, Austria
Tel: +43-1-545 0 604
Fax: +43-1-786 23 88 26
Mobil: +43-699-123 78 4 78
Mail: [email protected] | itronic.at

Attachment: dbmail.init-script
Description: Binary data

_______________________________________________
DBmail mailing list
[email protected]
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail

Reply via email to