diff --git a/README.md b/README.md index cb93cfb..ba27501 100644 --- a/README.md +++ b/README.md @@ -28,8 +28,12 @@ Check [the documentation](https://k6.io/docs/results-output/real-time/prometheus ## Dashboards -[](./images/prometheus-dashboard-k6-test-result.png) +

 

-Pre-built Grafana dashboards are available. Check the [dashboard guide](https://k6.io/docs/results-output/real-time/prometheus-remote-write/#time-series-visualization) how to import and use it from the source code or directly from [Grafana.com](https://grafana.com/grafana/dashboards/18030-test-result). +[](./images/dashboard-k6-prometheus.png) ->Note: The dashboards work with the Native Histogram mapping so it is required to enable it. +This repo contains the [source code](./grafana/dashboards) of two Grafana dashboards designed to visualize test results: [`k6 Prometheus`](https://grafana.com/grafana/dashboards/19665-k6-prometheus/) and [k6 Prometheus (Native Histograms)](https://grafana.com/grafana/dashboards/18030-k6-prometheus-native-histograms/). + +Refer to the [documentation](https://k6.io/docs/results-output/real-time/prometheus-remote-write/#time-series-visualization) to learn more about these dashboards. You can import them to your Grafana instance or with the docker-compose example on this repo. + +🌟 Special thanks to [jwcastillo](https://github.com/jwcastillo) for his contributions and dedication to improving the dashboards. diff --git a/grafana/dashboards/README.md b/grafana/dashboards/README.md deleted file mode 100644 index aeb34b2..0000000 --- a/grafana/dashboards/README.md +++ /dev/null @@ -1,73 +0,0 @@ -# Dashboards - -Add custom dashboards here, then start the [docker-compose](../../docker-compose.yml) to have the dashboards provisioned at startup. Use folders to group related dashboards. -The docker-compose setup comes with some pre-built Grafana dashboards. One for listing the discrete test runs as a list, one for visualizing the results of a specific test run, and another for Apdex score. - ->Note: The dashboards work with the Native Histogram mapping so it is required to enable it. - -### Test result dashboard - -[](/images/prometheus-dashboard-k6-test-result.png) - -Results can be filtered by: - -- testid -- scenario -- url - -[](/images/prometheus-dashboard-k6-test-result-variables.png) - -Response time metrics are based on the **metrics** variable, and the values can be: - -- k6_http_req_duration_seconds (default) -- k6_http_req_waiting_seconds - -The board is structured into 4 sections - -#### Performance Overview - -[](/images/prometheus-dashboard-k6-test-result-performance.png) - -#### HTTP - -[](/images/prometheus-dashboard-k6-test-result-http.png) - -#### Scenarios - -[](/images/prometheus-dashboard-k6-test-result-scenarios.png) - -### Test list dashboard - -[](/images/prometheus-dashboard-k6-test-runs.png) - ->Note: This dashboard depends on the use of testid tag - - -#### Apdex Overview Dashboard - -[](/images/prometheus-dashboard-k6-test-result-apdex.png) - -The Apdex score is calculated based on your SLA ```([T]target time (seconds) Apdex - variable, default 0.3 sec)``` required where you can define a response time threshold of T seconds, where all responses handled in T seconds or less satisfy the end user. - -If you want to know more - - - - - - diff --git a/grafana/dashboards/k6-prometheus-native-histogram.json b/grafana/dashboards/k6-prometheus-native-histogram.json index 465d9c0..e20e9ca 100644 --- a/grafana/dashboards/k6-prometheus-native-histogram.json +++ b/grafana/dashboards/k6-prometheus-native-histogram.json @@ -15,7 +15,7 @@ } ] }, - "description": "Visualize k6 OSS results stored in Prometheus with Native Histogram. K6_PROMETHEUS_RW_TREND_AS_NATIVE_HISTOGRAM option must be true. ", + "description": "Visualize k6 OSS results stored in Prometheus with Native Histograms.", "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, diff --git a/grafana/dashboards/k6-prometheus.json b/grafana/dashboards/k6-prometheus.json index eec6bdc..6bb7fe5 100644 --- a/grafana/dashboards/k6-prometheus.json +++ b/grafana/dashboards/k6-prometheus.json @@ -827,8 +827,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" } ] }, @@ -1002,8 +1001,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" } ] }, @@ -1182,8 +1180,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" } ] }, @@ -1352,8 +1349,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" } ] } @@ -1640,8 +1636,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" } ] } @@ -1844,8 +1839,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" } ] }, @@ -1977,9 +1971,10 @@ }, { "current": { + "isNone": true, "selected": false, - "text": "p99", - "value": "p99" + "text": "None", + "value": "" }, "datasource": { "type": "prometheus", diff --git a/images/dashboard-k6-prometheus-lower-section.png b/images/dashboard-k6-prometheus-lower-section.png new file mode 100644 index 0000000..83c419e Binary files /dev/null and b/images/dashboard-k6-prometheus-lower-section.png differ diff --git a/images/dashboard-k6-prometheus-nh-lower-section.png b/images/dashboard-k6-prometheus-nh-lower-section.png new file mode 100644 index 0000000..2f534ae Binary files /dev/null and b/images/dashboard-k6-prometheus-nh-lower-section.png differ diff --git a/images/dashboard-k6-prometheus-nh-upper-section.png b/images/dashboard-k6-prometheus-nh-upper-section.png new file mode 100644 index 0000000..747bcb7 Binary files /dev/null and b/images/dashboard-k6-prometheus-nh-upper-section.png differ diff --git a/images/dashboard-k6-prometheus-nh.png b/images/dashboard-k6-prometheus-nh.png new file mode 100644 index 0000000..0ac0b70 Binary files /dev/null and b/images/dashboard-k6-prometheus-nh.png differ diff --git a/images/dashboard-k6-prometheus-upper-section.png b/images/dashboard-k6-prometheus-upper-section.png new file mode 100644 index 0000000..167ab58 Binary files /dev/null and b/images/dashboard-k6-prometheus-upper-section.png differ diff --git a/images/dashboard-k6-prometheus.png b/images/dashboard-k6-prometheus.png new file mode 100644 index 0000000..89970e7 Binary files /dev/null and b/images/dashboard-k6-prometheus.png differ diff --git a/images/prometheus-dashboard-k6-test-result-apdex.png b/images/prometheus-dashboard-k6-test-result-apdex.png deleted file mode 100644 index a1d91b7..0000000 Binary files a/images/prometheus-dashboard-k6-test-result-apdex.png and /dev/null differ diff --git a/images/prometheus-dashboard-k6-test-result-http.png b/images/prometheus-dashboard-k6-test-result-http.png deleted file mode 100644 index ff366ea..0000000 Binary files a/images/prometheus-dashboard-k6-test-result-http.png and /dev/null differ diff --git a/images/prometheus-dashboard-k6-test-result-performance.png b/images/prometheus-dashboard-k6-test-result-performance.png deleted file mode 100644 index 9b7aa25..0000000 Binary files a/images/prometheus-dashboard-k6-test-result-performance.png and /dev/null differ diff --git a/images/prometheus-dashboard-k6-test-result-scenarios.png b/images/prometheus-dashboard-k6-test-result-scenarios.png deleted file mode 100644 index cb0d271..0000000 Binary files a/images/prometheus-dashboard-k6-test-result-scenarios.png and /dev/null differ diff --git a/images/prometheus-dashboard-k6-test-result-variables.png b/images/prometheus-dashboard-k6-test-result-variables.png deleted file mode 100644 index a78970b..0000000 Binary files a/images/prometheus-dashboard-k6-test-result-variables.png and /dev/null differ diff --git a/images/prometheus-dashboard-k6-test-result.png b/images/prometheus-dashboard-k6-test-result.png deleted file mode 100644 index ac68b55..0000000 Binary files a/images/prometheus-dashboard-k6-test-result.png and /dev/null differ diff --git a/images/prometheus-dashboard-k6-test-runs.png b/images/prometheus-dashboard-k6-test-runs.png deleted file mode 100644 index 81787d7..0000000 Binary files a/images/prometheus-dashboard-k6-test-runs.png and /dev/null differ