SpringBoot2.X&Prometheus使用
1、启动Prometheus
[root@ip101 prometheus-2.12.0.linux-amd64]# pwd
/opt/app/prometheus-2.12.0.linux-amd64
./prometheus --config.file=prometheus.yml &
ps -ef|grep prometheus |grep -v grep
2、Prometheus 查看
2.1、Prometheus自身metrics
http://192.168.8.101:9090/metrics
2.2、 Prometheus自身graph
http://192.168.8.101:9090/graph
2.3、Prometheus自身targets
http://192.168.8.101:9090/targets

3、SpringBoot Actuator
server.port=8080
spring.application.name=springboot_prometheus
management.endpoints.web.exposure.include=*
management.metrics.tags.application=${spring.application.name}
#注意此处 如何配置为根目录的话,直接访问http://192.168.8.1:8080/prometheus
#http://192.168.8.1:8080/actuator/prometheus
management.endpoints.web.base-path=/actuator
Prometheus配置
global:
scrape_interval: 15s
scrape_timeout: 10s
evaluation_interval: 15s
alerting:
alertmanagers:
- static_configs:
- targets: []
scheme: http
timeout: 10s
api_version: v1
scrape_configs:
- job_name: prometheus
honor_timestamps: true
scrape_interval: 15s
scrape_timeout: 10s
metrics_path: /metrics
scheme: http
static_configs:
- targets:
- localhost:9090
- job_name: springbootPrometheusGrafana
honor_timestamps: true
scrape_interval: 5s
scrape_timeout: 5s
metrics_path: /actuator/prometheus
scheme: http
static_configs:
- targets:
- 192.168.8.1:8080
访问SpringBoot的metrics_path: /actuator/prometheus
http://192.168.8.1:8080/actuator/prometheus
SpringBoot2.X&Prometheus使用的更多相关文章
- SpringBoot2配置prometheus浏览器访问404
背景:SpringBoot2的项目要配置 actuator + prometheus的健康检查,按照教程配置好之后再浏览器测试 http://localhost:port/prometheus 后40 ...
- SpringBoot2.x整合Prometheus+Grafana【附源码+视频】
图文并茂,新手入门教程,建议收藏 SpringBoot2.x整合Prometheus+Grafana[附源码+视频] 附源码+视频 目录 工程简介 简介 Prometheus grafana Spri ...
- Springboot2新特性概述
官方说明: https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.0-Release-Notes 起码 JDK 8 和支持 ...
- Grafana+Prometheus打造springboot监控平台
1. 环境 springboot 1.5.10.RELEASE Grafana 5.4.2 Prometheus 2.6.0 jdk 1.8 2.通过micrometer与springboot应用和p ...
- 基于Docker+Prometheus+Grafana监控SpringBoot健康信息
在微服务体系当中,监控是必不可少的.当系统环境超过指定的阀值以后,需要提醒指定的运维人员或开发人员进行有效的防范,从而降低系统宕机的风险.在CNCF云计算平台中,Prometheus+Grafana是 ...
- 基于Prometheus搭建SpringCloud全方位立体监控体系
前提 最近公司在联合运维做一套全方位监控的系统,应用集群的技术栈是SpringCloud体系.虽然本人没有参与具体基础架构的研发,但是从应用引入的包和一些资料的查阅大致推算出具体的实现方案,这里做一次 ...
- 基于Prometheus和Grafana的监控平台 - 环境搭建
相关概念 微服务中的监控分根据作用领域分为三大类,Logging,Tracing,Metrics. Logging - 用于记录离散的事件.例如,应用程序的调试信息或错误信息.它是我们诊断问题的依据. ...
- 第七模块 :微服务监控告警Prometheus架构和实践
119.监控模式分类~1.mp4 logging:日志监控,Logging 的特点是,它描述一些离散的(不连续的)事件. 例如:应用通过一个滚动的文件输出 Debug 或 Error 信息,并通过日志 ...
- 3W字干货深入分析基于Micrometer和Prometheus实现度量和监控的方案
前提 最近线上的项目使用了spring-actuator做度量统计收集,使用Prometheus进行数据收集,Grafana进行数据展示,用于监控生成环境机器的性能指标和业务数据指标.一般,我们叫这样 ...
随机推荐
- 1 .net中自定义事件的步骤
1 申明一个自定义的类并且继承事件的基类 public class ClientSocketModelConnectedEvent:EventArgs { private string param; ...
- Spring的核心jar包
Spring的主要jar包 四个核心jar包:beans.context.core.expression Spring AOP:Spring的面向切面编程,提供AOP(面向切面编程)的实现Spring ...
- 使用remix的solidity在线编译环境部署一个faucet合约
一.浏览器打开https://remix.ethereum.org 地址 点击"+"新建一个sol文件,命名为faucet.sol 然后在代码区输入solidity代码 选择相关插 ...
- Oracle11g adump目录下面.aud增长导致空间撑满无法删除导致CRS无法启动的解决方法
[root@node1 adump]# pwd /u01/app/oracle/admin/node/adump 大概有10000个文件 rm -rf * 屏幕显示: -bash: /bin/rm: ...
- java 发布订阅
https://www.cnblogs.com/coderdxj/p/9627310.html java 观察这模式(发布订阅模式) 观察者设计模式定义了对象间的一种一对多的组合关系,以便一个对象 ...
- Java 使用jsp和servlet实现验证码功能
验证码主要是为了防止我们的网站被有些人和黑客恶意攻击,比如我们网站的注册页面,如果我们在用户注册的时候不加上一个验证码框的话,别人就可以写一个脚本对你的网站进行恶意的注册,比如每分钟对你的网站进行n次 ...
- Fastjson转换json到带泛型的对象(如Map)报错解决
List<CategoryDTO> categoryList = null; String categoryStr = redisService.get(RedisKeyConstant. ...
- k8s认证与授权
认证用于身份鉴别,而授权则实现权限分派.k8s以插件化的方式实现了这两种功能,且分别存在多种可用的插件.另外,它还支持准入控制机制,用于补充授权机制以实现更精细的访问控制功能. 一.访问控制概述 ap ...
- 重新学习ESP32(零)之环境搭建——转载——windows平台
原文来自:https://www.makingfun.xyz/2018/09/18/esp32-hello-world/ 前言 前几天看到乐鑫的公众号推送了一篇文章,说是ESP8266最新的SDK风格 ...
- css 判断是iphone4s iphone5 加载不同样式
@media (device-height:480px) and (-webkit-min-device-pixel-ratio:2){/* 兼容iphone4/4s */ .class{}}@med ...