Documentation forAppOptics

Tomcat

This plugin is currently being groomed to be an integration. It works, but we haven't spent a lot of time on it yet to optimize the user experience. Feel free to try it out, just keep in mind that we will be enhancing the experience over time.

Overview

This plugin collects status metrics from Tomcat.

This plugin is currently only available for x86_64 Linux.

Setup

The tomcat plugin is included with the SolarWinds Snap Agent by default, please follow the directions below to enable it for a agent instance.

Prerequisites

This plugin requires that the a user with the manager-status (or any other manager-xxx) role. You can verify the credentials by testing the manager URL:

Copy
curl -u tomcat:tomcat "http://127.0.0.1:8080/manager/status/all?XML=true"
# response
<?xml version="1.0" encoding="utf-8"?>
<status>
    <jvm>
        <memory free="398919744" total="514850816" max="954728448" />
        <memorypool name="PS Eden Space" type="Heap memory" usageInit="134742016" usageCommitted="134742016" usageMax="313524224" usageUsed="115931072" />
        <memorypool name="PS Old Gen" type="Heap memory" usageInit="358088704" usageCommitted="358088704" usageMax="716177408" usageUsed="0" />
        <memorypool name="PS Survivor Space" type="Heap memory" usageInit="22020096" usageCommitted="22020096" usageMax="22020096" usageUsed="0" />
        <memorypool name="Code Cache" type="Non-heap memory" usageInit="2555904" usageCommitted="6356992" usageMax="251658240" usageUsed="6296704" />
        <memorypool name="Compressed Class Space" type="Non-heap memory" usageInit="0" usageCommitted="2228224" usageMax="1073741824" usageUsed="2055160" />
        <memorypool name="Metaspace" type="Non-heap memory" usageInit="0" usageCommitted="18743296" usageMax="-1" usageUsed="18251480" />
    </jvm>
    <connector name="ajp-nio-8009">
        <threadInfo maxThreads="200" currentThreadCount="10" currentThreadsBusy="0" />
        <requestInfo maxTime="0" processingTime="0" requestCount="0" errorCount="0" bytesReceived="0" bytesSent="0" />
        <workers></workers>
    </connector>
    <connector name="http-nio-8080">
        <threadInfo maxThreads="200" currentThreadCount="10" currentThreadsBusy="1" />
        <requestInfo maxTime="0" processingTime="0" requestCount="0" errorCount="0" bytesReceived="0" bytesSent="0" />
        <workers>
            <worker stage="S" requestProcessingTime="91" requestBytesSent="0" requestBytesReceived="0" remoteAddr="127.0.0.1" virtualHost="127.0.0.1" method="GET" currentUri="/manager/status/all" currentQueryString="XML=true" protocol="HTTP/1.1" />
        </workers>
    </connector>
</status>

There is more information about how to configure manager application access here.

Configuration

The agent provides an example configuration file to help you get started quickly. It defines the plugin and task file to be loaded by the agent, but requires you to provide the correct settings for your Apache server. To enable the plugin:

  1. Make a copy of the tomcat example configuration file /opt/SolarWinds/Snap/etc/plugins.d/tomcat.yaml.example, renaming it to /opt/SolarWinds/Snap/etc/plugins.d/tomcat.yaml:

    Copy
    $ sudo cp /opt/SolarWinds/Snap/etc/plugins.d/tomcat.yaml.example /opt/SolarWinds/Snap/etc/plugins.d/tomcat.yaml
  2. Update /opt/SolarWinds/Snap/etc/plugins.d/tomcat.yaml configuration file with settings specific to your Tomcat servers, for example:

    Copy
    collector:
      tomcat:
        all:
          ## URL of the Tomcat server status
          url: "http://127.0.0.1:8080/manager/status/all?XML=true"
          ## HTTP Basic Auth Credentials
          username: "tomcat"
          password: "tomcat"
          ## Request timeout
          # timeout: "5s"
          ## Optional SSL Config
          # tls_ca: /path/to/cafile
          # tls_cert: /path/to/certfile
          # tls_key: /path/to/keyfile
          ## Use SSL but skip chain & host verification
          # insecure_skip_verify: false
    load:
      plugin: snap-plugin-collector-bridge-tomcat
      task: task-bridge-tomcat.yaml
  3. Restart the agent:

    Copy
    $ sudo service swisnapd restart
  4. Enable the Tomcat plugin

On the Integrations Page you will see Tomcat available if the previous steps were successful.

Metrics and Tags

The table below lists each of the metrics gathered from the status endpoint.

Connector Metrics

Metric Description
tomcat.tomcat_connector.bytes_received Total bytes received
tomcat.tomcat_connector.bytes_sent Total bytes sent
tomcat.tomcat_connector.current_thread_count Total thread count
tomcat.tomcat_connector.current_threads_busy Total busy thread
tomcat.tomcat_connector.error_count Total error count
tomcat.tomcat_connector.max_threads Max thread count
tomcat.tomcat_connector.max_time Max response time
tomcat.tomcat_connector.processing_time Max processing time
tomcat.tomcat_connector.request_count Request count

Connector Metric Tag

Name Description
name Name of the web app

JVM Memory Metrics

Metric Description
tomcat.tomcat_jvm_memory.free Free memory in bytes
tomcat.tomcat_jvm_memory.max Max memory in bytes
tomcat.tomcat_jvm_memory.total Total memory in bytes
tomcat.tomcat_jvm_memorypool.committed Committed memory in bytes
tomcat.tomcat_jvm_memorypool.init Initial memory in bytes
tomcat.tomcat_jvm_memorypool.max Max used memory in bytes
tomcat.tomcat_jvm_memorypool.used Used memory in bytes

JVM Metric Tag

Name Description
name Name of the web app
space Name of the space

When the APM Integrated Experience is enabled, AppOptics shares a common navigation and settings with the other integrated experiences' products. How you navigate AppOptics and access its features may vary from these instructions. For more information, go to the APM Integrated Experience documentation.

The scripts are not supported under any SolarWinds support program or service. The scripts are provided AS IS without warranty of any kind. SolarWinds further disclaims all warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The risk arising out of the use or performance of the scripts and documentation stays with you. In no event shall SolarWinds or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the scripts or documentation.