我有一个由多个容器组成的pod,每个容器都有一个正在运行的应用程序。如何启用执行器从这些应用程序中获取指标。我找不到这样做的方法。
在pod的不同端口上运行着四个微服务,分别是8082、8080、8081、8083。但是执行器仅从运行在8080(默认端口)上的微服务中抓取指标。
我尝试将代码部分中指示的应用程序属性添加到所有属性中。但它并没有起作用。下面是application.property的内容:
management.endpoint.metrics.enabled=true
management.endpoints.web.exposure.include=*
management.endpoint.prometheus.enabled=true
management.metrics.export.prometheus.enabled=true
management.metrics.use-global-registry=true
management.server.port=8888 预期输出:我应该能够使用/metrics端点查看来自每个应用程序的指标。
发布于 2019-04-25 00:05:53
我能够解决这个问题。以下是步骤:
application.properties.
就这样。
https://stackoverflow.com/questions/55808691
复制相似问题