前言
Prometheus是一个开源的服务监控系统和时序数据库,它提供了强大的功能和灵活的架构,是目前主流的监控和管理应用系统的工具。
而Grafana是一个开源的数据可视化工具,与Prometheus集成,就可以可视化地监控系统的各个指标。
原理
首先Springboot整合actuator将服务的各种参数暴露出来,Prometheus定期通过接口查询这些参数,然后将参数存储在Prometheus内置的数据库内,然后再
一、Springboot整合actuator暴露数据
引入依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
配置yml暴露数据
spring:
application:
name: my-app
server:
port: 8081
servlet:
context-path: /myApp
management:
endpoints:
web:
exposure:
include:

最低0.47元/天 解锁文章
1052

被折叠的 条评论
为什么被折叠?



