Tomcat Server monitors

Tomcat Server component monitors (for example, Tomcat Free Memory and Tomcat Total Memory) collect server resource information from Apache Tomcat servers by retrieving status information from http://{$IP}:{$PORT}/manager/status/?XML=true.

This component monitor type issues HTTP requests to the monitored Tomcat server and expects a response in the form of XML, used to parse data and metrics.

If you experience issues with Tomcat Server monitors on AIX computers, enable remote access in the following Tomcat configuration file:

conf/Catalina/localhost/manager.xml

Prerequisites for Orion Agent for Linux/Unix

If using the Orion Agent for Linux/Unix to monitor a Tomcat server, you need to configure servers to work with the component monitors included in the Tomcat Server template.

Follow these steps to install and configure Tomcat servers to work with SAM component monitors. If Apache Tomcat is already installed, you can skip to step 4 to create an account used for polling.

  1. Determine the version of Tomcat you want to install. You may have multiple versions available to install. To locate all versions, use this command:
    yum search tomcat
  2. After determining the version, you can install the tomcat package and the admin webapps package. Locate the versions to install from the search results. For example:
    tomcat5.i386 : Apache Servlet/JSP Engine, RI for Servlet 2.4/JSP 2.0 API
    tomcat5-admin-webapps.i386 : The administrative web applications for Jakarta Tomcat
  3. Install the versions using the located versions. To install the example above:
    yum install tomcat5 tomcat5-admin-webapps
  4. Next, you need to modify the tomcat-users.xml file to create a user account to access the web manager ('manager','manager-gui'). To locate, use this command:
    find /etc -iname tomcat-users.xml
  5. Edit the file and locate the <tomcat-users> section. If commented out, uncomment the configuration. Edit to add a user of tomcat with the password of tomcat. The template uses this account to access data.
    <tomcat-users>
    <user name="tomcat" password="tomcat" roles="tomcat,manager,manager-gui" />
    <user name="role1"  password="tomcat" roles="role1"  />
    <user name="both"   password="tomcat" roles="tomcat,role1" />
    </tomcat-users>
  6. Restart the service. The command depends on the version you installed. For example, this command restarts the installed service above:
    service tomcat5 restart

Statistic

One of the following Tomcat variables as specified in the Tomcat Variables Name field.

Free Memory

Amount of heap space currently available to the Java Virtual Machine.

Total Memory

Total memory currently allocated to the Java Virtual Machine heap space.

Max Memory

Maximum size of the heap space not including the permanent generation area.

Total Processing Time

Total processing time in milliseconds since server start.

Total Request Count

Total requests from server since server start.

Total Bytes Sent

Total bytes sent from server since server start.

Total Bytes Received

Total bytes sent to server since server start.

Total Error Count

Total error count from all request processors.

Field Descriptions

Description

This field provides a default description of the monitor. You can override the default description by adding to or replacing the text, which will then be automatically saved. The variable to access this field is ${UserDescription}.

Enable Component

Determines whether the component is enabled. Disabling the component leaves it in the application in a deactivated state not influencing either SAM application availability or status.

Credential for Monitoring

Select a credential that can access the password-protected portion of the web site. Click a credential in the list, or use the <Inherit credential from node> option. If the credential is not in the credentials list, add it in the Credentials Library that you can access by clicking Settings > All Settings > SAM Settingsin the Orion Web Console..

Port Number

This field allows you to specify the port number used by the web site. The default value for this field is 8080.

Url

Allows you to specify the URL you want to monitor. The SolarWinds SAM variables ${IP} and ${PORT} contained in the default value for this field attempts to monitor a web site at the IP address of the assigned node.

Ignore CA Errors

Specify if the component monitor should ignore the certificate authority (CA) errors. If this setting is disabled, users will be prompted to verify untrusted connections before proceeding.

Ignore CN Errors

Specify if the component monitor should ignore the certificate name (CN) errors. If this setting is disabled, users will be prompted to verify untrusted connections before proceeding.

Tomcat Variables Name

Specifies the Tomcat server variable to monitor.

Convert Value

Select the Convert Value check box to open the Formula box where you can manipulate the returned value with a variety of mathematical possibilities. Choose common functions from the drop down lists to manipulate the returned value, or select the Custom Conversion option. See Conversion value.

Response Time Threshold

Use this field to set warning and critical threshold conditions based on response time. The response time is the time in milliseconds it takes SAM to determine that a component is not Down and to retrieve any statistical data. See Application Monitor Thresholds for details.

Statistic Threshold

This field allows you to specify when a threshold that indicates a warning or critical level has been breached. Logical operators are in the drop down followed by a blank field for you to enter the value of this threshold. For example: Less than 15 for warning, Less than 5 for critical. See Application Monitor Thresholds for details.

User Notes

This field allows you to add notes for easy reference. You can access this field by using the variable, ${UserNotes}.

Install and configure Tomcat

Follow these steps to install and configure Tomcat servers to work with SAM component monitors. If Apache Tomcat is already installed, you can skip to step 4 to create an account used for polling.

  1. Determine the version of Tomcat you want to install. You may have multiple versions available to install. To locate all versions, use this command:
    yum search tomcat
  2. After determining the version, you can install the tomcat package and the admin webapps package. Locate the versions to install from the search results. For example:
    tomcat5.i386 : Apache Servlet/JSP Engine, RI for Servlet 2.4/JSP 2.0 API
    tomcat5-admin-webapps.i386 : The administrative web applications for Jakarta Tomcat
  3. Install the versions using the located versions. To install the example above:
    yum install tomcat5 tomcat5-admin-webapps
  4. Next, you need to modify the tomcat-users.xml file to create a user account to access the web manager ('manager','manager-gui'). To locate, use this command:
    find /etc -iname tomcat-users.xml
  5. Edit the file and locate the <tomcat-users> section. If commented out, uncomment the configuration. Edit to add a user of tomcat with the password of tomcat. The template uses this account to access data.
    <tomcat-users>
    <user name="tomcat" password="tomcat" roles="tomcat,manager,manager-gui" />
    <user name="role1"  password="tomcat" roles="role1"  />
    <user name="both"   password="tomcat" roles="tomcat,role1" />
    </tomcat-users>
  6. Restart the service. The command depends on the version you installed. For example, this command restarts the installed service above:
    service tomcat5 restart

Troubleshoot Tomcat

To check the XML responses from the a Tomcat server, you can send a simple HTTP request through any web browser to check for raw XML content. The URL should be in the following format: http://host:port/manager/status/?XML=true

You can also query your Tomcat server through CLI using wget.