使用Spring Boot Actuator 监控程序运行状态
2.X版本Spring Boot Actuator的使用
1、maven依赖
<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-actuator</artifactId> </dependency>
2、application.yml配置
server:port: 8762 management:endpoints:web:exposure:include: "*"endpoint:health:show-details: ALWAYS
对于几个配置的说明: management:endpoints:enabled-by-default: false # 禁用所有端点
management:endpoints:web:exposure:exclude: env # 禁用运行环境信息
3、访问 http://127.0.0.1:8762/actuator ,可以看到Actuator 端点列表
{"_links":{"self":{"href":"http://localhost:8762/actuator","templated":false},"archaius":{"href":"http://localhost:8762/actuator/archaius","templated":false},"auditevents":{"href":"http://localhost:8762/actuator/auditevents","templated":false},"beans":{"href":"http://localhost:8762/actuator/beans","templated":false},"caches-cache":{"href":"http://localhost:8762/actuator/caches/{cache}","templated":true},"caches":{"href":"http://localhost:8762/actuator/caches","templated":false},"health":{"href":"http://localhost:8762/actuator/health","templated":false},"health-component":{"href":"http://localhost:8762/actuator/health/{component}","templated":true},"health-component-instance":{"href":"http://localhost:8762/actuator/health/{component}/{instance}","templated":true},"conditions":{"href":"http://localhost:8762/actuator/conditions","templated":false},"shutdown":{"href":"http://localhost:8762/actuator/shutdown","templated":false},"configprops":{"href":"http://localhost:8762/actuator/configprops","templated":false},"env":{"href":"http://localhost:8762/actuator/env","templated":false},"env-toMatch":{"href":"http://localhost:8762/actuator/env/{toMatch}","templated":true},"info":{"href":"http://localhost:8762/actuator/info","templated":false},"loggers":{"href":"http://localhost:8762/actuator/loggers","templated":false},"loggers-name":{"href":"http://localhost:8762/actuator/loggers/{name}","templated":true},"heapdump":{"href":"http://localhost:8762/actuator/heapdump","templated":false},"threaddump":{"href":"http://localhost:8762/actuator/threaddump","templated":false},"metrics":{"href":"http://localhost:8762/actuator/metrics","templated":false},"metrics-requiredMetricName":{"href":"http://localhost:8762/actuator/metrics/{requiredMetricName}","templated":true},"scheduledtasks":{"href":"http://localhost:8762/actuator/scheduledtasks","templated":false},"httptrace":{"href":"http://localhost:8762/actuator/httptrace","templated":false},"mappings":{"href":"http://localhost:8762/actuator/mappings","templated":false},"refresh":{"href":"http://localhost:8762/actuator/refresh","templated":false},"restart":{"href":"http://localhost:8762/actuator/restart","templated":false},"pause":{"href":"http://localhost:8762/actuator/pause","templated":false},"resume":{"href":"http://localhost:8762/actuator/resume","templated":false},"features":{"href":"http://localhost:8762/actuator/features","templated":false},"service-registry":{"href":"http://localhost:8762/actuator/service-registry","templated":false},"jolokia":{"href":"http://localhost:8762/actuator/jolokia","templated":false}}}
4、对几个端点的说明
beans,应用中beans的关系列表
health,健康指标
env,环境变量
使用Spring Boot Actuator 监控程序运行状态相关推荐
- 警惕 Spring Boot Actuator 引发的安全问题
前言 一年一度的 HW 行动开始了,最近也是被各种安全漏洞搞的特别闹心,一周能收到几十封安全团队扫描出来的漏洞邮件,这其中有一类漏洞很容易被人忽视,但影响面却极广,危害也极大,我说出它的名字你应该也不 ...
- (转)Spring Boot (十九):使用 Spring Boot Actuator 监控应用
http://www.ityouknow.com/springboot/2018/02/06/spring-boot-actuator.html 微服务的特点决定了功能模块的部署是分布式的,大部分功能 ...
- 朱晔和你聊Spring系列S1E7:简单好用的Spring Boot Actuator
本文会来看一下Spring Boot Actuator提供给我们的监控端点Endpoint.健康检查Health和打点指标Metrics等所谓的Production-ready(生产环境必要的一些)功 ...
- actuator的原理_使用Spring Boot Actuator监视Java应用程序
actuator的原理 朋友不允许朋友写用户身份验证. 厌倦了管理自己的用户? 立即尝试Okta的API和Java SDK. 数分钟之内即可在任何应用程序中对用户进行身份验证,管理和保护. 您是否曾与 ...
- 如何将 Spring Boot Actuator 的指标信息输出到 InfluxDB 和 Prometheus
来源:SpringForAll社区 Spring Boot Actuator是Spring Boot 2发布后修改最多的项目之一.它经过了主要的改进,旨在简化定制,并包括一些新功能,如支持其他Web技 ...
- Spring Boot Actuator
https://www.baeldung.com/spring-boot-actuators 1. Overview In this article, we're going to introduce ...
- spring boot actuator工作原理之http服务暴露源码分析
spring boot actuator的官方文档地址:https://docs.spring.io/spring-boot/docs/current/reference/html/productio ...
- 使用Spring Boot Actuator、Jolokia和Grafana实现准实时监控--转
原文地址:http://mp.weixin.qq.com/s?__biz=MzAxODcyNjEzNQ==&mid=2247483789&idx=1&sn=ae11f04780 ...
- spring Boot Actuator使用
spring Boot Actuator使用 Spring Boot 的 Actuator 提供了很多生产级的特性,比如监控和度量Spring Boot 应用程序. 官网参考文档Spring Boot ...
最新文章
- python的服务器、客户端被拒绝访问_python – uWSGI服务器日志…权限被拒绝读取......
- 吴恩达深度学习笔记(114)-RNN梯度消失问题详解
- Power Shell 使用图解2
- 《图解HTTP》读书笔记--第5章与HTTP协作的Web服务器
- 人人都是 DBA(XII)查询信息收集脚本汇编
- SQL语句实现两个数据库表直接操作
- (99)FPGA单沿和双沿采样(上升沿采样)
- IEEE Signal Processing Letters
- coco 数据集_PyTorch版YOLOv4更新了,适用于自定义数据集
- mysql做一个邮箱_php+mysql 做一个注册页面 注册成功后给用户邮箱发一份确认邮件,发送邮件的代码怎么加到下面的代码里了...
- Github 源码阅读神器:Octotree
- [Google] 再见 SharedPreferences 拥抱 Jetpack DataStore
- html调查问卷页面,html+js 问卷调查页面的展示以及form提交
- 通过tasker实现朗读微信QQ文字消息
- TTL232和RS232的区别
- debian7 软件源更新
- 蓝桥杯试题 算法训练 印章
- 穷人和富人的差别在哪里
- 副业案例-晴矢分享 短视频MCN亏损500W的总结的血泪经验
- 陈老师排课软件12A(正式版)
热门文章
- 使用PyCharm运行第一行python代码
- JS面试之对象(2)
- iOS URL Schemes与漏洞的碰撞组合
- shell 使用eval重新计算变量的变量
- 构建项目时发生错误 - 错误:CS0006“... \ Assembly-CSharp-firstpass.dll”找不到
- 开始工业物联网项目需要考虑的八大要点
- [51单片机] 定时器3-计时示例
- 运维之我的docker-Dockerfile构建镜像详情
- Java之开发工具(1) - Eclipse 如何设置注释的模板
- NAC、NAP及TNC安全接入技术对比分析