Payal Rathod wrote:

> On Sun, Apr 11, 2004 at 11:00:27AM -0400, Jesse Guardiani wrote:
>> have to load the sig database for each scan), and if you set it up with
>> daemontools and Monit then you can quickly recover from problems when/if
>> clamd hangs or crashes.
> 
> Can you please tell me how to use it with monit (or daemontools)?
> My monitrc file
> 
> check process clamd
> with pidfile "/var/run/clamd.pid"
> start program "/usr/local/sbin/clamd
> 
> does not seem to work. It is generating mails every 120 seconds (set
> daemon 120).

Sure. Here's mine:

--------------------------------------------------------------------
set daemon 60
set logfile syslog facility log_daemon
set alert [EMAIL PROTECTED]
set mailserver localhost, agape.wingnet.net, lego.flatratecalling.biz
     with timeout 15 seconds

check process clamd with pidfile /var/spool/qmailscan/clamd.pid
    start program = "/usr/local/bin/clamdctl start"
    stop program  = "/usr/bin/killall -9 clamd"

    if failed unixsocket /tmp/clamd
        send "VERSION\r\n"
        expect "clamd / ClamAV.*"
    then restart

    if memory is greater than 30% then restart
    if loadavg(1min) is greater than 10.0 then restart
    alert [EMAIL PROTECTED]
--------------------------------------------------------------------

The unixsocket test insures that Monit will properly restart clamd 
even if clamd is HUNG, instead of just crashed. Be sure to change
the two alert statements to YOUR email address.

-- 
Jesse Guardiani, Systems Administrator
WingNET Internet Services,
P.O. Box 2605 // Cleveland, TN 37320-2605
423-559-LINK (v)  423-559-5145 (f)
http://www.wingnet.net




-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Qmail-scanner-general mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/qmail-scanner-general

Reply via email to