Error: 404, response body: 404 page not found when trying to push metrics using PushGateway

60 views
Skip to first unread message

Samuel Stanley

unread,
Aug 21, 2020, 9:56:19 AM8/21/20
to Prometheus Users
Hi,

I am trying to push metrics using PushGateway, and i get the below error while pushing the metrics: 

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)


The URL upto http://169.41.73.106:30000/metrics works fine, however when I try  /metrics/job with any of the scrape job names mentioned I get 404. Can someone help.

Bjoern Rabenstein

unread,
Aug 27, 2020, 12:33:10 PM8/27/20
to Samuel Stanley, Prometheus Users
This sounds like host 169.41.73.106 is not actually running the
Pushgateway on port 30000 but something else (which is serving metrics
on the /metrics endpoint, but doesn't accept pushes on
/metrics/job/something).

Note that the Pushgateway is a separate binary you have to set up, see
https://github.com/prometheus/pushgateway . The code for pushing in
client_java is just the client code to use this Pushgateway.

--
Björn Rabenstein
[PGP-ID] 0x851C3DA17D748D03
[email] bjo...@rabenste.in
Reply all
Reply to author
Forward
0 new messages