Actually, you might want to investigate
the dnotify mechanism; this is the kind of thing that is perfect
for.
Linking into the dnotify subsystem, you can set it up
so that predefined events are automatically triggered as soon as
some filesystem condition is met (eg: new file appears).
There is a package for Debian that provides a command-line
environment for setting these up, but I can't remember offhand
what it is called.
On 07/24/2012 11:52 AM, Adam Wolfe wrote:
Is there
any way to use monit to check a directory's used space? I see
options for filesystem and individual files, but I need to monitor
a directory's size (should be 0B).
Or, failing that, I need to simply know when there are files in a
directory, then I use exec to place them on a server where
clients/devs can get to.
Anyone have any advice? I was using
"check filesystem with path /yada/yada
if space usage > 0 B
then alert
then exec"
and that seemed to work but a "monit status" perpetually shows a
failed check. It appears to be calculating the path leading up to
the dir I am watching.
Again, just need to know when a file or files appear in a specific
directory (that should always be empty) and then tun an exec.
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
|