Class TomcatJdbcPoolExports


  • public class TomcatJdbcPoolExports
    extends io.prometheus.client.Collector
    Exports Tomcat jdbc-pool metrics.

    Example usage:

     
       new TomcatJdbcPoolExports().register();
     
     
    Example metrics being exported:
        tomcat_jdbc_connections_max{context="/foo",pool="jdbc/mypool"} 20.0
        tomcat_jdbc_connections_active_total{context="/foo",pool="jdbc/mypool"} 2.0
        tomcat_jdbc_connections_idle_total{context="/foo",pool="jdbc/mypool"} 6.0
        tomcat_jdbc_connections_total{context="/foo",pool="jdbc/mypool"} 8.0
        tomcat_jdbc_connections_threadswaiting_total{context="/foo",pool="jdbc/mypool"} 0.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
    • Method Detail

      • collect

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