springboot actuator配置

###
#1、Endpoints是Spring Boot Actuator提供的一组用于监控和管理应用程序的RESTful接口
#2、Endpoint是Endpoints的具体实现类
#3、Endpoints与Endpoint,有一个禁用,则结果是禁用
###
management:
  health:
    db:
      enabled: true   #配置health端点中,是否检测、展示db存活
  endpoints:
    #是否暴露endpoint,相当于总开关,默认为true
    enabled-by-default: true
    web:
      #默认访问路径
      base-path: /myActuator
      #暴露哪些web endpoint,默认为health、info
      exposure:
        include: '*' #配置暴露所有端点
        #include: 'health,info,env' #配置暴露health,info,env这3个端点
        #exclude: "beans,heapdump,shutdown"   #配置不暴露beans,heapdump,shutdown这3个端点


  #关闭所有端点之后,可以指定暴露某个端点
      #endpoints配置暴露所有端点后,endpoint再配置,结果是打开
  endpoint:
    info:
      enabled: true
    heapdump:
      enabled: true   #Endpoints与Endpoint,有一个禁用,则结果是禁用
    health:
      show-details: never    #配置是否展示health详细信息

参考:应用监控之 SpringBoot Actuator 使用及配置 - 简书

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值