> Is there specific way of writing metrics to push gateway? Yes, but you are getting an error. Something isn't right, and it's up to you to debug the problem.
Very likely the body of the HTTP error response tells you what's wrong. If it's indeed http:// rather than https:// then at worst you can use tcpdump to inspect it: tcpdump -i eth0 -nn -s0 -A host ingress.sherlock-service.qa.ebay.com (Adjust as necessary, e.g. if the interface is not called eth0) On Wednesday, 18 October 2023 at 14:50:24 UTC+1 Mahendra M wrote: > Thanks for the reply. > Yes url is proper. Is there specific way of writing metrics to push > gateway? > > On Wed, 18 Oct 2023 at 7:18 PM, Bjoern Rabenstein <[email protected]> > wrote: > >> On 13.10.23 05:12, Mahendra M wrote: >> > >> > I'm facing below exception while migrating to prometheus. Could anyone >> pls >> > help here? >> > >> > Exception: >> > >> > 218004:31:17.818 [PushGatewayFactory.PushGatewayTaskScheduler-1] ERROR >> > c.e.r.b.p.adaptor.PushGatewayFactory - Unable to push metrics to >> Prometheus >> > Pushgateway >> > 2181java.io.IOException: Response code from >> > >> http://ingress.sherlock-service.qa.ebay.com/api/pushgateway/v1/metrics/job/testjob >> >> > was 400 >> >> So your HTTP endpoint is returning a 400 status code. I actually doubt >> that it comes from the Pushgateway itself. Looks more like something >> from some proxy or HTTP routing layer in between. >> >> Is the URL correct? >> >> You could use the curl command to push something to that URL manually >> and get a more detailed dump of the response. See >> https://github.com/prometheus/pushgateway/blob/master/README.md for >> curl usage with the 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/b8e35d6e-3255-47e6-938d-f79d465e068en%40googlegroups.com.

