玩转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 多平台发布

相关推荐

  1. springbootspringboot项目监测

    2024-07-10 20:38:05       10 阅读
  2. springbootSpringApplicationRunListener

    2024-07-10 20:38:05       8 阅读
  3. springbootSpringBoot单元测试

    2024-07-10 20:38:05       11 阅读
  4. springbootSpringBoot使用jsp

    2024-07-10 20:38:05       9 阅读
  5. springbootspringboot启动原理

    2024-07-10 20:38:05       5 阅读
  6. springbootxxxRunner接口使用

    2024-07-10 20:38:05       9 阅读
  7. springbootspringboot定制化tomcat

    2024-07-10 20:38:05       15 阅读
  8. springbootspringboot使用外置tomcat进行运行

    2024-07-10 20:38:05       8 阅读
  9. SpringBoot项目管理

    2024-07-10 20:38:05       42 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-07-10 20:38:05       5 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-07-10 20:38:05       5 阅读
  3. 在Django里面运行非项目文件

    2024-07-10 20:38:05       4 阅读
  4. Python语言-面向对象

    2024-07-10 20:38:05       7 阅读

热门阅读

  1. 【LeetCode】每日一题:跳跃游戏 II

    2024-07-10 20:38:05       10 阅读
  2. Python面试题: 如何在 Python 中实现一个线程池?

    2024-07-10 20:38:05       12 阅读
  3. js时间转成xx前

    2024-07-10 20:38:05       10 阅读
  4. stm32基本定时器

    2024-07-10 20:38:05       9 阅读
  5. Kithara常见问题解答

    2024-07-10 20:38:05       9 阅读
  6. 数学,LeetCode 3102. 最小化曼哈顿距离

    2024-07-10 20:38:05       11 阅读
  7. Linux C++ 044-设计模式简介

    2024-07-10 20:38:05       12 阅读
  8. ffmpeg frequently use commands

    2024-07-10 20:38:05       13 阅读
  9. Unity3D中使用并行的Job完成筛选类任务详解

    2024-07-10 20:38:05       9 阅读
  10. Hash算法和MD5容易受到冲突攻击的原因

    2024-07-10 20:38:05       11 阅读