monit-dev
[Top][All Lists]
Advanced

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

file/directory/device services


From: Jan-Henrik Haukeland
Subject: file/directory/device services
Date: Wed, 06 Aug 2003 03:28:07 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Civil Service, linux)

I have started to test this a bit more now. And one thing I react to
is that there is a start/stop program defined for such a service. I'm
not sure what I shall think about that :-) Well I can see that it may
be useful, but it also looks very strange.


I use this test entry:

check file monitlog with path /home/hauk/monitlog
   if timestamp /home/hauk/monitlog was changed then stop
   alert address@hidden


I tested now by removing the file and monit sent a restart event for
the file:

        From: address@hidden
        Subject: monit alert --  Restarted monitlog
        To: address@hidden
        Date: Wed, 06 Aug 2003 02:57:41 +0200
        
        Restarted Service monitlog 
        
        Date: Wed, 06 Aug 2003 02:57:41 +0200
        Host: 9muf0e
        
        Your faithful employee,
        monit
        
        Event: file 'monitlog' doesn't exist

I'm not sure this behaviour is appropriate for this service? 

I may be wrong but I was thinking more along the lines that a
file/device/dir. check is kind of binary at least at the fundamental
level. That is; either it exist or it doesn't and if it doesn't it is
an error. So instead of using start/stop maybe the following entry
example looks more logical?

check file monitlog with path /home/hauk/monitlog
   if not exist then exec "<program>
   if timestamp /home/hauk/monitlog was changed then stop
   alert address@hidden

But on the other hand if the service is a device it *is* meaningful to
have start/stop programs:

check device hda with path /dev/hda5
  start "mount /dev/hda5 /usr/local/"
  stop  "umount /usr/local/"
  if not exist then alert
  alert address@hidden


Well, I'm not sure :-) maybe start/stop is good? What are your
thoughts Martin? 

-- 
Jan-Henrik Haukeland




reply via email to

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