monit-general
[Top][All Lists]
Advanced

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

Re: monitoring network filesystem


From: Martin Pala
Subject: Re: monitoring network filesystem
Date: Fri, 9 Jul 2010 17:42:21 +0200

Hi Aleksander,

the feature is implemented in next Monit version (5.2), it allows to override 
default alert action when the monitored object doesn't exist. Syntax is as 
follows:

    check file with path /path/to/netfs/lost+found
       if failed existence for 5 cycles then exec "/path/to/scripts/mount.sh"


You can get the development version from svn:
http://code.google.com/p/monit/source/checkout

Regards,
Martin



On Jul 8, 2010, at 1:56 PM, Aleksander Kamenik wrote:

> Hi,
> 
> I'm trying to monitor a networked filesystem, smbfs/cifs in this case.
> 
> The problem is not only that the filesystem unmounts or something during 
> operation, which I can monitor with fsflags. But that sometimes after doing 
> maintenance and booting the system the net filesystem does not come up; due 
> to network maintenance for example. Yes, I should always check manually, but 
> I have monit for a reason :).
> 
> I'd like to get a message and see that in m/monit.
> 
> At the same time, it should try to mount it too.
> 
> fsflags only monitors changes, so if monit starts with the flag being set to 
> zero, it will be OK for monit.
> 
> I tried monitoring a file on the mounted filesystem, however to get an exec 
> statement I had to do a test for a checksum. When the file does not exist, at 
> least a checksum if-then-exec does not execute the script that would mount 
> the volume.
> 
> 
> Something like this would be perfect (I don't care about content, so the 
> lost+found folder is a great choice in my case):
> 
> check folder lost+found path /path/to/netfs/lost+found
> if does not exist then exec "/path/to/scripts/mount.sh"
> 
> or alternatively
> 
> check device netfs path /path/to/netfs
> if fsflag != 0x7 then exec "/path/to/scripts/mount.sh"
> 
> Neither is possible or have I missed something about file checking?
> 
> Regards,
> 
> 
> Aleksander Kamenik
> System Administrator
> Krediidiinfo AS
> an Experian Company
> Phone: +372 665 9649
> Email: address@hidden
> 
> http://www.krediidiinfo.ee/
> http://www.experiangroup.com/
> 
> 
> 
> 
> --
> To unsubscribe:
> http://lists.nongnu.org/mailman/listinfo/monit-general




reply via email to

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