Spring Boot Actuator的关键特性是在应用程序里提供众多Web端点,通过它们了解应用程序 运行时的内部状况。有了Actuator,你可以知道Bean在Spring应用程序上下文里是如何组装在一起的,掌握应用程序可以获取的环境属性信息,获取运行时度量信息的快照……

  

  Actuator提供13个端点,可以分为三大类:配置端点、度量端点和其他端点。具体如下表所示:

Http方法 路径 描述
get /autoconfig 提供了一份自动配置报告,记录哪些自动配置条件通过了,哪些没通过
get /configprops 描述配置属性(包含默认值)如何注入Bean
get /beans 描述应用程序上下文里全部的Bean,以及它们的关系
get /dump 获取线程活动的快照
get /env 获取全部环境属性
get /env/{name} 根据名称获取特定的环境属性值
get /health 报告应用程序的健康指标,这些值由 HealthIndicator 的实现类提供
get /info 获取应用程序的定制信息,这些信息由 info 打头的属性提供
get /mappings 描述全部的URI路径,以及它们和控制器(包含Actuator端点)的映射关系
get /metrics 报告各种应用程序度量信息,比如内存用量和HTTP请求计数
get /metrics/{name} 报告指定名称的应用程序度量值
post /shutdown 关闭应用程序,要求 endpoints.shutdown.enabled 设置为 true
get /trace 提供基本的HTTP请求跟踪信息(时间戳、HTTP头等)

  

  要启用Actuator的端点,只需在项目中引入Actuator的起步依赖即可。

  在Gradle构建说明文件里,这个依赖是这样的:

compile 'org.springframework.boot:spring-boot-starter-actuator'

  

  对于Maven项目,引入的依赖是这样的:

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>

  

  亦或你使用Spring Boot CLI,可以使用如下 @Grab 注解:

@Grab('spring-boot-starter-actuator')

Spring Boot Actuator的端点的更多相关文章

  1. spring boot actuator端点高级进阶metris指标详解、git配置详解、自定义扩展详解

    https://www.cnblogs.com/duanxz/p/3508267.html 前言 接着上一篇<Springboot Actuator之一:执行器Actuator入门介绍>a ...

  2. springboot(十九):使用Spring Boot Actuator监控应用

    微服务的特点决定了功能模块的部署是分布式的,大部分功能模块都是运行在不同的机器上,彼此通过服务调用进行交互,前后台的业务流会经过很多个微服务的处理和传递,出现了异常如何快速定位是哪个环节出现了问题? ...

  3. 使用Spring Boot Actuator、Jolokia和Grafana实现准实时监控

    由于最近在做监控方面的工作,因此也读了不少相关的经验分享.其中有这样一篇文章总结了一些基于Spring Boot的监控方案,因此翻译了一下,希望可以对大家有所帮助. 原文:Near real-time ...

  4. spring boot actuator专题

    spring-boot-starter-actuator模块的实现对于实施微服务的中小团队来说,可以有效地减少监控系统在采集应用指标时的开发量.当然,它也并不是万能的,有时候我们也需要对其做一些简单的 ...

  5. 使用Spring Boot Actuator将指标导出到InfluxDB和Prometheus

    使用Spring Boot Actuator将指标导出到InfluxDB和Prometheus   Spring Boot Actuator是Spring Boot 2发布后修改最多的项目之一.它经过 ...

  6. (转)Spring Boot (十九):使用 Spring Boot Actuator 监控应用

    http://www.ityouknow.com/springboot/2018/02/06/spring-boot-actuator.html 微服务的特点决定了功能模块的部署是分布式的,大部分功能 ...

  7. 朱晔和你聊Spring系列S1E7:简单好用的Spring Boot Actuator

    阅读PDF版本 本文会来看一下Spring Boot Actuator提供给我们的监控端点Endpoint.健康检查Health和打点指标Metrics等所谓的Production-ready(生产环 ...

  8. Spring Boot Actuator 使用

    转载于:https://www.jianshu.com/p/af9738634a21 Spring Boot 的 Actuator 提供了很多生产级的特性,比如监控和度量Spring Boot 应用程 ...

  9. Spring Boot Actuator监控应用

    微服务的特点决定了功能模块的部署是分布式的,大部分功能模块都是运行在不同的机器上,彼此通过服务调用进行交互,前后台的业务流会经过很多个微服务的处理和传递,出现了异常如何快速定位是哪个环节出现了问题? ...

随机推荐

  1. oracle ocp视频教程笔记

    show parameter user user_dump_dest  string  /u01/app/oracle/diag/rdbms/orcl/orcl/trace oracle日志存放位置d ...

  2. E. Binary Numbers AND Sum

    链接 [http://codeforces.com/contest/1066/problem/E] 题意 给你长度分别为n,m的二进制串,当b>0时,对a,b,&运算,然后b右移一位,把 ...

  3. Machine Learning Based Proactive Flow Entry Deletion for OpenFlow

    来源:IEEE 2018 作者:Hemin Yang and George F.Riley 摘要: 流表容量有限,因此高效管理流表至关重要.本文重点讨论了OpenFlow中定义的一种流表管理机制,即能 ...

  4. Angular 简单的Post

    <!DOCTYPE html><html ng-app="myApp"><head lang="en"> <meta ...

  5. ionic3.x开发小坑记录(一)

    自定义font的时候,在assets中创建的文件夹名字别用fonts,会与ionic默认样式冲突,在浏览器中调试是正常的,到手机上就出问题了. 在html中写img的src直接如图  assets前面 ...

  6. springMVC 使用WebApplicationContext获取ApplicationContext对象

    主要用于从application中获取bean 1.applicationContext 在web.xml中使用listener配置 <context-param> <param-n ...

  7. jetty 介绍以及小例子

    Jetty 是一个开源的servlet容器,它为基于Java的web容器,例如JSP和servlet提供运行环境.Jetty是使用Java语言编写的,它的API以一组JAR包的形式发布.开发人员可以将 ...

  8. Test Scenarios for Excel Export functionality

    1 File should get exported in proper file extension2 File name for the exported excel file should be ...

  9. delphi创建动态菜单

    1.动态生成菜单项 varFirstItem: TMenuItem;SecondItem: TMenuItem; begin FirstItem := TMenuItem.Create(Self); ...

  10. Java之多线程(实现Runnable接口)

    package test_demo.ThreadsDemo; public class TestRunnable { public static void main(String[] args) { ...