monit-dev
[Top][All Lists]
Advanced

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

Re: Exec implemented!


From: Martin Pala
Subject: Re: Exec implemented!
Date: Wed, 23 Jul 2003 11:48:08 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030711

Jan-Henrik Haukeland wrote:

Martin Pala <address@hidden> writes:

Control language clean-up is possible, e.g. allow all "file" related
tests (like 'checksum', 'timestamp', etc.) in just "file" service
type. These test then could be simplified - the 'path' part could be
removed, because the path will be specified in 'file service'
definition. For example replace :

  checksum /usr/local/apache/bin/httpd and expect the sum
  8f7f419955cefa0b33a2ba316cba3659

with

  checksum and expect the sum 8f7f419955cefa0b33a2ba316cba3659


More complex example:

---
check process apache with path /usr/local/apache/logs/httpd.pid
  start program = "/etc/init.d/httpd start"
  stop program = "/etc/init.d/httpd stop"
  depends on apache_rc
  depends on apache_binary
  depends on apache_conf
  ...

check file apache_rc with path /etc/init.d/httpd
  checksum and expect the sum 1a6d429254cafa8b34c2bb317cba2118
  if timestamp changed the alert
  perm 755 # just example

check file apache_binary with path /usr/local/apache/bin/httpd
  checksum and expect the sum 8f7f419955cefa0b33a2ba316cba3659
  if timestamp changed the alert
  perm 755 # just example

check file apache_conf with path /etc/httpd/conf/httpd.conf
  if timestamp changed the reload
  size < 10 MB
  perm 755 # just example
---

This looks very nice, but..

If any of these files is removed, action is taken by monit.

Though such configuration is clean, logical and object oriented, i
think it is probably usefull to have present shortcut and allow to
define file related test in other service types as well.

the checksum test should be kept for process-services because it's
directly connected to the process in that a process is not checked
anymore by monit if any of its programs was changed. BTW, I haven't
tested the above configuration, will it actually work with the current
monit? If so, it's cooool :)

I will test it (i tested file and other service types for such configuration during implementation => it should work in present version).

Martin





reply via email to

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