浏览代码

修改监控配置

杨杰 5 年之前
父节点
当前提交
21908132ee
共有 1 个文件被更改,包括 8 次插入5 次删除
  1. 8 5
      src/main/resources/application.yml

+ 8 - 5
src/main/resources/application.yml

@@ -52,17 +52,20 @@ eureka:
     serviceUrl.defaultZone: http://192.168.0.179:8761/eureka #配置中心地址
     serviceUrl.defaultZone: http://192.168.0.179:8761/eureka #配置中心地址
 
 
 
 
-##监控服务配置
-spring.boot.admin.client: 
-  instance.preferIp: true #使用IP注册
-  url: http://192.168.0.179:1111 #监控服务地址
-  
 ##监控端点配置
 ##监控端点配置
 management:
 management:
   server.port: 18003 #监控端口
   server.port: 18003 #监控端口
   endpoints.web.exposure.include: "*" #开启所有端点
   endpoints.web.exposure.include: "*" #开启所有端点
   endpoint.health.show-details: always #显示健康详情
   endpoint.health.show-details: always #显示健康详情
 
 
+##监控服务配置
+spring.boot.admin.client: 
+  url: http://localhost:1111 #监控服务地址
+  instance: #监控实例地址配置
+    serviceUrl: http://${eureka.instance.ipAddress}:${server.port}
+    healthUrl: http://${eureka.instance.ipAddress}:${management.server.port}/actuator/health
+    managementUrl: http://${eureka.instance.ipAddress}:${management.server.port}/actuator
+
   
   
 ##系统异常配置
 ##系统异常配置
 spring.resources.addMappings: false #不为工程中的资源文件建立映射
 spring.resources.addMappings: false #不为工程中的资源文件建立映射