Browse Source

城管 prometheus 监控

master
陈璐 2 weeks ago
parent
commit
fbec8caad7
4 changed files with 51 additions and 2 deletions
  1. +12
    -0
      tuoheng-service/tuoheng-admin/pom.xml
  2. +14
    -1
      tuoheng-service/tuoheng-admin/src/main/resources/application.yml
  3. +12
    -0
      tuoheng-service/tuoheng-miniprogram/pom.xml
  4. +13
    -1
      tuoheng-service/tuoheng-miniprogram/src/main/resources/application.yml

+ 12
- 0
tuoheng-service/tuoheng-admin/pom.xml View File

@@ -162,6 +162,18 @@
<version>2.1.7</version>
</dependency>

<!-- spring-boot-actuator依赖 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
<version>2.3.5.RELEASE</version>
</dependency>
<!-- prometheus依赖 -->
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>

<!--mqtt 相关依赖-->
<dependency>
<groupId>org.springframework.boot</groupId>

+ 14
- 1
tuoheng-service/tuoheng-admin/src/main/resources/application.yml View File

@@ -41,4 +41,17 @@ mybatis-plus:
# client-secret: 123456
# access-token-uri: http://tuoheng-auth/oauth/token
# grant-type: client_credentials,password
# scope: server
# scope: server


management:
endpoints:
web:
exposure:
include: "*"
metrics:
export:
prometheus:
enabled: true
tags:
application: tuoheng_telecomumale-admin

+ 12
- 0
tuoheng-service/tuoheng-miniprogram/pom.xml View File

@@ -78,6 +78,18 @@
<version>3.10.2</version>
</dependency>

<!-- spring-boot-actuator依赖 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
<version>2.3.5.RELEASE</version>
</dependency>
<!-- prometheus依赖 -->
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>

<dependency>
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-vod</artifactId>

+ 13
- 1
tuoheng-service/tuoheng-miniprogram/src/main/resources/application.yml View File

@@ -41,4 +41,16 @@ mybatis-plus:
# client-secret: 123456
# access-token-uri: http://tuoheng-auth/oauth/token
# grant-type: client_credentials,password
# scope: server
# scope: server

management:
endpoints:
web:
exposure:
include: "*"
metrics:
export:
prometheus:
enabled: true
tags:
application: tuoheng_telecomumale-miniprogram

Loading…
Cancel
Save