This service profile monitors a Tomcat server using Windows GDMA. The checks provide a view of memory availability and let you know how well your system is doing at handling client requests, which are some of the most important things you need to monitor.

Profile Package

Profile Definition

  • service-profile-gdma-win-tomcat.xml

Service Checks

  • gdma_win_tomcat_deadlocks: Checks for any current deadlocks
  • gdma_win_tomcat_heapmemusage: Checks amount of heap memory used by the JVM
  • gdma_win_tomcat_maxtime: Returns the maximum time in milliseconds taken to fulfill a request
  • gdma_win_tomcat_threadsbusy: Returns the current number of threads processing active requests


GroundWork Server

  1. Login to the command line of the GroundWork server as the user used to install GroundWork Monitor 8.
  2. Change to the gw8 directory:

    cd gw8
  3. Download the attached Tomcat profile: service-profile-gdma-win-tomcat.xml
  4. Copy the profile to the monarch container on your GroundWork server:

    docker cp service-profile-gdma-win-tomcat.xml dockergw8_monarch_1:/usr/local/groundwork/monarch/profiles/Uploaded/
  5. In the GroundWork Monitor UI, import the profiles in the Uploaded folder:
    • Go to Configuration > Nagios Monitoring > Profiles > Profile Importer > Import > Uploaded.
    • Click Check all and click Import.

Tomcat Server

  1. On the Tomcat server, install GDMA 2.7.1:
    • Follow the steps in the page GDMA Installation.
      • Make sure, when you get to step 2.k. GDMA profiles in the section Install the agent (Windows), that you leave the host profile as is and add the entry for the service profile:
        • Host profile name: gdma-windows-host
        • Service profile name: gdma-win-tomcat
    • Don't forget to perform Commit and Build externals operations once the agent has been installed.
  2. On the Tomcat server:
    • Deploy the web application jolokia.war, included with GDMA in the C:\Program Files (x86)\groundwork\gdma\libexec\jmx4perl\lib\ directory.
    • In the CATALINA_HOME$\conf\tomcat-users.xml file, create the jolokia role and the gwos user: 

      <role rolename="jolokia"/>
      <user username="gwos" password="gwos" roles="jolokia"/>

      While the role must be jolokia, the username and password can be adjusted to your preference.

GroundWork Transitions

Now, you can adjust the arguments in each service to suit your environment and preference.

  1. In the GroundWork Monitor UI, go to Configuration > Nagios Monitoring > Hosts > select the host you just created > click the service gdma_win_tomcat_deadlocks > click the Service Check tab.
  2. Under the section Externals Macro Arguments, uncheck Inherit externals arguments from the generic service:
    • The default arguments are as follows, which is first the URL to the Jolokia app on the Tomcat server, then the username and password of the user with the jolokia role:

    • The other checks, gdma_win_tomcat_heapmemusage, gdma_win_tomcat_maxtime, and gdma_win_tomcat_threadsbusy, can be adjusted using the same process, but have thresholds added. First is the URL to the Jolokia app on the Tomcat server, the username and password of the user with the jolokia role, then the warning and critical thresholds.


Related Resources