On 21.08.20 06:56, Samuel Stanley wrote: > 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.
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] [email protected] -- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/20200827163305.GM2356%40jahnn.

