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使用的更多相关文章

  1. SpringBoot2配置prometheus浏览器访问404

    背景:SpringBoot2的项目要配置 actuator + prometheus的健康检查,按照教程配置好之后再浏览器测试 http://localhost:port/prometheus 后40 ...

  2. SpringBoot2.x整合Prometheus+Grafana【附源码+视频】

    图文并茂,新手入门教程,建议收藏 SpringBoot2.x整合Prometheus+Grafana[附源码+视频] 附源码+视频 目录 工程简介 简介 Prometheus grafana Spri ...

  3. Springboot2新特性概述

    官方说明: https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.0-Release-Notes 起码 JDK 8 和支持 ...

  4. Grafana+Prometheus打造springboot监控平台

    1. 环境 springboot 1.5.10.RELEASE Grafana 5.4.2 Prometheus 2.6.0 jdk 1.8 2.通过micrometer与springboot应用和p ...

  5. 基于Docker+Prometheus+Grafana监控SpringBoot健康信息

    在微服务体系当中,监控是必不可少的.当系统环境超过指定的阀值以后,需要提醒指定的运维人员或开发人员进行有效的防范,从而降低系统宕机的风险.在CNCF云计算平台中,Prometheus+Grafana是 ...

  6. 基于Prometheus搭建SpringCloud全方位立体监控体系

    前提 最近公司在联合运维做一套全方位监控的系统,应用集群的技术栈是SpringCloud体系.虽然本人没有参与具体基础架构的研发,但是从应用引入的包和一些资料的查阅大致推算出具体的实现方案,这里做一次 ...

  7. 基于Prometheus和Grafana的监控平台 - 环境搭建

    相关概念 微服务中的监控分根据作用领域分为三大类,Logging,Tracing,Metrics. Logging - 用于记录离散的事件.例如,应用程序的调试信息或错误信息.它是我们诊断问题的依据. ...

  8. 第七模块 :微服务监控告警Prometheus架构和实践

    119.监控模式分类~1.mp4 logging:日志监控,Logging 的特点是,它描述一些离散的(不连续的)事件. 例如:应用通过一个滚动的文件输出 Debug 或 Error 信息,并通过日志 ...

  9. 3W字干货深入分析基于Micrometer和Prometheus实现度量和监控的方案

    前提 最近线上的项目使用了spring-actuator做度量统计收集,使用Prometheus进行数据收集,Grafana进行数据展示,用于监控生成环境机器的性能指标和业务数据指标.一般,我们叫这样 ...

随机推荐

  1. git clone ssh 时出现 fatal: Could not read from remote repository

    一.问题及解决办法参考: 在 ubuntu 中,要把 GitHub 上的储存库克隆到计算机上时,执行如下命令: git clone git@github.com:USER-NAME/REPOSITOR ...

  2. Java虚拟机-------垃圾回收机机制

    概述 jvm中的堆图 在了解 垃圾回收器 之前,首先得了解一下垃圾回收器的几个名词. 1. 吞吐量CPU 用于运行用户代码的时间与 CPU 总消耗时间的比值.比如说虚拟机总运行了 100 分钟,用户代 ...

  3. golang实现RSA加密解密

    非对称加密示意图: 在此可以看到,非对称加密是通过两个密钥(公钥-私钥)来实现对数据的加密和解密的.公钥用于加密,私钥用于解密. RSA公钥和私钥生成: package main import ( & ...

  4. php三种排序算法

    1. <?php /** * 快速排序不费空间也节省时间 */ $arr=array(5,1,8,2,6,4,9,3,7); // $arr=array(1,2,3,4,5,6,7,8,9); ...

  5. SpringBoot-整合Swagger2

    swagger2是一个用于生成.并能直接调用的可是话restful风格的服务 下面贴出springboot整合swagger2代码 一.maven依赖 这里使用的spring-boot版本是2.1.1 ...

  6. 【异常】hue:unknown database hue

    1 hue error日志报错,找不到hue数据库 2 解决办法 删除hue服务,重新添加,再次在添加database阶段验证密码,test通过,再继续. 还有造成这个事情的原因,是自己移动了mysq ...

  7. windows控制台,cmd,命令提示符下的基础操作

    打开dos命令窗口1.win+r-->运行-->cmd 2.摁住shift+鼠标右击 选择 在此处打开命令窗口3.在磁盘某文件夹下,选择标题栏中输入框,输入cmd 回车 windows下常 ...

  8. 通过WSL使用rsync同步本文件

    1.安装WLS 主要参考Windows10上使用Linux子系统(WSL)这篇文章进行安装,不要通过lxrun /install /y去安装,这种方法安装貌似没有wsl命令. 先把win 10 版本升 ...

  9. Hive优化(十一)

    Hive优化 ​ Hive的存储层依托于HDFS,Hive的计算层依托于MapReduce,一般Hive的执行效率主要取决于SQL语句的执行效率,因此,Hive的优化的核心思想是MapReduce的优 ...

  10. 深圳即将启动首届「全国人工智能大赛」:超过 500 万大奖 & 政府资助,潜信息你读懂了吗!

    人工智能加速“视频/视觉”发展,近期,深圳市即将迎来人工智能领域权威赛事之一——首届「全国人工智能大赛」(The First National Artificial Intelligence Chal ...