Commit 81d00ae315eacf7c00e4ccbb1b74ab95f14cc699

Authored by 王浩
1 parent 3b6e7ba7

新增prometheus配置

fw-dalaran-server/pom.xml
... ... @@ -65,6 +65,10 @@
65 65 <artifactId>spring-boot-starter-actuator</artifactId>
66 66 </dependency>
67 67 <dependency>
  68 + <groupId>io.micrometer</groupId>
  69 + <artifactId>micrometer-registry-prometheus</artifactId>
  70 + </dependency>
  71 + <dependency>
68 72 <groupId>org.springframework.boot</groupId>
69 73 <artifactId>spring-boot-starter-undertow</artifactId>
70 74 </dependency>
... ...
fw-dalaran-server/src/main/resources/application-local.yml
... ... @@ -12,8 +12,12 @@ nacos:
12 12 spring:
13 13 application:
14 14 name: fw-dalaran-local
  15 + redis:
  16 + host: 172.26.154.169
  17 + password: fw@test@redis
  18 + port: 6378
15 19 rocketmq:
16   -# name-server: 192.168.0.230:9876
  20 + # name-server: 192.168.0.230:9876
17 21 name-server: 172.26.154.169:9876
18 22 producer:
19 23 group: ${spring.application.name}
... ...
fw-dalaran-server/src/main/resources/application.yml
... ... @@ -112,3 +112,20 @@ logbook:
112 112 task:
113 113 switch: 'on'
114 114 todocode: 'xiOMX9KlMg'
  115 +
  116 +management:
  117 + endpoints:
  118 + web:
  119 + exposure:
  120 + include: '*'
  121 + # 监控路径前缀
  122 + base-path: /actuator
  123 + endpoint:
  124 + # 开启允许远程shutdown,通过post请求。
  125 + shutdown:
  126 + enabled: true
  127 + health:
  128 + show-details: always
  129 + metrics:
  130 + tags:
  131 + application: ${spring.application.name}
... ...