Make use of grafana annotation API #121

Closed
opened 2024-01-24 11:30:24 +00:00 by fyrchik · 2 comments
Owner

https://grafana.com/docs/grafana/latest/dashboards/build-dashboards/annotate-visualizations/

Imagine doing k6 run and seing clear delimiters between different runs with human-readable text but without human intervention.
Maybe default output extension for grafana may already know how to do this?

cc @a.bogatyrev

https://grafana.com/docs/grafana/latest/dashboards/build-dashboards/annotate-visualizations/ Imagine doing `k6 run` and seing clear delimiters between different runs with human-readable text but without human intervention. Maybe default output extension for grafana may already know how to do this? cc @a.bogatyrev

Actually it doesn't look like it is k6 task to create Grafana annotations.
Annotations can be created with a simple curl query. Example:

curl --request POST \
  --url https://admin:admin@localhost:3000/api/annotations \
  --header 'Content-Type: application/json' \
  --data '{
	"dashboardUID": "dashboard_uid",
	"time": 1706533045014,
	"timeEnd": 1706533085100,
	"tags": [
		"tag1",
		"tag2"
	],
	"text": "Test annotation"
}'
Actually it doesn't look like it is `k6` task to create Grafana annotations. Annotations can be created with a simple curl query. Example: ``` curl --request POST \ --url https://admin:admin@localhost:3000/api/annotations \ --header 'Content-Type: application/json' \ --data '{ "dashboardUID": "dashboard_uid", "time": 1706533045014, "timeEnd": 1706533085100, "tags": [ "tag1", "tag2" ], "text": "Test annotation" }' ```
Author
Owner

Agree, there is no reason to put this in the scenario, the amount of external parameters is high.

Does it make sense to store this script in a separate file in this repo?
At least in the documentation

Agree, there is no reason to put this in the scenario, the amount of external parameters is high. Does it make sense to store this script in a separate file in this repo? At least in the documentation
dstepanov-yadro self-assigned this 2024-01-29 13:29:45 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/xk6-frostfs#121
No description provided.