management.health.elasticsearch.enabled=true
如何为kibana和apm-server启用执行器健康,上面的配置不提供elasticsearch服务器以外的健康信息
发布于 2021-05-06 03:57:59
在Spring Boot的最新版本中,没有自动配置的Kibana和APM Server健康检查(Spring Boot Actuator参考:2.8.1. Auto-configured HealthIndicators)。正如您所说,您可以使用ElasticsearchRestHealthIndicator
查找elasticsearch
。
您需要编写一个不复杂的自定义健康指示器。从这里开始:2.8.2. Writing Custom HealthIndicators。
您只需知道正确的端点即可检测所需服务器的运行状况。
Kibana
Kibana公开了有关状态的REST GET端点,Spring可以调用该端点来确定其健康状况:
GET localhost:5601/status
返回nodeGET localhost:5601/api/status
的状态返回更详细的状态信息注意:您可能想要验证这些端点,因为我还没有找到任何官方来源。
APM服务器
APM服务器在根路径(source)上仅提供一个端点:
GET localhost:8200
https://stackoverflow.com/questions/67279980
复制