# Default metrics collected by this check. You should not have to modify this.
jmx_metrics:
  - include:
      type: ThreadPool
      attribute:
        maxThreads:
          alias: tomcat.threads.max
          metric_type: gauge
        currentThreadCount:
          alias: tomcat.threads.count
          metric_type: gauge
        currentThreadsBusy:
          alias: tomcat.threads.busy
          metric_type: gauge
  - include:
      type: GlobalRequestProcessor
      attribute:
        bytesSent:
          alias: tomcat.bytes_sent
          metric_type: counter
        bytesReceived:
          alias: tomcat.bytes_rcvd
          metric_type: counter
        errorCount:
          alias: tomcat.error_count
          metric_type: counter
        requestCount:
          alias: tomcat.request_count
          metric_type: counter
        maxTime:
          alias: tomcat.max_time
          metric_type: gauge
        processingTime:
          alias: tomcat.processing_time
          metric_type: counter
  - include:
      j2eeType: Servlet
      attribute:
        processingTime:
          alias: tomcat.servlet.processing_time
          metric_type: counter
        errorCount:
          alias: tomcat.servlet.error_count
          metric_type: counter
        requestCount:
          alias: tomcat.servlet.request_count
          metric_type: counter
  - include:
      # Deprecated metric available in Tomcat 7
      # https://github.com/apache/tomcat/blob/7.0.x/java/org/apache/catalina/core/StandardContext.java#L5293-L5297
      type: Cache
      attribute:
        accessCount:
          alias: tomcat.cache.access_count
          metric_type: counter
        hitsCounts:
          alias: tomcat.cache.hits_count
          metric_type: counter
  - include:
      type: StringCache
      attribute:
        accessCount:
          alias: tomcat.string_cache.access_count
          metric_type: counter
        hitCount:
          alias: tomcat.string_cache.hit_count
          metric_type: counter
  - include:
      # Example Bean: `Catalina:type=WebResourceRoot,host=localhost,context=/docs,name=Cache`
      type: WebResourceRoot
      name: Cache
      attribute:
        hitCount:
          alias: tomcat.web.cache.hit_count
          metric_type: counter
        lookupCount:
          alias: tomcat.web.cache.lookup_count
          metric_type: counter
  - include:
      type: JspMonitor
      attribute:
        jspCount:
          alias: tomcat.jsp.count
          metric_type: counter
        jspReloadCount:
          alias: tomcat.jsp.reload_count
          metric_type: counter
