当前位置: 首页 > news >正文

玩转springboot之springboot项目监测

项目监测

springboot中提供了actuator项目来进行监测和度量

基于springboot2.x版本

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

actuator中提供了多个端点来对springboot项目进行监测

可以访问http://{ip}:{port}/actuator/{endpoint} 端点来进行访问

  • actuator/archaius
  • actuator/beans 列出应用中的所有bean
  • actuator/caches
  • actuator/caches/{cache}
  • actuator/health 应用健康检查,实现了HealthIndicator,有UP、DOWN、OUTOFSERVICE、UNKNOWN,如果需要查看详情,需要配置 management.endpoint.health.show-details
  • actuator/health/{*path}
  • actuator/info 列出应用信息,在配置中以info开头的配置,实现了InfoContributor接口的配置类
  • actuator/conditions 显示自动配置信息
  • actuator/configprops 显示所有@ConfigurationProperties的配置属性列表
  • actuator/env 列出应用中的配置
  • actuator/env/{toMatch}
  • actuator/loggers/{name}
  • actuator/loggers
  • actuator/heapdump 堆快照
  • actuator/threaddump 线程快照
  • actuator/metrics/{requiredMetricName}
  • actuator/metrics 显示应用度量标准信息
  • actuator/scheduledtasks 列出应用中的定时任务
  • actuator/mappings 列出所有的地址映射
  • actuator/refresh
  • actuator/features
  • actuator/service-registry

如果想要暴露所有的端点,则需要配置暴露所有

management:endpoints:web:   #使用http访问端点暴露,默认根路径是actuator,可以使用base-path来配置exposure:include: '*'  #暴露所有端点exclude: env,mappings  #排除某些端点

https://zhhll.icu/2021/框架/springboot/基础/13.项目监测/

本文由mdnice多平台发布



喜欢的朋友记得点赞、收藏、关注哦!!!


http://www.mrgr.cn/news/56182.html

相关文章:

  • qt QOperatingSystemVersion详解
  • OceanBase 2024 年度发布会|收好这份参会指南
  • 离线配置安装mysql5.7主从同步数据库配置手册-亲测完美
  • firewalld 防火墙常用命令
  • OpenCV的常用与形状形状描述相关函数及用法示例
  • JavaScript数据类型的转换
  • 关于检索评价的一份介绍
  • java使用枚举类存常量字典值
  • 【Qt】控件——Qt输入类控件、常见的输入类控件、输入类控件的使用、Line Edit、Text Edit、Combo Box、Spin Box
  • 《地下蚁国》风灵月影十项修改器使用教程
  • LLM 量化新篇章:FlatQuant 的平坦之道
  • HTMX 和 WebStencils 白皮书
  • gazebo显示urdf
  • 三部门联合推铁路电子客票,百望云率先完成产品配置,助力财务服务数智化升级
  • 安达发|家电组装多厂协同APS计划排程软件介绍
  • 网关挂了服务还能正常运行吗?
  • Spring Boot 3.3 【八】整合实现高可用 Redis 集群
  • 【1024程序员节】如何快速掌握人工智能技术技能
  • 【人工智能】Transformers之Pipeline(二十):令牌分类(token-classification)
  • “销量飞跃秘籍:打造吸引力销售网络与革新招商策略“
  • MyHdfs代码分享
  • Codeforces Round 974 (Div. 3) F. Sheriff‘s Defense(树形DP)
  • 最佳简历--JAVA程序员的项目经验如何写
  • Linux 基础目录与命令操作
  • 创建型模式-----(单例模式)
  • 数据仓库-维度表和事实表