Package nl.nlighten.prometheus.tomcat
Class TomcatDbcp2PoolExports
- java.lang.Object
-
- io.prometheus.client.Collector
-
- nl.nlighten.prometheus.tomcat.TomcatDbcp2PoolExports
-
public class TomcatDbcp2PoolExports extends io.prometheus.client.Collector
Exports Tomcat DBCP2-pool metrics.Example usage:
Example metrics being exported:new TomcatDbcp2PoolExports().register();tomcat_dpcp2_connections_max{pool="jdbc/mypool"} 20.0 tomcat_dbcp2_connections_active_total{pool="jdbc/mypool"} 2.0 tomcat_dbcp2_connections_idle_total{pool="jdbc/mypool"} 6.0
-
-
Constructor Summary
Constructors Constructor Description TomcatDbcp2PoolExports()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<io.prometheus.client.Collector.MetricFamilySamples>collect()static booleanisDbcp2Used()
-
-
-
Constructor Detail
-
TomcatDbcp2PoolExports
public TomcatDbcp2PoolExports()
-
-
Method Detail
-
collect
public List<io.prometheus.client.Collector.MetricFamilySamples> collect()
- Specified by:
collectin classio.prometheus.client.Collector
-
isDbcp2Used
public static boolean isDbcp2Used()
-
-