From cda5b6909ae55c76de49053fa3b8ee6595d233c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BD=97=E7=A5=A5?= <1366971433@qq.com> Date: Thu, 10 Jan 2019 17:25:37 +0800 Subject: [PATCH] modify --- README.md | 2 +- spring-boot/spring-boot-actuator/README.md | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index fbd4ac8..94986a0 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ spring-cloud:Finchley.SR2 | [spring-boot-dubbo](https://github.com/heibaiying/spring-samples-for-all/tree/master/spring-boot/spring-boot-dubbo) | spring-boot 整合 dubbo | [Dubbo ](http://dubbo.apache.org/zh-cn/docs/user/quick-start.html) | | [spring-boot-websocket](https://github.com/heibaiying/spring-samples-for-all/tree/master/spring-boot/spring-boot-websocket) | spring-boot 整合 websocket | [Using @ServerEndpoint](https://docs.spring.io/spring-boot/docs/2.1.1.RELEASE/reference/htmlsingle/#howto-create-websocket-endpoints-using-serverendpoint) | | [spring-boot-kafka](https://github.com/heibaiying/spring-samples-for-all/tree/master/spring-boot/spring-boot-kafka) | spring-boot 整合 kafka | [Apache Kafka Support](https://docs.spring.io/spring-boot/docs/2.1.1.RELEASE/reference/htmlsingle/#boot-features-kafka) | -| spring-boot-actuator | actuator + Hyperic SIGAR 应用信息监控 | [Spring Boot Actuator](https://docs.spring.io/spring-boot/docs/2.1.1.RELEASE/reference/htmlsingle/#production-ready) | +| [spring-boot-actuator](https://github.com/heibaiying/spring-samples-for-all/tree/master/spring-boot/spring-boot-actuator) | actuator + Hyperic SIGAR 应用信息监控 | [Spring Boot Actuator](https://docs.spring.io/spring-boot/docs/2.1.1.RELEASE/reference/htmlsingle/#production-ready) | 更多的用例可参阅 [spring-boot 官方samples ](https://github.com/spring-projects/spring-boot/tree/master/spring-boot-samples) diff --git a/spring-boot/spring-boot-actuator/README.md b/spring-boot/spring-boot-actuator/README.md index 2267f81..e42041d 100644 --- a/spring-boot/spring-boot-actuator/README.md +++ b/spring-boot/spring-boot-actuator/README.md @@ -107,7 +107,7 @@ management.endpoint.shutdown.enabled = true 2. CustomHealthAggregator:自定义健康聚合规则; 3. CustomEndPoint:自定义端点。 -![spring-boot-actuator](D:\spring-samples-for-all\pictures\spring-boot-actuator.png) +
#### 1.2 主要依赖 @@ -142,7 +142,7 @@ management: 导入actuator 的 start 并进行配置后,访问http://127.0.0.1:8080/actuator/health就可以看到对应的项目监控状态。 -![health](D:\spring-samples-for-all\pictures\health.png) +
需要注意的是这里的监控状态根据实际项目所用到的技术不同而不同。因为以下HealthIndicators情况在适当时由Spring Boot自动配置的: @@ -189,11 +189,11 @@ public class CustomHealthIndicator implements HealthIndicator { 自定义检查通过的情况下: -![actuator-health-up](D:\spring-samples-for-all\pictures\actuator-health-up.png) +
自定义检查失败的情况: -![health-fatal-200](D:\spring-samples-for-all\pictures\health-fatal-200.png) +
@@ -226,7 +226,7 @@ public class CustomHealthAggregator implements HealthAggregator { 这是当我们自定义健康检查不通过时候的结果如下: -![actuator-heath-503](D:\spring-samples-for-all\pictures\actuator-heath-503.png) +
这里需要注意的是返回我们自定义的聚合状态的时候,状态码也变成了503,这是我们在配置文件中进行定义的: @@ -303,7 +303,7 @@ public class CustomEndPoint { #### 5.2 访问自定义端点http://127.0.0.1:8080/actuator/customEndPoint -![actuator-customEndPoint](D:\spring-samples-for-all\pictures\actuator-customEndPoint.png) +
@@ -311,4 +311,4 @@ public class CustomEndPoint { Sigar 下载包中也提供了各种参数的参考用例: -![sigar](D:\spring-samples-for-all\pictures\sigar.png) \ No newline at end of file +
\ No newline at end of file