zoukankan      html  css  js  c++  java
  • actuator服务实战

    1. actuator服务实战

    1.1. 前言

    1. actuator默认集成了很多端点查看,这里我会挑选也用到可能性大些的

    1.2. Endpoints

    1.2.1. 使用方式

    1. 开启服务后,直接访问:localhost:8080/actuator/health,最后个单词换成端点的任意一个单词

    1.2.2. 端点

    1. beans 显示应用spring beans的完整列表
    2. conditions自动装配的类信息,一般情况下也不会用到,研究源码时可以参考下
    3. env显示环境变量
    4. metrics当前应用的metrics信息
    5. mappings当前应用的@RequestMapping 路径集列表
    6. scheduledtasks当前应用的定时任务列表
    7. httptrace显示http跟踪信息,默认显示最后100个Http请求-响应交换

    1.3. 注意点

    1. 如下是我的配置例子
    info.author=lll
    info.company=xxx公司
    info.java_version=${java.version}
    
    # 端点检查
    management.endpoints.web.exposure.include=*
    management.endpoint.health.show-details=always
    management.endpoint.shutdown.enabled=false
    
    1. 这里很多资料是用'*'来表示include的值,我实际测试,至少在application.properties文件中是不行的,会导致所有端点都失效,需要改用直接*号

    参考博客:
    https://www.cnblogs.com/baidawei/p/9183531.html 基础,自定义端点
    https://blog.csdn.net/alinyua/article/details/80009435

  • 相关阅读:
    curl continue
    actor
    nginx
    jmx additional port
    diff
    lsof
    zk reconnect
    Python:Python基础(一)
    Python:初识Python(二)
    Python:初识Python(一)
  • 原文地址:https://www.cnblogs.com/sky-chen/p/10813612.html
Copyright © 2011-2022 走看看