问题标签 [spring-actuator]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
39 浏览

azure - Azure Monitor 能否抓取在 Azure 以外的其他提供商处运行的应用程序的端点?

我是 Azure 和 Azure Monitor 的新手。

Azure Monitor 能否抓取在 Azure 以外的其他提供商处运行的应用程序的端点?

端点是安装在 Azure 世界之外的几个安装/应用程序的 Springboot 执行器/prometheus 端点,例如在 Linux 虚拟机 (VMWare) 上。

我用谷歌搜索,但没有找到如何包含外部(无)Azure 安装提供的指标的方法。

先感谢您。

0 投票
0 回答
42 浏览

spring-boot - 如何有选择地为特定的执行器 url 添加端口?

这是我在 application.yml 中的执行器设置。现在我知道,如果我想将上述执行器 url 公开到不同的端口,我会做这样的事情

现在我的问题是如何在不同的端口上选择性地公开几个 URL,例如 /prometheus 和 /metrics ?

0 投票
0 回答
14 浏览

spring-boot - springboot actuator 会关闭端点处理程序 kafka 消费者线程、tomcat 线程、自定义线程池都会优雅地关闭

springboot执行器关闭端点处理程序kafka消费者线程(使用KafkaListener注释),tomcat请求线程,自定义线程池(ThreadPoolExecutor)都会正常关闭吗?如果不是,我如何确保所有这些线程在完成任务后安全关闭,在执行任务时不会中断,这将导致数据不一致

0 投票
1 回答
98 浏览

spring-boot - micrometer dynatrace 注册表与 OneAgent 进程监控

我对监控世界很陌生。

我们在生产环境中部署了一些 Spring Boot 应用程序,并且我们已经在使用 Dynatrace 作为我们的监控工具。在阅读了dynatrace 的文档后,我了解到开箱即用的 OneAgent 可以自动发现我的整个 Java 应用程序堆栈并对其进行监控。

我还了解了micrometer dynatrace 注册表作为将 spring boot Actuator 指标导出到 OneAgent 摄取 API 的一种方式。

使用 micrometer dynatrace 注册表将指标发送到 OneAgent 与让 OneAgent 从我们的主机中运行的进程中抓取指标有什么区别?

我问这个问题是因为我想知道千分尺 dynatrace 注册表可以通过 OneAgent 报废 Java 进程向表中添加什么价值。

0 投票
3 回答
404 浏览

java - Spring Boot 2.5 到 2.6 迁移后 URL 包含双斜杠时出现 404 错误

以下 URL 用于在 Spring Boot 2.5 中返回 200

http://localhost:8080//执行器/健康

升级到 2.6 后它不再工作并返回 404 Not Found

我发现了这个错误,因为项目的一些集成测试失败了(请求返回 404)。然后我注意到了双斜线,删除它后,问题就解决了。

我只是想了解哪个功能导致了这种新行为?

我多次阅读 2.6发行说明,但没有任何反应。

0 投票
1 回答
66 浏览

spring-boot - 如何在 Spring Boot Actuator 中启用健康

我必须检查我的服务/应用程序是否有效。

我添加了依赖

并且还尝试添加management.endpoint.health.show-details: alwaysapplication.yml但没有帮助。

我试图去http://localhost:8080/actuator/healthhttp://localhost:8080/health但它返回 404 错误。

0 投票
0 回答
111 浏览

java - 引起:java.lang.NoClassDefFoundError: org/springframework/data/repository/core/support/RepositoryMethodInvocationListener

嗨'我正在尝试在我的 pom.xml 中添加执行器依赖项。但是在运行应用程序时失败并出现错误:2022-01-25 08:55:37,795 [main] ERROR osboot.SpringApplication []:: Application run failed java.lang.IllegalStateException: Error processing condition on org.springframework.boot .actuate.autoconfigure.metrics.data.RepositoryMetricsAutoConfiguration.metricsRepositoryMethodInvocationListener

pom.xml

日志:

0 投票
1 回答
31 浏览

prometheus - Prometheus 给出了空的查询结果,尽管单个组件指标可用

在 Grafana 仪表板中显示了一个自定义指标。该指标是通过 Prometheus 接收的。该指标是通过 Spring Boot Actuator / Micrometer 构建的。

在大约一半的情况下,Prometheus 对指标的查询给出了一个空结果。在其他情况下,该值是有效的。那么,它可能与抓取的阈值有关吗?

分析 Prometheus 使用的查询,会显示一个空结果:

http://valid.url/prometheus/api/v1/query?query=last_seconds_since_startime_seconds&time=1645521095.864

http://valid.url/prometheus/api/v1/query?query=last_seconds_since_startime_seconds

结果是:

使用此查询会显示完整的结果(大约 17 秒后),其中包含实际值:

http://valid.url/stackname/componentname/actuator/prometheus

文中是:

环境是 Spring Boot、Micrometer、Actuator、Prometheus 和 Grafana。执行器查询是使用 Micrometer 构建的:

0 投票
0 回答
14 浏览

spring-boot - 每秒调用多次执行器运行状况调用

我创建了一个实现 health() 方法的自定义健康指标,下面是我的类的定义

@ConditionalOnProperty(name = "management.health.mycheck", havingValue = "true") 公共类 MyHealthIndicator 实现 HealthIndicator

我的属性文件具有以下配置

管理:端点:健康:显示详细信息:始终 端点:健康:敏感:false 网络:基本路径:/健康:db:启用:false 默认值:启用:false mycheck:true

当我的自定义健康指标的 health() 方法每秒被调用多次时,我现在没有明确地调用它,不确定我在这里做错了什么以及从哪里调用它,以及如何阻止它。

0 投票
1 回答
19 浏览

java - 替换 Spring Boot 2.6.4 的 ConditionalOnEnabledEndpoint

我想迁移使用此依赖项的旧 Spring 项目:

此类需要导入:

我尝试使用最新版本:

'org.springframework.boot:spring-boot-actuator-autoconfigure:2.6.4' 但ConditionalOnEnabledEndpoint不可用。你知道应该使用哪个类吗?