[Top][All Lists]

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

Monitoring one of two files?

From: Josh Kelley
Subject: Monitoring one of two files?
Date: Thu, 22 Feb 2007 17:10:37 -0500

ClamAV 0.90, from what I can tell, stores its daily updates in one of
two ways: as a single file, /var/lib/clamav/daily.cvd, or as several
files under /var/lib/clamav/

How can I instruct Monit to check for both of those files and only
complain if both are missing?  At first I thought that it might work
to do something similar to the following:

check file clamav_daily_cvd with path /var/lib/clamav/daily.cvd
  if failed then exec "/bin/bash -c '/usr/bin/monit unmonitor
clamav_daily_cvd; /usr/bin/monit monitor clamav_daily_inc'"

check file clamav_daily_inc with path /var/lib/clamav/
  if failed then exec "/bin/bash -c '/usr/bin/monit unmonitor
clamav_daily_inc; /usr/bin/monit monitor clamav_daily_cvd'"

However, I can't find any way to define a custom exec action if the
file doesn't exist at all, as opposed to existing but failing
UID/GID/checksum/etc. checks.

Any suggestions?

Josh Kelley

reply via email to

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