以前,我们获得了Spring Boot Application适配器,以便为Prometheus公开端点。
该博客将重点介绍如何设置和配置Prometheus,以便为Spring Boot端点提供服务器。
因此,让我们开始使用docker来启动Prometheus服务器。


在继续进行Prometheus升级之前,我们需要提供一个配置文件以从应用程序中提取数据。
因此,我们应该提供包含以下内容的prometheus.yaml文件。

 scrape_configs: - job_name: 'prometheus-spring' scrape_interval: 1m metrics_path: '/actuator/prometheus' static_configs: - targets: [ 'my.local.machine:8080' ] 

让我们使用从此处获取的命令。

由于通过docker在osx上使用了prometheus,因此我们需要一些解决方法来通过应用进行连接

 sudo ifconfig lo0 alias 172.16.222.111 

我们可以直接使用docker

 docker run - v /path/to/prometheus .yaml: /etc/prometheus/prometheus .yml -p 9090:9090 --add-host= "my.local.machine:172.16.222.111" prom /prometheus 

通过执行上述操作,我们将能够从docker映像内部与本地应用程序进行交互。

因此,如果我们导航到http:// localhost:9090 / graph,我们将被Prometheus屏幕所欢迎。
同样,在我们的prometheus容器内,我们还能够与应在本地运行的应用程序进行通信。

因此,让我们花一些时间看看是否已收集数据。 然后,我们转到Prometheus状态页面http:// localhost:9090 / status 。

我们将被我们的应用程序的JVM信息所吸引。


在下一个博客中,我们将重点介绍保护Prometheus 端点的方法 。

翻译自: https://www.javacodegeeks.com/2020/05/spring-boot-and-micrometer-with-prometheus-part-5-spinning-up-prometheus.html

带有Prometheus的弹簧靴和Micrometer第5部分:旋转Prometheus相关推荐

  1. 带有Prometheus的弹簧靴和千分尺第5部分:旋转Prometheus

    以前,我们获得了Spring Boot Application适配器,以便为Prometheus公开端点. 该博客将重点介绍如何设置和配置Prometheus,以便为Spring Boot端点提供服务 ...

  2. 深入分析基于Micrometer和Prometheus实现度量和监控的方案

    深入分析基于Micrometer和Prometheus实现度量和监控的方案 前提# 最近线上的项目使用了spring-actuator做度量统计收集,使用Prometheus进行数据收集,Grafan ...

  3. Prometheus+Grafana (史上最全)

    尼恩大架构 最强环境 系列文章 一键打造 本地elk 实操环境: ELK日志平台(elasticsearch +logstash+kibana)原理和实操(史上最全) 高级开发必备,架构师必备 一键打 ...

  4. 作者领读 | Prometheus云原生监控

    撰文:朱政科 01 作者导读 昨天收到书,用了两天时间,我也亲自把这本书读完了一遍.今天写这篇文章的目的是带读者用正确的方式读这本书. <Prometheus云原生监控:运维与开发实战> ...

  5. 运维(32) Prometheus+Grafana监控SpringBoot

    文章目录 一.前言 二.SpringBoot集成Micrometer 1.`pom.xml`中引入依赖 2.`application.yml`配置 3.Micrometer配置 三.部署Prometh ...

  6. 系统化了解Micrometer

    本文从官方文档整理出一篇系统化全面了解的文章, 后续可能会慢慢补上源码层面的解析: https://micrometer.io/docs 学习本文的目的在于深入了解中间件的监控模块的设计, 先看看主流 ...

  7. 开源监控系统 Prometheus 入门

    点击上方蓝色"程序猿DD",选择"设为星标" 回复"资源"获取独家整理的学习资料! 来源 | 公众号「yangyidba」 一 简介 Pro ...

  8. prometheus下载慢_Prometheus + Grafana 监控 SpringBoot

    整体结构 SpringBoot 的 actuator 提供了监控端点. Prometheus 是监控系统,可以从 Springboot 获取监控数据,以时序数据的形式存储,并提供了监控数据的查询服务. ...

  9. Spring Boot2.x-14 使用Prometheus + Grafana 实现可视化的监控

    文章目录 环境信息 Prometheus 组件 下载 & 安装 通过指定配置文件prometheus.yml启动Prometheus 查看采集到的性能指标 查看prometheus规则 查看监 ...

最新文章

  1. 【内推】滴滴出行视觉计算组招聘算法实习生
  2. BZOJ 3836 Codeforces 280D k-Maximum Subsequence Sum (模拟费用流、线段树)
  3. Struts2中通过Ajax传递json数据
  4. gcc/g++基本命令简介
  5. HDFS读流程,写流程,放置策略
  6. JavaWeb—作业【建立新闻数据库以及插入数据】
  7. Apache Tomcat安装配置
  8. HTML5中多媒体标签之音频标签
  9. 2008服务器远程桌面连接设置密码,WinServer 2008 远程桌面连接设置
  10. 液晶拼接大屏的日常维护与保养
  11. java8写一个word count
  12. 酷宇宙大学:代币经济学(第四课)如何评估代币的效用?
  13. 【关于2022年卡塔尔世界杯】
  14. 为什么人脸识别系统总是认错黑人?
  15. Aop切面编程原理和Spring实现
  16. FilterConfig.RegisterGlobalFilters 全局过滤器的用法
  17. bzoj 4399 魔法少女LJJ
  18. Groovy on Grails(Java笨狗)系列---前言(二)
  19. GoLang之go test测试
  20. C++实现黑白棋算法

热门文章

  1. cf208E. Blood Cousins
  2. cf1555A. PizzaForces
  3. [C++] iota语句的语法
  4. jzoj5248-[NOIP2017提高A组模拟8.10]花花的聚会【倍增,树形dp】
  5. P4427-[BJOI2018]求和【LCA】
  6. 【贪心】雷达装置(ybtoj 贪心-1-2)
  7. 2、oracle数据库的用户和权限
  8. 10 道关于 Java 泛型的面试题
  9. JSP JavaBean
  10. 分布式ID生成器的解决方案总结