Hello folks,
I am trying to send my k6 metrics to prometheus for that i have done the following thing.
i have installed prometheus and it is up and running at port 9090.
after that i am using command “k6 run -o experimental-prometheus-rw sampleScript.js”
I am getting following error : ERRO[0003] Failed to send the time series data to the endpoint error=“got status code: 404 instead expected a 2xx successful status code” output=“Prometheus remote write”
Do i have to make any configuration in prometheus , or m i missing somethings , please help!!
Which will return remote write receiver needs to be enabled with --enable-feature=remote-write-receiver. Note that the flag has been deprecated and is now --web.enable-remote-write-receiver.
If this is the case, running curl -v -X POST http://localhost:9090/api/v1/write, in verbose, you would also see that your Prometheus is returning a HTTP/1.1 404 Not Found. Same as the errors you see got status code: 404.