I don't think such a test
exists in monit, however, I think you could
create a fairly simple
test using the `find` command. Something like
this might work:
find
-type f -name "*.txt"
I think this is the relevant part of the
man page:
http://mmonit.com/monit/documentation/monit.html#program_status_testingSomething
like this *might* work (it's totally untested):
check program
txtfilecheck with path "/usr/bin/find /home/foo -type f
-name
'*.txt'"
if status != 0 then alert
Actually, that probably
won't work, because I find will exit with status
0 whether or not it
finds a file. However, you could wrap find in a
bash / sh script that
would return an exit code, or maybe there's an
option to change
find's exit status.
Anyway, I think that's the general idea of
what will work for you.
Cheers - Callum.