Prometheus 普罗米修斯:尝试使用PushGateway推送度量时,错误:404,响应正文:404页未找到

Prometheus 普罗米修斯:尝试使用PushGateway推送度量时,错误:404,响应正文:404页未找到,prometheus,prometheus-java,Prometheus,Prometheus Java,我尝试使用PushGateway推送指标,推送指标时出现以下错误: java.io.IOException: Response code from http://169.41.73.106:30000/metrics/job/pushgateway was 404, response body: 404 page not found at io.prometheus.client.exporter.PushGateway.doRequest(PushGateway.java:325) at

我尝试使用PushGateway推送指标,推送指标时出现以下错误:

java.io.IOException: Response code from http://169.41.73.106:30000/metrics/job/pushgateway was 404, response body: 404 page not found

at io.prometheus.client.exporter.PushGateway.doRequest(PushGateway.java:325)

at io.prometheus.client.exporter.PushGateway.pushAdd(PushGateway.java:160)

at com.test.promtheus.App.main(App.java:37)
将URL设置为
http://169.41.73.106:30000/metrics
工作正常,但是当我尝试使用提到的任何刮取作业名称时,我得到了404。有人能帮忙吗。


我认为您需要首先设置pushgateway,然后将pushgateway的地址+端口(localhost:9091)添加到prometheus配置文件中,然后运行pushgateway客户端以再次发送度量值,这对我很有效

我希望错误消息来自。您是否从运行程序的服务器上尝试了卷曲?这可能是接口绑定的问题。