K6 HTML report Request Count & Grafana Dashboard Request count is different

Hello, I’m using Both the k6 HTML report https://github.com/benc-uk/k6-reporter and Grafana+InfluxDB for visualizing my performance results. But there is a significant difference in Request count between the HTML report and Grafana Dashboard. Could someone tell me the reason? I will attach both HTML report Result and Grafana Dashboard Result. HTML report is showing 2794 Total Request count while Grafana is showing it as 2570

Hi @Dhanuka123,
welcome to the community forum :tada:

Can you also post the relative test’s executor options and the end-of-test summary from k6, please? Are you using InfluxDB v1.x?

InfluxDB Version - 1.8.0_1
grafana dashboard https://grafana.com/grafana/dashboards/2587

Here is option Executor I Used
export let options = {

stages: [
    { duration: '40s', target: 20 },  
    { duration: '600s', target: 20 },  
    { duration: '40s', target: 0 },    
],

};
export function handleSummary(data) {
return {
‘Search-Quotation-&-List-New-Environment(8001).html’: htmlReport(data, { debug: false }),
stdout: textSummary(data, { indent: ’ ', enableColors: true }),
}
}

k6 test summary

K6 test summary and HTML report are showing exact values[Request Count]. But Grafana Dashboard is showing different request counts.

Hi @Dhanuka123,
unfortunately, this isn’t an official dashboard and it’s developed by the community so you should import it and change it for your use cases.

In any case, you could consider adapting the dashboard from the timescaledb GitHub - grafana/xk6-output-timescaledb or from the InflxuDBv2 extensions xk6-output-influxdb/grafana at main · grafana/xk6-output-influxdb · GitHub, so we could support more with them.

Let me know if it helps.

1 Like

I used grafana/xk6-output-timescaledb. I did everything correct and all the metrics are stored well inside postgresql database and I checked those also. But I can not see any update on grafana dashboard. I created a Postgresql data source also and connect that data-source to your dashboard as well.
Can not imagine where I was wrong. The dashboard is showing an error like this “Datasource mytimescaledb was not found”. Can you please help me to sort out this issue.

Hi @Dhanuka123, how are you running your TimescaleDB instance? Are you using docker by chance?

Please try the steps in the Docker Compose section of the README. Using the ./docker-run.sh samples/http_2.js should produce output in your dashboard. (NOTE: the README needs to be updated as the location of the http_2.js file changed from scripts to samples)

That should produce your test results in the dashboard.

I am seeing the issue you were first pointing out that the counts do not match between the CLI summary and what is pushed to the TimescaleDB instance (and shown in Grafana).

There may be a bug with k6 reporting metrics to the external reporting if you were originally seeing a mismatch between CLI output and what was reported to InfluxDB, and now TimescaleDB. Would you be able to submit an issue with backup information for this?

EDIT: Running the test against InfluxDB backend, I have matching counts, so it’s possible the issue may actually be in the xk6-output-timescaledb extension itself and NOT k6.

What is your INFLUXDB version? I’m using 1.8 but still, this bug is happening. Could you please send me the Output of CLI and Grafana InfluxDB. and can you send me the Grafana dashboard you used for influx DB?