Xymon Mailing List Archive search

Monitoring empty directory

2 messages in this thread

list Bert Willekens · Tue, 1 Mar 2016 09:19:39 +0000 ·
Hi

When I monitor a directory for file size I get " Could not determine size of directory" when it's empty.
For me it's no problem that the directory is empty, I just want to TRACK the size of the directory.
The directory is being cleaned automatically so I can't place a 1 KiB file there.

How can I prevent the test from turning yellow?

The configuration is as follows:

++ client-local.cfg
[server.example.com]
DIR:I:\watchfolder

++ analysis.cfg
HOST=server.example.com
DIR I:\watchfolder TRACK

++ client data
[dir:I:\watchfolder]
0       I:\watchfolder

++ files test
&yellow I:\watchfolder
Could not determine size of directory I:\watchfolder

Thanks

--
Bert
MEDIALAAN Disclaimer<http://medialaan.be/email>;
list Japheth Cleaver · Wed, 2 Mar 2016 08:45:01 -0800 ·
quoted from Bert Willekens
On Tue, March 1, 2016 1:19 am, Bert Willekens wrote:
Hi

When I monitor a directory for file size I get " Could not determine size
of directory" when it's empty.
For me it's no problem that the directory is empty, I just want to TRACK
the size of the directory.
The directory is being cleaned automatically so I can't place a 1 KiB file
there.

How can I prevent the test from turning yellow?

The configuration is as follows:

++ client-local.cfg
[server.example.com]
DIR:I:\watchfolder

++ analysis.cfg
HOST=server.example.com
DIR I:\watchfolder TRACK

++ client data
[dir:I:\watchfolder]
0       I:\watchfolder

++ files test
&yellow I:\watchfolder
Could not determine size of directory I:\watchfolder

Thanks

Hi Bret,

Indeed, this is a bug. "0" sized directories (rare on the unix side, since
you'll have dir entries) are flagged as errors.

The following patch should fix it.


HTH,

-jc