Closed Kirchen99 closed 11 months ago
Hi @Kirchen99, thanks for reporting that. This seems like a simple example mistake or behaviour change.
The test chekcs for 200
but prometheus returns 204
as you notice. I have no idea if that is normal though and if it has changed ... recently.
cc @replay any idea on this?
I believe to remember that it is normal for Prometheus to return 204
on successful ingestion. Instead of looking for 200
the check should look for a status code in the range [200, 300)
Prometheus Version: v2.37.0 xk6-client-prometheus-remote Version: build from resource according to the README.md k6 Version: k6 v0.40.0 ((devel), go1.19.1, darwin/amd64)
In this example the status code is compared with 200, but Prometheus give 204 back.
https://github.com/grafana/xk6-client-prometheus-remote/blob/6c1e7b99d2123ef2a87b39dcadb033dd1aabf7f8/examples/basic.js#L24
What did you do?
try the example from this repo with a local prometheus: https://github.com/grafana/xk6-client-prometheus-remote/blob/main/examples/basic.js
What did you expect?
No error
What did you see instead?
Error messages such as:
http_req_failed
: 100% andbut the Prometheus received the data.