Plot http_req_failed

Hi there,

I’m currently using the Grafana+InfluxDB setup with k6 with the community dashboard. I am aware that it is old and somewhat outdated, however I see that the metrics to stdout prints out ‘http_req_failed’ with the Rate. How would I plot this on Grafana so I can see when in the test the failed requests occured?
When I query InfluxDB I see that there is a measurement for it, however I can’t seem to get an InfluxQL query together that properly plots this.

Thank you in advance

Hi, welcome to the forum :slight_smile:

Since the value of http_req_failed is either a 1 or 0, to visualize the “failed” requests you can add a panel to the dashboard with the following query:

SELECT count("value") FROM "http_req_failed" WHERE value=1 and $timeFilter GROUP BY time($__interval) fill(null)

Which will be shown like this:

HTH,

Ivan