|
From: | Gokulnath Arjunan |
Subject: | RE: Monit remote servers custom process |
Date: | Thu, 31 Jul 2014 14:13:12 +0530 |
Hi, I have setup monit with check_program. I am running monit on
local server and monit check the program at regular intervel. it is stopping the
tomcat server if thread count is more than my threshold but not starting
the tomcat server back. Getting below log in monit.log. Please suggest
what I am missing here. [UTC Jul 31 08:14:59] error : 'ThreadCount'
'/data/scripts/jmx.sh' failed with exit status (35) -- no output from program [UTC Jul 31 08:14:59] info :
'ThreadCount' trying to restart [UTC Jul 31 08:14:59] info :
'ThreadCount' stop: /opt/tomcat-9620/bin/shutdown.sh [UTC Jul 31 08:14:59] info :
'ThreadCount' start: /opt/tomcat-9620/bin/startup.sh Monit configuration: check program ThreadCount with path
"/data/scripts/jmx.sh" start program = "/opt/tomcat/bin/startup.sh" stop program = "/opt/tomcat/bin/shutdown.sh" if status > 35 then restart jmx.sh #!/bin/bash TC=`/usr/local/nagios/libexec/check_jmx -U
service:jmx:rmi:///jndi/rmi://localhost:9652/jmxrmi -O java.lang:type=Threading
-A ThreadCount | cut -d '=' -f2 | cut -d '|' -f1` if [ $TC -gt 35 ] then exit $TC else exit $TC fi Thanks Gokul From:
address@hidden
[mailto:address@hidden On Behalf
Of Hearns, John
|
[Prev in Thread] | Current Thread | [Next in Thread] |