Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
order-group
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
order-group-application
order-group
Commits
ad126519
Commit
ad126519
authored
Jun 30, 2021
by
bing.liu
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/20210615_PrometheusSchedulerCustom_lb'
parents
5edb1056
59caa1cf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
order-application-service/src/main/java/cn/freemud/service/job/PrometheusSchedulerCustomJob.java
+3
-1
shopping-cart-application-service/src/main/java/cn/freemud/service/job/PrometheusSchedulerCustomJob.java
+3
-1
No files found.
order-application-service/src/main/java/cn/freemud/service/job/PrometheusSchedulerCustomJob.java
View file @
ad126519
...
...
@@ -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
());
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/job/PrometheusSchedulerCustomJob.java
View file @
ad126519
...
...
@@ -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
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment