Configuring Monit for Tomcat

  • Which version of the application are you using?:
    Tomcat 8 from Bitnami

  • **Please choose how you got the application:
    GCE

  • Have you installed any plugin or modified any configuration file?:
    No

Like to configure the Monit component present in the Bitnami to watch and start Tomcat if not running. Prepared below script. Is it correct.

File Location : /opt/bitnami/config/monit/conf.d/tomcat.conf

check process tomcat
  with pidfile "/opt/bitnami/apache-tomcat/temp/catalina.pid"
  start program = "/opt/bitnami/apache-tomcat/scripts/ctl.sh start" with timeout 300 seconds
  stop program = "/opt/bitnami/apache2/apache-tomcat/ctl.sh stop" with timeout 300 seconds

Is there anything else required to be configure in the VM apart from this file ? After configuring the file is it required to do any Post process ?

Hi @arvindwill

That configuration should be enough to have monit looking for the Tomcat process since in the bitnami.conf inside the monit folder it has configured all the files inside the conf.d folder.

I added that file and I got monit checking tomcat after executing:

sudo monit reload

You can see if monit is checking for tomcat executing:

sudo monit status

Hope it helps,
best regards!

1 Like