|
From: | Martin Pala |
Subject: | Re: [Monit]script and exec is not running from monitrc |
Date: | Fri, 6 Nov 2009 20:15:31 +0100 |
Hi,you can run Monit in verbose mode (-v option) to get details for testing. The "if changed pid" test is triggered when the process PID has changed outside of Monit's control (i.e. process restarted between two monitoring cycles).
If the condition was true and exec was called, it is possible that the script did nothing because of environment variables dependency - Monit sets only spartan PATH variable and drops all other variables (for security reasons). If your script doesn't use absolute paths or expects some environment variable, it may fail - you'll need to set the environment inside this script. See here for more details:
http://mmonit.com/wiki/Monit/FAQ#execution Martin On Nov 6, 2009, at 5:19 AM, Neelam Baliyan wrote:
Hi i have configure monit in monitrc like below check process monit with pidfile /var/run/monit.pid if changed pid then exec "/home/oam/Neelam/ test.sh" but this script is not running...I have putted a another check to check permission but problem is same,myexec is not running when check got fail. check file Test_monit_conf.ini with path /home/oam/Neelam/Test_monit_conf.ini if failed permission 777 within 5 cycles then exec "/home/oam/Neelam/Test_monit Test_monit" Pls help me. Thanks Neelam -- View this message in context: http://old.nabble.com/-Monit-script-and-exec-is-not-running-from-monitrc-tp26208593p26208593.html Sent from the monit-general mailing list archive at Nabble.com. -- To unsubscribe: http://lists.nongnu.org/mailman/listinfo/monit-general
[Prev in Thread] | Current Thread | [Next in Thread] |