[Top][All Lists]

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

Re: monitoring a directory's used space

From: David Breakey
Subject: Re: monitoring a directory's used space
Date: Tue, 24 Jul 2012 12:27:10 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0

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:

reply via email to

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