[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Alerr for non-existing directory not working
From: |
Thorsten Kampe |
Subject: |
Alerr for non-existing directory not working |
Date: |
Wed, 19 Jan 2011 13:02:38 +0100 |
User-agent: |
MicroPlanet-Gravity/3.0.4 |
Monit 5.2.3
Hi,
I want to be alerted when a directory (which is mounted via autofs and
smb/mount.cifs) does not exist anymore (meaning the smb mount is not
accessible for whatever reason).
The line in monitrc is
check directory remote-tkampe
path /mnt/smb/tkampe/data
Because there could be multiple reasons (on the remote side, on the
local side) I don't want to define any action (except alert, of course).
According to the documentation, this should be enough:
"[...] If the directory does not exist or disappeared, Monit will call
the entry's start method if defined [...] If [...] the start methods is
not defined, Monit will just send alerts on errors."
I stopped the server service on the remote host (stopping autofs daemon
would be the same) and get...
# file /mnt/smb/tkampe/data
/mnt/smb/tkampe/data: ERROR: cannot open `/mnt/smb/tkampe/data' (No such
file or directory)
...but no email is sent...!
The "Monit Service Manager" > Directory Status web page shows
Name remote-tkampe
Path /mnt/smb/tkampe/data
Status Does not exist
Monitoring mode active
Monitoring status monitored
Existence If doesn't exist 1 times within 1 cycle(s) then restart else
if succeeded 1 times within 1 cycle(s) then alert
It looks like the documentation and the "Existence" entry contradict
each other (bug?). Obviously I want "If doesn't exist [...] then alert
else if succeeded [...] then alert".
How can I achieve to be alerted when the directory does not exist/is not
accessible?!
Thorsten
- Alerr for non-existing directory not working,
Thorsten Kampe <=