[hobbit] using hobbit to monitor the number of files
Dean Casey
dcasey at pathfire.com
Tue Feb 6 15:51:21 CET 2007
Should be simple enough to write a shell script for that.
$variable=`ls <directory name> | wc -l` will work on Solaris and
RedHat. Just get the value of $variable.
Dean Casey
________________________________
From: Dan Simoes [mailto:dan.simoes at gmail.com]
Sent: Friday, February 02, 2007 6:17 PM
To: hobbit at hswn.dk
Subject: [hobbit] using hobbit to monitor the number of files
Say, in a mail or print spool. I know hobbit can check the age or
existence of a file, but how about the number of files in a dir?
I'm sure it's trivial to do, but I haven't run across this yet, so
before I reinvent the wheel, I thought I'd ask.
I would like hobbit to report on the number of files in a given
location, and then generate an alert if it's above the warning or fatal
levels.
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20070206/a3044551/attachment.html>
More information about the Xymon
mailing list