Class TomcatGenericExports


  • public class TomcatGenericExports
    extends io.prometheus.client.Collector
    Exports Tomcat metrics applicable to most most applications: - http session metrics - request processor metrics - thread pool metrics

    Example usage:

     
       new TomcatGenericExports(false).register();
     
     
    Example metrics being exported:
         tomcat_info{version="7.0.61.0",build="Apr 29 2015 14:58:03 UTC",} 1.0
         tomcat_session_active_total{context="/foo",host="default",} 877.0
         tomcat_session_rejected_total{context="/foo",host="default",} 0.0
         tomcat_session_created_total{context="/foo",host="default",} 24428.0
         tomcat_session_expired_total{context="/foo",host="default",} 23832.0
         tomcat_session_alivetime_seconds_avg{context="/foo",host="default",} 633.0
         tomcat_session_alivetime_seconds_max{context="/foo",host="default",} 9883.0
         tomcat_requestprocessor_received_bytes{name="http-bio-0.0.0.0-8080",} 0.0
         tomcat_requestprocessor_sent_bytes{name="http-bio-0.0.0.0-8080",} 5056098.0
         tomcat_requestprocessor_time_seconds{name="http-bio-0.0.0.0-8080",} 127386.0
         tomcat_requestprocessor_error_count{name="http-bio-0.0.0.0-8080",} 0.0
         tomcat_requestprocessor_request_count{name="http-bio-0.0.0.0-8080",} 33709.0
         tomcat_threads_total{pool="http-bio-0.0.0.0-8080",} 10.0
         tomcat_threads_active_total{pool="http-bio-0.0.0.0-8080",} 2.0
         tomcat_threads_active_max{pool="http-bio-0.0.0.0-8080",} 200.0
      
    • Nested Class Summary

      • Nested classes/interfaces inherited from class io.prometheus.client.Collector

        io.prometheus.client.Collector.Describable, io.prometheus.client.Collector.MetricFamilySamples, io.prometheus.client.Collector.Type
    • Field Summary

      • Fields inherited from class io.prometheus.client.Collector

        MILLISECONDS_PER_SECOND, NANOSECONDS_PER_SECOND
    • Constructor Summary

      Constructors 
      Constructor Description
      TomcatGenericExports​(boolean embedded)  
    • Method Detail

      • collect

        public List<io.prometheus.client.Collector.MetricFamilySamples> collect()
        Specified by:
        collect in class io.prometheus.client.Collector