Ver Fonte

修改监控配置

杨杰 há 5 anos atrás
pai
commit
21908132ee
1 ficheiros alterados com 8 adições e 5 exclusões
  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 #配置中心地址
 
 
-##监控服务配置
-spring.boot.admin.client: 
-  instance.preferIp: true #使用IP注册
-  url: http://192.168.0.179:1111 #监控服务地址
-  
 ##监控端点配置
 management:
   server.port: 18003 #监控端口
   endpoints.web.exposure.include: "*" #开启所有端点
   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 #不为工程中的资源文件建立映射