monit-general
[Top][All Lists]
Advanced

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

check program reports exit codes that I can't recreate


From: Russell Simpkins
Subject: check program reports exit codes that I can't recreate
Date: Fri, 31 Oct 2014 13:15:13 -0400

I have a check:

check program foo with path "/usr/bin/check.sh 7005" with timeout 3 seconds
  if start != 0 then
  start with program "/etc/init.d/myservice" with timeout 10 seconds

My script will either exit with a zero or a one. Monit runs as root. I'm running monit 5.8 Sometimes monit reports error codes that I can't recreate e.g.

Oct 15 13:56:36 ip-10-45-179-177 monit[655]: 'foo' 'check.sh' failed with exit status (9) -- no output from program

I can't figure out why monit gets an exit status that I can't recreate. I've changed my check to be

if start == 1 then

That seems to have fixed my problem. I also tried the following in my bash script:

set -e

Thinking that maybe one of my steps was failing, but I can never recreate any other exit code besides 0 when running it by hand. Is this something fixed in 5.9? 

Thanks,

Russ

reply via email to

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