From 5cfb958a18a2046d4a130290dc91dae59a344363 Mon Sep 17 00:00:00 2001 From: Dmitrii Stepanov Date: Tue, 30 Jan 2024 15:53:23 +0300 Subject: [PATCH] [#121] scenarios: Add info about Grafana annotations Signed-off-by: Dmitrii Stepanov --- scenarios/run_scenarios.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/scenarios/run_scenarios.md b/scenarios/run_scenarios.md index f2c0332..c7b4aee 100644 --- a/scenarios/run_scenarios.md +++ b/scenarios/run_scenarios.md @@ -202,6 +202,27 @@ K6_PROMETHEUS_RW_TREND_STATS="p(95),p(99),min,max" \ ./k6 run ... -o experimental-prometheus-rw -e METRIC_TAGS="instance:server1;run:run1" scenario.js ``` +## Grafana annotations + +There is no option to export Grafana annotaions, but it can be easily done with `curl` and Grafana's annotations API. +Example: +```shell +curl --request POST \ + --url https://user:password@grafana.host/api/annotations \ + --header 'Content-Type: application/json' \ + --data '{ + "dashboardUID": "YsVWNpMIk", + "time": 1706533045014, + "timeEnd": 1706533085100, + "tags": [ + "tag1", + "tag2" + ], + "text": "Test annotation" +}' +``` +See [Grafana docs](https://grafana.com/docs/grafana/latest/developers/http_api/annotations/) for details. + ## Verify This scenario allows to verify that objects created by a previous run are really stored in the system and their data is not corrupted. Running this scenario assumes that you've already run gRPC or HTTP or S3 scenario with option `REGISTRY_FILE`.