Tomcat dashboard
22,078 3.0 (1 reviews)

Created 10/30/2018
Updated 12/20/2018
Revision 10
Categories
Host MetricsWeb Servers
Grafana Version >=5.4.2
Datasources

Gist is here

Dashboard for tomcat_* metrics which are exported by JMX exporter.

Also has a detail link to JVM dashboard on server info panel

Prometheus with config example:

scrape_configs:
  - job_name: 'java'
    static_configs:
    - targets: ['<host>:<port>']

You can change config file's job_name and dashboard's job constant variable correspondingly.

jmx-exporter config example:

---   
lowercaseOutputLabelNames: true
lowercaseOutputName: true
whitelistObjectNames: ["java.lang:type=OperatingSystem", "Catalina:*"]
blacklistObjectNames: []
rules:
  - pattern: 'Catalina<type=Server><>serverInfo: (.+)'
    name: tomcat_serverinfo
    value: 1
    labels:
      serverInfo: "$1"
    type: COUNTER
  - pattern: 'Catalina<type=GlobalRequestProcessor, name=\"(\w+-\w+)-(\d+)\"><>(\w+):'
    name: tomcat_$3_total
    labels:
      port: "$2"
      protocol: "$1"
    help: Tomcat global $3
    type: COUNTER
  - pattern: 'Catalina<j2eeType=Servlet, WebModule=//([-a-zA-Z0-9+&@#/%?=~_|!:.,;]*[-a-zA-Z0-9+&@#/%=~_|]), name=([-a-zA-Z0-9+/$%~_-|!.]*), J2EEApplication=none, J2EEServer=none><>(requestCount|processingTime|errorCount):'
    name: tomcat_servlet_$3_total
    labels:
      module: "$1"
      servlet: "$2"
    help: Tomcat servlet $3 total
    type: COUNTER
  - pattern: 'Catalina<type=ThreadPool, name="(\w+-\w+)-(\d+)"><>(currentThreadCount|currentThreadsBusy|keepAliveCount|connectionCount|acceptCount|acceptorThreadCount|pollerThreadCount|maxThreads|minSpareThreads):'
    name: tomcat_threadpool_$3
    labels:
      port: "$2"
      protocol: "$1"
    help: Tomcat threadpool $3
    type: GAUGE
  - pattern: 'Catalina<type=Manager, host=([-a-zA-Z0-9+&@#/%?=~_|!:.,;]*[-a-zA-Z0-9+&@#/%=~_|]), context=([-a-zA-Z0-9+/$%~_-|!.]*)><>(processingTime|sessionCounter|rejectedSessions|expiredSessions):'
    name: tomcat_session_$3_total
    labels:
      context: "$2"
      host: "$1"
    help: Tomcat session $3 total
    type: COUNTER   
Get Dashboard
Download
Copy to Clipboard
Source Grafana.com

Used Metrics 21

  • tomcat_serverinfo

  • tomcat_threadpool_maxthreads

  • tomcat_threadpool_minsparethreads

  • tomcat_threadpool_acceptcount

  • tomcat_threadpool_acceptorthreadcount

  • tomcat_threadpool_pollerthreadcount

  • tomcat_bytesreceived_total

  • tomcat_bytessent_total

  • tomcat_requestcount_total

  • tomcat_errorcount_total

  • tomcat_threadpool_currentthreadcount

  • tomcat_threadpool_currentthreadsbusy

  • tomcat_threadpool_connectioncount

  • tomcat_threadpool_keepalivecount

  • tomcat_session_sessioncounter_total

  • tomcat_session_expiredsessions_total

  • tomcat_session_rejectedsessions_total

  • topk

  • tomcat_servlet_requestcount_total

  • tomcat_servlet_errorcount_total

  • tomcat_servlet_processingtime_total