monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

File existence


From: Mike Dopheide
Subject: File existence
Date: Fri, 17 Mar 2006 12:47:47 -0600 (CST)

I've been banging my head against the wall for a couple days so I'm hoping 
someone can help me out.  I need to test for a file's existence in such a 
way that when it's state changes a command is run only one time.

I'm using monit 4.7 with this patch that allows for a 'check file' test to 
start if the file is missing:
http://lists.nongnu.org/archive/html/monit-general/2006-01/msg00020.html

I've tried a lot of things, but here's one example:
check file testfile with path /blaa/testfile
        start "my script"
        alert

If 'testfile' disappears it keeps trying to run the script over and over.  
Also, when the file reappears, it won't do anything.  However, 'alert' 
sends me one message in each case which is perfect.  Is it possible to 
substitute 'alert' with running a script?

Thanks,
Mike





reply via email to

[Prev in Thread] Current Thread [Next in Thread]