Hi !
Why in my grafana graphic no data about: req_blocker , error per second ?
In console log this data shown
Hi there,
the http_req_blocked
panels are showing data for me:
The reason the med
, min
, etc. panels are displayed as “0.00 ms” is because of the millisecond precision of the dashboard, and well, because Grafana doesn’t support higher precision values. If you execute the InfluxQL query of the panel in the REPL, you’ll see that the data is stored in InfluxDB.
As for the “Errors per Second” panel, that was previously used for a built-in errors
metric (see #877 for an effort to bring it back), but you can also create a custom errors
metric yourself and use it for whatever purpose you need, which will then appear in Grafana as in my screenshot.
For example, to report non-200 HTTP responses as errors:
import http from "k6/http";
import { check } from "k6";
import { Counter } from "k6/metrics";
var errors = new Counter("errors");
export default function() {
let res = http.get("https://httpbin.test.k6.io/status/200,400");
let checkRes = check(res, { "status is 200": (r) => r.status === 200 });
errors.add(!checkRes);
}
Note that any custom metric will be submitted this way, so you can create your own Grafana dashboards to suit your purpose.
HTH,
Ivan
thank u very much!!!