Commit 59caa1cf by bing.liu

更新prometheus

parent 3b65daee
......@@ -30,7 +30,7 @@ public class PrometheusSchedulerCustomJob {
* 最大连接池数量
* 最小连接池数量
*/
private final AtomicInteger activeCountGauge, maxActiveGauge, maxIdleGauge, minIdleGauge;
private final AtomicInteger activeCountGauge, maxActiveGauge, maxIdleGauge, minIdleGauge,poolingCountGauge;
private final CachingConnectionFactory cachingConnectionFactory;
private final DruidDataSource druidDataSource;
......@@ -45,6 +45,7 @@ public class PrometheusSchedulerCustomJob {
idleChannelsNotTxHighWaterGauge = meterRegistry.gauge("rabbitmq_idle_channels_not_tx_high_water", new AtomicInteger(0));
activeCountGauge = meterRegistry.gauge("db_active_count", new AtomicInteger(0));
poolingCountGauge = meterRegistry.gauge("db_pooling_count",new AtomicInteger(0));
maxActiveGauge = meterRegistry.gauge("db_max_active", new AtomicInteger(0));
maxIdleGauge = meterRegistry.gauge("db_max_idle", new AtomicInteger(0));
minIdleGauge = meterRegistry.gauge("db_min_idle", new AtomicInteger(0));
......@@ -61,6 +62,7 @@ public class PrometheusSchedulerCustomJob {
idleChannelsNotTxHighWaterGauge.set(Integer.parseInt(cacheProperties.getOrDefault("idleChannelsNotTxHighWater", 0).toString()));
activeCountGauge.set(druidDataSource.getActiveCount());
poolingCountGauge.set(druidDataSource.getPoolingCount());
maxActiveGauge.set(druidDataSource.getMaxActive());
maxIdleGauge.set(druidDataSource.getMaxIdle());
minIdleGauge.set(druidDataSource.getMinIdle());
......
......@@ -30,7 +30,7 @@ public class PrometheusSchedulerCustomJob {
* 最大连接池数量
* 最小连接池数量
*/
private final AtomicInteger activeCountGauge, maxActiveGauge, maxIdleGauge, minIdleGauge;
private final AtomicInteger activeCountGauge, maxActiveGauge, maxIdleGauge, minIdleGauge,poolingCountGauge;
private final CachingConnectionFactory cachingConnectionFactory;
private final DruidDataSource druidDataSource;
......@@ -45,6 +45,7 @@ public class PrometheusSchedulerCustomJob {
idleChannelsNotTxHighWaterGauge = meterRegistry.gauge("rabbitmq_idle_channels_not_tx_high_water", new AtomicInteger(0));
activeCountGauge = meterRegistry.gauge("db_active_count", new AtomicInteger(0));
poolingCountGauge = meterRegistry.gauge("db_pooling_count",new AtomicInteger(0));
maxActiveGauge = meterRegistry.gauge("db_max_active", new AtomicInteger(0));
maxIdleGauge = meterRegistry.gauge("db_max_idle", new AtomicInteger(0));
minIdleGauge = meterRegistry.gauge("db_min_idle", new AtomicInteger(0));
......@@ -61,6 +62,7 @@ public class PrometheusSchedulerCustomJob {
idleChannelsNotTxHighWaterGauge.set(Integer.parseInt(cacheProperties.getOrDefault("idleChannelsNotTxHighWater", 0).toString()));
activeCountGauge.set(druidDataSource.getActiveCount());
poolingCountGauge.set(druidDataSource.getPoolingCount());
maxActiveGauge.set(druidDataSource.getMaxActive());
maxIdleGauge.set(druidDataSource.getMaxIdle());
minIdleGauge.set(druidDataSource.getMinIdle());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment