Spring boot Spring Boot Acutator:PrometheusPushGatewayManager.push即使在pushgateway端点暂时中断的情况下也很容易放弃

Spring boot Spring Boot Acutator:PrometheusPushGatewayManager.push即使在pushgateway端点暂时中断的情况下也很容易放弃,spring-boot,prometheus-pushgateway,Spring Boot,Prometheus Pushgateway,我有一个库伯内特斯星系团;在集群中,我安装了普罗米修斯(prometheus),并提供了一个spring引导服务,该服务可以放大或缩小到零;我已经将spring引导服务配置为使用pushgateway;在升级过程中,Pushgateway在几秒钟内无法触及,同时spring boot actuator中的PrometheusPushGatewayManager尝试推动度量,发现无法定位Pushgateway,因此自动关闭。我想知道,有没有办法让PrometheusPushGatewayManag

我有一个库伯内特斯星系团;在集群中,我安装了普罗米修斯(prometheus),并提供了一个spring引导服务,该服务可以放大或缩小到零;我已经将spring引导服务配置为使用pushgateway;在升级过程中,Pushgateway在几秒钟内无法触及,同时spring boot actuator中的PrometheusPushGatewayManager尝试推动度量,发现无法定位Pushgateway,因此自动关闭。我想知道,有没有办法让PrometheusPushGatewayManager在放弃之前尝试多次。

你是说它失败是因为DNS失败了吗?是和否;只是在DNS吊舱中打嗝,而不是停机;我想,我有一个解决办法——如果我将轮询间隔/推送速率更改为相对值(1m),那么这不应该发生,因为升级/打嗝不会持续超过30秒。在DNS失败时重试会很奇怪,但仍然比在失败的POST(可能是非幂等)上重试更安全。从这一点上讲,您可以通过编程方式做的事情不多。我想说的是,您最好的选择是修复DNS和/或在关机前向spring boot询问失败次数(比重试更容易处理)。