Spring Boot Actuator监控

1、简介

   spring boot有四大杀器:starters、autoConfiguration、cli、actuator。actuator是springboot对应用的监控组件,可以查看应用系统的配置、资源使用等统计功能。

2、actuator主要功能

HTTP方法

路径

描述

鉴权

默认可以用

备注

GET

/autoconfig

查看自动配置的使用情况

true

true

 

GET

/configprops

查看配置属性,包括默认配置

true

true

 

GET

/beans

查看bean及其关系列表

true

true

 

GET

/dump

打印线程栈

true

true

 

GET

/env

查看所有环境变量

true

true

 

GET

/env/{name}

查看具体变量值

true

true

 

GET

/health

查看应用健康指标

false

true

 

GET

/info

查看应用信息

false

true

自定义info:

GET

/mappings

查看所有url映射

true

true

 

GET

/metrics

查看应用基本指标

true

true

 

GET

/metrics/{name}

查看具体指标

true

true

 

POST

/shutdown

关闭应用

true

false

需配置enabled: true

GET

/trace

查看基本追踪信息

true

true

 

3、management配置

        management.port:指定方位如上方法的端口号,与业务端口号相分离。若不想如上接口暴露在http中,设置 management.port = -1

        management.address:指定访问地址

点赞
收藏

评论区

加载中...

相关推荐

MySQL:[Err] 1292 - Incorrect datetime value: ‘0000-00-00 00:00:00‘ for column ‘CREATE_TIME‘ at row 1

文章目录问题用navicat导入数据时,报错:原因这是因为当前的MySQL不支持datetime为0的情况。解决修改sql\mode:sql\mode:SQLMode定义了MySQL应支持的SQL语法、数据校验等,这样可以更容易地在不同的环境中使用MySQL。全局s

Oracle 分组与拼接字符串同时使用

SELECTT.,ROWNUMIDFROM(SELECTT.EMPLID,T.NAME,T.BU,T.REALDEPART,T.FORMATDATE,SUM(T.S0)S0,MAX(UPDATETIME)CREATETIME,LISTAGG(TOCHAR(

MySQL部分从库上面因为大量的临时表tmp_table造成慢查询

背景描述Time:20190124T00:08:14.70572408:00User@Host:@Id:Schema:sentrymetaLast_errno:0Killed:0Query_time:0.315758Lock_

手写Java HashMap源码

HashMap的使用教程HashMap的使用教程HashMap的使用教程HashMap的使用教程HashMap的使用教程22

SpringBoot之actuator

在springBoot中集成actuator可以很方便的管理和监控应用的状态。暴露的Restful接口有:HTTP方法路径描述鉴权GET/autoconfig查看自动配置的使用情况trueGET/configprops查看配置属性,包括默认配置trueGET/beans查看bean及其关系列表

SpringBoot2.0使用health

1,引入actuator<dependency<groupIdorg.springframework.boot</groupId<artifactIdspringbootstarteractuator</artifactId</dependency2,application.prop