SpringBoot指标监控

SpringBoot Actuator可以帮助程序员监控和管理SpringBoot,比如健康检查、内存使用情况、线程使用情况统计。添加Actuator依赖,即可使用Actuator监控项目

1.

#开启所有监控端点
management.endpoints.web.exposure.include=*

2.查看路径:http://localhost:8888/actuator

http://localhost:8888/actuator/env  :环境属性

http://localhost:8888/actuator/health:健康检查

http://localhost:8888/actuator/mappings:显示所有的@RequestMapping路径

http://localhost:8888/actuator/loggers:日志

http://localhost:8888/actuator/info:定制信息

http://localhost:8888/actuator/metrics:查看内存、cpu核心等系统参数

http://localhost:8888/actuator/用户请求信息

3.SpringBoot指标监控可视化工具

1.创建SpringBoot Admin项目  里面添加SpringMVC和SpringBoot Admin服务端起步依赖

2.添加配置文件数据,端口号要与被监控的项目不一样

3.在启动类上方添加@EnableAdminServer注解,开启SpringBoot Admin服务端

4.被监控项目添加SpringBoot Admin客户端起步依赖

5.修改被监控项目配置文件,添加:spring.boot.admin.client.url=http://localhost:9999

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值