Sure?
It isn't working for me.
I am using :
This is monit version 5.0_beta4
check file TEST
with path /home/TEST/nginx/TESTFILE
start program = "/usr/local/nothing.sh"
if changed checksum
then exec "/usr/local/testconfig.sh"
Its erroring out with:
:5: Error: cannot compute a checksum for file /home/TEST/nginx/TESTFILE 'TEST'
I want it to run nothing.sh if the file doesn't exist, but if it does
exist, to continue monitoring it with checksum changes.
But it isn't working here , should it, or am I missing something here?
Joe
On Fri, Nov 14, 2008 at 11:50 AM, Martin Pala <address@hidden> wrote:
The limitation where Monit required monitored file to exist on Monit start
was removed in upcoming Monit 5.0, you can get the last beta here (note that
the beta is production stable):
http://mmonit.com/monit/dist/beta/
If the file doesn't exist, Monit executes automatically the start program =>
everything you need to do is define the start program like this:
check file with path /home/thisfile.txt
start program = "/path/to/my/script"
Martin
On Nov 14, 2008, at 1:37 AM, Joe Shang wrote:
I want to enable in monit, to check for a file, like
check file with path /home/thisfile.txt
And I want if the file does not exist to execute a script for me... etc.
Though what happens is monit doesn't even start cause that file does
not exist, how can get over this? are there different parameters?
Because I have other arguments that if file does exist, to check for
changed checksum, and if changed to run a certain script.
But what is most important to me, is to check if the file exist, and
if not.. well execute something.
--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general
--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general
--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general