springboot 监控 Actuator
springboot 提供了对项目的监控功能。
1.首先添加依赖包
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-actuator -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
<version>2.1.3.RELEASE</version>
</dependency>
2.浏览器访问
http://127.0.0.1:8080/actuator/health 访问项目监控需要加前缀 /actuator

因为actuator默认只支持端点 /health、/info 所以访问 /env 会出现404页面。
3.配置端点
在application.properties中配置端点,
暴露部分端点
management.endpoints.web.exposure.include=info,health,beans,env
暴露所有端点
management.endpoints.web.exposure.include=*
不暴露beans端点
management.endpoints.web.exposure.exclude=beans
在上述配置中,首先使用 management.endpoints.web.exposure.include 暴露所有的端点,接着使用management.endpoints .web.exposure.exclud 排除 en 端点,这样就能够暴露除 env 外的所有 ctuator
端点了。
4.端点说明

5.端点其他配置
# Actuator 管理端口
management.server.port=8000
#暴露 有端
management.endpoints.web.exposure.include =女
#默认情况下 有端点都不启用,此时需要按需启用端点
management.endpoints.enabled-by-default=false
#启用端点 info
management.endpoint.info.enabled=true
#启用端点 beans
management.endpoint.beans.enabled=true
#启用端点 configprops
management.endpoint.configprops.enabled=true
#启用端点 env
management.endpont.env.enabled=true
#启用端点 health
management.endpoint.health.enabled=true
#启用端点 mappings
management.endpont.mappings.enabed=true
#启用端点 shutdown
management.endpoint.shutdown.enabled=true
# Actuator 端点前缀
management.endpoints.web.base -path=/manage
#将原来的 mappings 端点的请求路径修改为 urlMappings
management.endpoints.web.path-mapping.mappings=request_mappings
# Spring MVC 视图解析器配置
spring.mvc.view.prefix=/WEB-INF/jsp/
spring.mvc.view.suffix=.Jsp
springboot 监控 Actuator的更多相关文章
- SpringBoot系列: Actuator监控
Sprng Boot 2 actuator变动加大, 网上很多资料都都已经过期. ============================配置项============================ ...
- 【spring cloud】【spring boot】网管服务-->配置文件添加endpoints.enabled = false,SpringBoot应用监控Actuator使用的安全隐患
转载:https://xz.aliyun.com/t/2233 ==================================================================== ...
- SpringBoot集成Actuator监控管理
1.说明 本文详细介绍Spring Boot集成Actuator监控管理的方法, 基于已经创建好的Spring Boot工程, 然后引入Actuator依赖, 介绍监控管理相关功能的使用. Sprin ...
- springboot集成Actuator
Actuator监控端点,主要用来监控与管理. 原生端点主要分为三大类:应用配置类.度量指标类.操作控制类. 应用配置类:获取应用程序中加载的配置.环境变量.自动化配置报告等与SpringBoot应用 ...
- SpringBoot 之Actuator.
一.Actuator 介绍 Actuator 是 SpringBoot 项目中一个非常强大一个功能,有助于对应用程序进行监视和管理,通过 restful api 请求来监管.审计.收集应用的运行情况. ...
- Springboot监控之二:Spring Boot Admin对Springboot服务进行监控
概述 Spring Boot 监控核心是 spring-boot-starter-actuator 依赖,增加依赖后, Spring Boot 会默认配置一些通用的监控,比如 jvm 监控.类加载.健 ...
- SpringBoot 开启 Actuator
在生产环境中,需要实时或定期监控服务的可用性.spring-boot 的actuator(监控)功能提供了很多监控所需的接口.简单的配置和使用如下: 1.引入依赖: <dependency> ...
- SpringBoot集成actuator模块的基本使用
© 版权声明:本文为博主原创文章,转载请注明出处 1. 版本 SpringBoot:2.0.0.RELEASE 2. 集成 SpringBoot集成actuator模块非常简单,只需要引入actuat ...
- SpringBoot入门教程(十)应用监控Actuator
Actuator可能大家非常熟悉,它是springboot提供对应用自身监控,以及对应用系统配置查看等功能.spring-boot-starter-actuator模块的实现对于实施微服务的中小团队来 ...
随机推荐
- JVM活学活用——调优工具
概述 工具做为图形化界面来展示更能直观的发现问题,另一方面一些耗费性能的分析(dump文件分析)一般也不会在生产直接分析,往往dump下来的文件达1G左右,人工分析效率较低,因此利用工具来分析jvm相 ...
- Powershell渗透测试系列–进阶篇
原文来自:https://bbs.ichunqiu.com/thread-41561-1-1.html i春秋作家:anyedt 0×00 引言 经过基础篇的学习我们已经对powershell有了一个 ...
- JavaScript在IE和Firefox的不兼容问题解决方法总结
1.兼容Firefox的 outerHTML,Firefox中没有outerHtml的方法. if (window.HTMLElement) { HTMLElement.prototype.__def ...
- Swift5 语言指南(一) 关于Swift
Swift是编写软件的绝佳方式,无论是用于手机,台式机,服务器还是其他任何运行代码的软件.它是一种安全,快速,交互式的编程语言,它将现代语言思维的最佳结合与来自更广泛的Apple工程文化的智慧和来自开 ...
- 机器学习基石笔记:12 Nonlinear Transformation
一.二次假设 实际上线性假设的模型复杂度是受到限制的, 需要高次假设打破这个限制. 假设数据不是线性可分的,但是可以被一个圆心在原点的圆分开, 需要我们重新设计基于该圆的PLA等算法吗? 不用, 只需 ...
- HoloLens开发手记 - HoloLens真机上手简评
千呼万唤始出来,终于今天拿到了HoloLens真机. 使用体验 使用自带的应用录制了一段使用视频,如下 设备概览 包装盒 本体 试戴 实际效果 GalaxyExplorer试玩 全息图像贴到现实场景表 ...
- Eruda 一个被人遗忘的调试神器
Eruda 一个被人遗忘的调试神器 引言 日常工作中再牛逼的大佬都不敢说自己的代码是完全没有问题的,既然有问题,那就也就有调试,说到调试工具,大家可能对于 fiddler.Charles.chro ...
- 51Node 1051---最大子矩阵和
题目链接 一个M*N的矩阵,找到此矩阵的一个子矩阵,并且这个子矩阵的元素的和是最大的,输出这个最大的值. 例如:3*3的矩阵: -1 3 -1 2 -1 3 -3 1 2 和最大的子矩阵是 ...
- redis cluster集群web管理工具 relumin
redis cluster集群web管理工具 relumin 下载地址 https://github.com/be-hase/relumin 只支持redis cluster模式 java环境 tar ...
- Linux编程 1 (文件系统路径说明, 目录结构说明)
一. Linux文件系统路径说明 熟悉windows系统的,都知道文件路径表示,如C:\User\rich\Documnets\test.doc. 在linux中目录称为虚拟目录(virtual di ...