esnet / sense-rtmon

Custom Scripts for Dynamic End-To-End Flow-Specific Grafana Dashboards
5 stars 4 forks source link

Annotations for intent states (time to create, commit, stable, unstable) #120

Open juztas opened 3 months ago

juztas commented 3 months ago

There would be a nice idea to have annotations automatically updated in the following events:

This could use an annotations api on grafana and update dynamically for any dashboard (no need to keep track of dashboard, but we need to keep track of chartid. Grafana uses annotations api to get info for a chart:

https://autogole-grafana.nrp-nautilus.io/api/annotations?from=1719242912695&to=1719243812695&limit=100&matchAny=false&dashboardUID=19436582-8947-4d9d-a382-05fe30913848

and outputs:

[{"id":129955,"alertId":0,"alertName":"","dashboardId":185,"dashboardUID":"19436582-8947-4d9d-a382-05fe30913848","panelId":930,"userId":0,"newState":"","prevState":"","created":1719243168208,"updated":1719243168208,"time":1719243020440,"timeEnd":1719243020440,"text":"CREATE_JUSTAS","tags":["CREATE"],"login":"admin","email":"admin@localhost","avatarUrl":"/avatar/46d229b033af06a191ff2267bca9ae56","data":{}},{"id":129956,"alertId":0,"alertName":"","dashboardId":185,"dashboardUID":"19436582-8947-4d9d-a382-05fe30913848","panelId":930,"userId":0,"newState":"","prevState":"","created":1719243200091,"updated":1719243200091,"time":1719242955476,"timeEnd":1719242955476,"text":"CREATE_JUSTAS","tags":["SUBMIT"],"login":"admin","email":"admin@localhost","avatarUrl":"/avatar/46d229b033af06a191ff2267bca9ae56","data":{}}]

While SiteRM might reach v0.1, SENSE-O need to discuss this with the team.

juztas commented 3 months ago

For reference: https://grafana.com/docs/grafana/latest/developers/http_api/annotations/

juztas commented 3 months ago

SiteRM ping annotations added here: https://github.com/esnet/sense-rtmon/pull/122