Hi Team,
During the perf test, I can see some numbers on the http_failed_request. How can I find the 4xx and 5xx request URLs?
Hi Team,
During the perf test, I can see some numbers on the http_failed_request. How can I find the 4xx and 5xx request URLs?
Hi @Gerard !
k6 generates HTTP metrics and labels them with the URLs also, so you can use these data points, e.g., see how the CVS output looks like:
metric_name,timestamp,metric_value,check,error,error_code,expected_response,group,method,name,proto,scenario,service,status,subproto,tls_version,url,extra_tags
http_reqs,1652461406,1.000000,,,,true,::main,GET,https://test.k6.io,HTTP/1.1,default,,200,,tls1.3,https://test.k6.io,containerGroup=main
http_req_duration,1652461406,186.868861,,,,true,::main,GET,https://test.k6.io,HTTP/1.1,default,,200,,tls1.3,https://test.k6.io,containerGroup=main
http_req_blocked,1652461406,385.741044,,,,true,::main,GET,https://test.k6.io,HTTP/1.1,default,,200,,tls1.3,https://test.k6.io,containerGroup=main
http_req_connecting,1652461406,126.812663,,,,true,::main,GET,https://test.k6.io,HTTP/1.1,default,,200,,tls1.3,https://test.k6.io,containerGroup=main
http_req_tls_handshaking,1652461406,226.253767,,,,true,::main,GET,https://test.k6.io,HTTP/1.1,default,,200,,tls1.3,https://test.k6.io,containerGroup=main
http_req_sending,1652461406,0.055209,,,,true,::main,GET,https://test.k6.io,HTTP/1.1,default,,200,,tls1.3,https://test.k6.io,containerGroup=main
http_req_waiting,1652461406,186.533106,,,,true,::main,GET,https://test.k6.io,HTTP/1.1,default,,200,,tls1.3,https://test.k6.io,containerGroup=main
http_req_receiving,1652461406,0.280546,,,,true,::main,GET,https://test.k6.io,HTTP/1.1,default,,200,,tls1.3,https://test.k6.io,containerGroup=main
http_req_failed,1652461406,0.000000,,,,true,::main,GET,https://test.k6.io,HTTP/1.1,default,,200,,tls1.3,https://test.k6.io,containerGroup=main
So once you have metrics stored, you can filter them.
Let me know if that helps,
Cheers
I checked the measurement you shared above, and based on that I created the Influxql query to find out the URL. The Stdout failed number and the query output are not equal.
SELECT “url”, “value” FROM “http_req_failed” WHERE $timeFilter
Check and let me know whether I’m filtering the correct values. Also, the status should be 4xx or 5xx for failed request under http_req_failed measurements.
Check and let me know whether I’m filtering the correct values.
Sorry, I can’t validate if toy correctly use Influxql or not.
Please see that the metric_value
in the case of 200 is 0.000000
.
Cheers