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进行数据展示,用于监控生成环境机器的性能指标和业务数据指标.一般,我们叫这样 ...
随机推荐
- 5、SVN 权限管理
5.SVN 权限管理 5.1版本库中三个对应的配置文件 版本库配置文件目录 /var/svn/repository/pro_oa/conf svnserve.conf 文件,如下修改: 19# ano ...
- 如何使windows7的默认共享可以被访问[转载]
因为UAC的存在, 如果使用windows 7 的默认共享,比如 \abcc$ ,会被提示 无权限错误. 为了方便在局域网共享文件,找到了这个方法. Open the registry edi ...
- Linux下pwn从入门到放弃
Linux下pwn从入门到放弃 0x0 简介 pwn,在安全领域中指的是通过二进制/系统调用等方式获得目标主机的shell. 虽然web系统在互联网中占有比较大的分量,但是随着移动端,ioT的逐渐流行 ...
- Jquery实现类似百度的搜索框
最近工作中需要做一个搜索框,类似百度的搜索框,需要达到两个功能: 1.输入关键字,展示匹配的下拉列表 2.选择匹配的项后查出相关内容 一般电商网站中也经常用到该搜索条,首先分析功能实现,输入关键字马上 ...
- Windows 端口占用查询
1.Windows平台 在windows命令行窗口下执行: 1.查看所有的端口占用情况 C:\>netstat -ano 协议 本地地址 外部地址 ...
- Java语言基础(13)
1 继承(二) 案例:Demo1 public class Demo1 { public static void main(String[] args) { Bmw bmw = new Bmw(); ...
- 第六章 组件 67 使用ref获取DOM元素和组件引用
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8&quo ...
- JS 数组相关的操作函数
// 1.数组拼接 concat() var a = [1, 2]; var b = [3, 4]; console.log(a.concat(b)); // [1, 2, 3, 4] // 2.数组 ...
- 数据管理必看!Kendo UI for jQuery过滤器状态保持
Kendo UI for jQuery最新试用版下载 Kendo UI目前最新提供Kendo UI for jQuery.Kendo UI for Angular.Kendo UI Support f ...
- Linux的SSH免密登录(一)
1.从cp/scp命令出发 scp(secure copy)是linux系统下基于ssh登录进行安全的远程文件拷贝的命令. 1. 传递文件到远程 scp local_file remote_usern ...