Integration Guide

How to Configure Apache Tomcat Uptime and Status Monitoring

Configure real-time service health notifications and dynamic payload parameters.

Apache Tomcat is one of the most widely deployed open source Java Servlet containers in the world. It serves as the core runtime engine for thousands of enterprise web applications and microservices. Because Tomcat runs inside a Java Virtual Machine (JVM), it is susceptible to specific failure modes that standard ping tests might fail to diagnose. Common issues include JVM heap memory exhaustion, thread pool saturation, database connection pool depletion, and long stop-the-world Garbage Collection (GC) pauses.

To prevent quiet application hangs and catch outages before your users do, you need to configure proactive, multi-region status checks. This guide explains how to expose Tomcat's built-in status endpoint securely and configure Pingzo to monitor it with real-time alerts.


🛠️ Step 1: Enable the Tomcat Manager App Status Endpoint

Apache Tomcat includes a pre-packaged management application called the Manager App. This utility exposes an XML or HTML status page detailing active thread counts, JVM memory usage, and processor load. By default, access to this endpoint is restricted for security.

To allow Pingzo to query this data, you must configure a dedicated user with read-only monitoring permissions.

1. Edit the User Configuration File

Open your Tomcat configuration directory (usually located at /opt/tomcat/conf/ or C:\Program Files\Apache Software Foundation\Tomcat\conf\) and open the tomcat-users.xml file in a text editor.

2. Define the Monitoring Role and User

Add a custom role for status checking, then assign a user account with a strong, random password. Insert the following lines inside the <tomcat-users> parent tag:

<role rolename="status"/>
<user username="pingzo-monitor" password="YourSecurePasswordHere" roles="status"/>

The status role grants read-only access to the status page without allowing the deployment or undeployment of active servlet applications.

3. Verify the Endpoint Location

Restart your Tomcat server instance. Navigate to your browser and verify you can access the status dashboard by entering: http://your-server-ip:8080/manager/status

You should be prompted for basic authentication credentials. Enter the username and password you configured in the xml file to ensure the status dashboard loads correctly.


⚡ Step 2: Configure Basic Authentication inside the URL

Pingzo's monitoring engine supports standard HTTP URL Basic Authentication. You can pass your credentials directly inside the URL string. When our checker node runs the request, it automatically extracts these credentials and sends them as a secure authentication header.

1. Format Your Authenticated URL

Combine your configured Tomcat username, password, and server domain (or public IP address) using this structure: https://username:password@your-app-domain.com/manager/status

For example: https://pingzo-monitor:YourSecurePasswordHere@tomcat.yourdomain.com/manager/status

2. Add the Monitor in Pingzo

  1. Log into your Pingzo Dashboard and click Create Monitor.
  2. Select Website / API Uptime (Pull) as the monitor type.
  3. Paste your formatted authenticated URL into the URL to Monitor field.
  4. Set the check interval to 1 minute for immediate outage detection.
  5. Set the expected status code to 200.

🔒 Step 3: Configure Response Validation Rules

A Tomcat instance can occasionally lock up or experience database pool exhaustion while still serving a blank HTTP 200 page. To prevent these silent failures, configure Pingzo to validate the content of the status page.

1. Set Content Match Validation

Under the monitor settings, enable Keyword Match (optional). Set Pingzo to search for specific key strings that verify the servlet engine is running correctly, such as: Tomcat Status or JVM

If the response body does not contain these strings (for example, if database pool exhaustion triggers a blank page or custom error stack trace), Pingzo will flag the check as failed and alert your team.

2. Set Up Alert Thresholds

Set the timeout to 10s (10 seconds) to account for transient network spikes or heavy garbage collection cycles. Set the alert threshold to consecutive check failures to eliminate intermittent network hiccups while still reporting true failures quickly.


📣 Step 4: Route Outage Alerts to Your Team

When Tomcat fails, you need to notify the correct engineering channel immediately.

In your Alert Channels tab, connect your preferred communication tools:

  • WhatsApp: Receive direct mobile notifications when JVM memory is exhausted or threads lock up.
  • Slack or Discord: Send structural incident alerts with response codes and latency stats directly into your operational rooms.
  • Webhooks: Automatically trigger server restarts or route incidents directly into incident response services when an outage occurs.

By combining detailed status pages with automated validation and fast alerts, you protect your infrastructure and ensure high service availability.

Integration Benefits

  • Flat-Rate Dispatching

    Send unlimited notification alerts without dynamic usage costs or subscriber fees.

  • Automated Recoveries

    Pingzo resolves notifications automatically to keep your incident chat clean.

  • SSL Warning Handlers

    Get early warnings 30/14/7 days before certificates expire, right in your alert channels.

Hook your channels now

Link Slack, Discord, MS Teams, Telegram, and official WhatsApp numbers to keep your engineering team aligned.

Start Free Uptime Check