0

I need a bit of help figuring something out. First off, I'm not very well versed with FreeBSD servers, etc. but with some direction hopefully I can get this fixed.

I'm using FreeBSD and installed Monit so I could monitor some of the processes that run tomcat, apache, mysql, sendmail, clamav. So far, I'm only successful in getting apache & mysql to be monitored.

I'm getting this error for clamav in the log file for /var/log/monit.log

'clamavd' failed, cannot open a connection to UNIX[/usr/local/etc/rc.d/clamav-clamd]

My config file for clamav in /etc/monitrc is:

####################################################################
# CLAMAV Virus Checks
####################################################################
check process clamavd with pidfile /var/run/clamav/clamd.pid
group virus
start program = "/usr/local/etc/rc.d/clamav-clamd start"
stop program = "/usr/local/etc/rc.d/clamav-clamd stop"
if failed unixsocket /usr/local/etc/rc.d/clamav-clamd then restart
if 5 restarts within 5 cycles then timeout

Honestly, I really don't know much of what's going on here. My host who helped me get the box set up basically installed clamav, but doesn't offer this kind of detail in supporting me, so I'm left to figure this stuff out on my own as I own the box, but they provide the isp service.

Is there anyone who can help me troubleshoot this? Thanks for your help in advance.

Aliaksandr Belik
  • 259
  • 6
  • 17
Ronedog
  • 135
  • 3
  • 6

1 Answers1

0

Sounds like clam isn't running. Try running grep clamav /etc/rc.conf and see if it's enabled. If not run:

echo clamav_clamd_enable="YES" >> /etc/rc.conf
echo clamav_freshclam_enable="YES" >> /etc/rc.conf
/usr/local/etc/rc.d/clamav-clamd start

If it's already enabled, check dmesg for errors, or try just running clamavd and see if it spits anything out.

It's also possible that Clam was installed to run in a non-standard way, and Monit would need to be tailored to that configuration.

Chris S
  • 77,337
  • 11
  • 120
  • 212