企业🤖AI Agent构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
## 如何使用 1、添加依赖 完整pom.xml 如下 ~~~ <!-- SpringBoot Web --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <!-- SpringBoot Actuator --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency> ~~~ 2、在`application.yml`配置暴露所有监控端点 ~~~ management: endpoints: web: exposure: include: '*' ~~~ 3、监控启动类 ~~~ /** * 功能说明:监控服务启动类 * 创建人: lihaijun * 创建时间:2019-10-18 */ @SpringBootApplication @EnableAdminServer public class MonitorApplication { public static void main(String[] args) { SpringApplication.run(MonitorApplication.class, args); System.out.println("监控中心启动成功..........." ); } } ~~~ 4、启动后访问`http://localhost:9100/actuator`,返回正确数据表示测试通过。 ## 端点分类 | 地址 | 描述 | | --- | --- | | /beans | 显示所有的`Spring bean`列表 | | /caches | 显示所有的缓存相关信息 | | /scheduledtasks | 显示所有的定时任务相关信息 | | /loggers | 显示所有的日志相关信息 | | /configprops | 显示所有的配置信息 | | /env | 显示所有的环境变量信息 | | /mappings | 显示所有控制器相关信息 | | /info | 显示自定义用户信息配置 | | /metrics | 显示应用指标相关信息 | | /health | 显示健康检查状态信息,`up`表示成功 `down`表示失败 | | /threaddump | 显示程序线程的信息 |