Multiple Tomcat instances

Setting up tCell on a single host with multiple Tomcat instances

  1. Configure the applications in the admin tab of tCell console For Example:
  • MM-Tomcat-Multi-In1
  • MM-Tomcat-Multi-In2
  1. Download the corresponding tcell_agent.config files for each application

  2. Download and Install tcell agent to a common location on the tomcat server

      1. Download the agent from the console as mentioned in step 1 above
      1. Copy the file to the tomcat server. If tomcat server has direct access to the internet, you can download the agent archive using wget, for example: wget https://static.tcell.io/downloads/jvmagent/tcell-jvmagent-0.4.5.tar.gz We recommend you check the current agent version using the tCell UI (Admin->Download Agent)
      1. Extract the agent to a common location: cd /opt/tomcat1tar xf download_dir/tcell_jvmagent....tar.gz (The tcell folder is automatically created when extracted) Example of multiple Tomcat instances
      1. In the above example: the following are the assumptions:
        1. Tomcat installation location: /opt/tomcat1/apache-tomcat-8.5.20/
        1. Tomcat Instance1 configured in the folder /opt/tomcat1/instance1
        1. Tomcat Instance2 configured in the folder /opt/tomcat1/instance2
        1. Startup & Shutdown scripts for Instance1 are start-instance1 and shut-instance1 respectively
        1. Startup & Shutdown scripts for Instance2 are start-instance2 and shut-instance2 respectively
  3. Copy the tcell_agent.config file for each application to a separate location. For example:

  • cp download_directory/tcell_agent.config /opt/tomcat1/instance1/tcell/tcell_agent.config
  • cp download_directory/tcell_agent.config /opt/tomcat1/instance2/tcell/tcell_agent.config
  1. Create a separate tcell log folder for each application For example:
  • mkdir /opt/tomcat1/instance1/tcell/log
  • mkdir /opt/tomcat1/instance2/tcell/log
  1. Define the environment variables for each application to use in the startup script – in this example we create an instance-specific start-instance1 script (alternatively, this could be setenv.sh in each instance directory's bin dir)

    Example of multiple Tomcat instances

In the startup script, set the environment variables TCELL_AGENT_CONFIG and TCELL_AGENT_LOG_DIR to the corresponding locations (as created above).

  1. Start each instance

  2. Verify tcell agent has been loaded:

Example of multiple Tomcat instances