Hi team,
i just downloaded the latest jmx exporter of version 0.17.2 in lib folder 
of tomcat directory. and in catalina.sh file i just added this line.

CATALINA_OPTS=" 
-javaagent:/opt/app/tomcat8/lib/jmx_prometheus_javaagent-0.17.2.jar=9088:/opt/app/tomcat8/lib/config.yaml"

and my config.yaml file is as below.
---------------------------------------------------------------
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|e$
    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|minSpareThread$
    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
  - pattern: '.*'
...

-----------------------------------------------------------------
the i run ./catalina.sh start, it says tomcat started but unable to see the 
metrics and sometimes i come across the error below like no manifest. 
needed help for just running.

Error opening zip file or JAR manifest missing : 
/jmx/jmx_prometheus_javaagent-0.17.2.jar:8088:/home/naikvad/jmx/config.yml

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/e34c572f-71d0-4fbd-ac11-1c874d49d59an%40googlegroups.com.

Reply via email to