We are having problems with a directory disappearing and I was wondering if there is a way to monitor for the existence of a directory?
We are having problems with a directory disappearing and I was wondering if there is a way to monitor for the existence of a directory?
Hi Craig.
There's no agent for that specific function, but you could run a task from cron to check for the existence of this directory and drop the result into a log file:
[ ! -d "/etc/testdir" ] && echo "ERROR Directory /etc/testdir DOES NOT exists." >> /home/username/log.txt
Then just use a Log Monitor agent to check /home/username/log.txt for the word ERROR.
I hope that helps.
-Jesus
Hi Craig.
There's no agent for that specific function, but you could run a task from cron to check for the existence of this directory and drop the result into a log file:
[ ! -d "/etc/testdir" ] && echo "ERROR Directory /etc/testdir DOES NOT exists." >> /home/username/log.txt
Then just use a Log Monitor agent to check /home/username/log.txt for the word ERROR.
I hope that helps.
-Jesus