我能够设置Prometheus和Grafana来监控我的Springboot API之一。当我们在给定的目标端点中有一个实例/副本时,这可以很好地工作。
然而,在我们的企业环境中,我们将Springboot应用程序作为Docker Swarm服务运行。docker服务具有单个端点,但在单个服务下有多个应用程序实例/副本。我们如何配置prometheus来监视所有副本,因为它们只有一个端点。
如果我概括一下,Prometheus如何监控负载平衡端点的所有实例。
scrape_configs:
- job_name: 'prometheus'
metrics_path: '/prometheus'
static_configs:
- targets: ['api.springboot.myhost.com:8080']https://stackoverflow.com/questions/44234075
复制相似问题