26得票3回答
给所有Spring Boot actuator端点添加前缀

有没有一种简单的方法为所有执行器端点添加前缀?/env -> /secure/env /health -> /secure/health /info -> /secure/info ...

22得票15回答
Spring Boot /actuator 返回404未找到

我正在使用spring boot2.1.4.RELEASE,并尝试访问http://localhost:8080/actuator,但我得到了404未找到的错误。我不确定我的做法有什么问题。以下是我的pom依赖项- <?xml version="1.0" encoding="UTF-8"...

22得票1回答
如何以编程方式从Spring Boot Actuator获取指标?

我们在生产中有一个Spring应用程序,但它不是Spring Boot。我发现了这篇文章,介绍了如何在非Spring Boot应用程序中使用Spring Boot Actuator。 然而,我们的需求是从"/metrics"端点聚合数据,并对其进行一些分析并报告状态指示器。 例如,我们可能...

21得票2回答
Spring Boot - 将 /health 端点的位置更改为 /ping/me

我将endpoints.health.path属性设置为/ping/me,但我无法使用http://localhost:9000/ping/me访问端点,只有http://localhost:9000/health有效。我漏掉了什么? 这是应用程序属性文件中的代码。#Configuration...

21得票2回答
Micrometer中计数器指标的动态标签值

新手在这里,试图了解更多有关千分尺的知识。我目前正在探索以下方法: 我正在使用启用了actuator和micrometer的Spring boot 2。考虑以下类:@Component class MyService { @Autowired AuthorizeTransaction...

20得票2回答
将Spring Boot Actuator健康检查端点更改为自定义端点

是否可以将Spring Boot Actuator的健康端点更改为自定义端点?像下面这样: http://localhost:8080/actuator/health 改为 http://localhost:8080/myapp/apphealth 只需更改名称而不更改actuator...

19得票11回答
指定端口时,Spring Boot Actuator端点的单元测试无法正常工作

最近我更改了Spring Boot属性以定义管理端口,但这样做后,我的单元测试就开始失败了:( 我编写了一个单元测试来测试/metrics端点,如下所示:@RunWith (SpringRunner.class) @DirtiesContext @SpringBootTest public c...

18得票2回答
在Spring Boot Actuator中为“/health”端点启用CORS

我们希望为由Spring Boot Actuator提供的/health端点的所有GET请求启用CORS。 我们尝试添加以下bean,但没有成功: @Bean public WebMvcConfigurer corsConfigurer() { return new WebMvcC...

18得票3回答
Spring Boot Actuator在单独的线程池中运行

是否可以将如health之类的执行器请求从“主”应用程序中分离出来,并在单独的线程池中处理? 为什么这样问呢? 我有一个应用程序,有时可能会使用完所有可用的线程,并且由于无法计算健康端点请求而导致 Kubernetes 健康检查失败。 我想确保每个健康请求都能够处理,无论应用程序承受多少负...

18得票1回答
Spring控制器与端点的区别

Spring Boot Actuator 提供了一些端点,例如 health、metrics 和 info。它还允许我们编写自己的定制端点。 我有一个需求,需要将一些 Dropwizard 的指标统计作为端点暴露出来。最新的 Spring Boot 确实支持 Dropwizard 指标,但不...