[Top][All Lists]

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

monitoring network filesystem

From: Aleksander Kamenik
Subject: monitoring network filesystem
Date: Thu, 8 Jul 2010 14:56:01 +0300


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 

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/"

or alternatively

check device netfs path /path/to/netfs
  if fsflag != 0x7 then exec "/path/to/scripts/"

Neither is possible or have I missed something about file checking?


Aleksander Kamenik
System Administrator
Krediidiinfo AS
an Experian Company
Phone: +372 665 9649
Email: address@hidden

reply via email to

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