关于使用spring admin和consul一起做监控需要注意的配置
生活随笔
收集整理的这篇文章主要介绍了
关于使用spring admin和consul一起做监控需要注意的配置
小编觉得挺不错的,现在分享给大家,帮大家做个参考.
如果使用spring cloud 开发微服务的时候,服务配置了上线文如
server:port: 8082servlet:context-path: /mail
则使用spring admin监控时需要在服务发现的consul中配置tags
如下,这样spring admin中的健康检查才能读取到上下文+/actuator/health,在spring admin中才能检测到上下文
spring:application:name: consul-examplecloud:config:enabled: falseconsul:host: localhostport: 8500discovery:tags: management.context-path=/foo总结
以上是生活随笔为你收集整理的关于使用spring admin和consul一起做监控需要注意的配置的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: Kafka 配置说明
- 下一篇: consul使用的一些见解