本文介绍SpringBoot如何使用Prometheus配合Grafana监控。
1.关于Prometheus
Prometheus是一个根据应用的metrics来进行监控的开源工具。相信很多工程都在使用它来进行监控,有关详细介绍可以查看官网:https://prometheus.io/docs/introduction/overview/。
2.有关Grafana
Grafana是一个开源监控利器,如图所示。
从图中就可以看出来,使用Grafana监控很高大上,提供了很多可视化的图标。
官网地址:https://grafana.com/
3.SpringBoot使用Prometheus
3.1 依赖内容
在SpringBoot中使用Prometheus其实很简单,不需要配置太多的东西,在pom文件中加入依赖,完整内容如下所示。
<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http:///dalaoyang/springboot_learn/tree/master/springboot2_prometheus到此这篇关于SpringBoot使用prometheus监控的示例代码的文章就介绍到这了,更多相关SpringBoot prometheus监控内容请搜索以前的文章或继续浏览下面的相关文章希望大家以后多多支持!