[Top][All Lists]

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

Re: [monit] "if changed checksum then exec" not working

From: Martin Pala
Subject: Re: [monit] "if changed checksum then exec" not working
Date: Sat, 15 Nov 2008 21:18:09 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20080829 Iceape/1.1.12 (Debian-1.1.12-1)

The /usr/local/ most probably is executed but it most probably didn't succeeded.

You can run monit with the -v option to see the tests progress and actions.

The problem could be more likely the environment variables ... monit sets spartan environment for the executed programs, so the script may be missing some variables.

FAQ.txt excerpt:

6. Q: I'm having trouble getting monit to execute any "start" or
      "stop" program commands.  The log file says that they're being
      executed, and I can't find anything wrong when I run monit in
      verbose mode.

   A: Monit did start the program but for some reason the service dies
      later. Before we go on and introduce you to the fine art of
      system debugging, it's worth to note that:

      For security reasons monit purges the environment and only set a
      spartan PATH variable that contains /bin, /usr/bin, /sbin and
      /usr/sbin. If your program or script dies, the reason could be
      that it expects certain environment variables or to find certain
      programs via the PATH. If this is the case you should set the
      environment variables you need directly in the start or stop
      script called by monit.

Joe Shang wrote:
I  have 5.0_beta4 , and using:

check file httpd.conf
       with path /usr/local/apache/conf/httpd.conf
       if changed checksum
               then exec "/usr/local/"

It does detect the change in "monit status" when there is a change ,
but it does not execute.

If I run:


It does THEN execute what I wanted to execute with the above
parameters. My script has proper execution permissions, and it can
properly run as root.

Is this a bug on monit, or am I missing something in my config?

Pulling my hair abit on this one, I hope its a bug.


To unsubscribe:

reply via email to

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