Hi! I am new to Grafana and having trouble figuring this out.
I have set up Grafana alerting to notify about errors in kubernetes pod logs that I get from Loki. I get the alert notifications in MS Teams.
I am working on a custom notification template and would really like to have custom URL that would take me to a dashboard that shows logs in a context, 5 minutes before and after a given timestamp. ( not relative to current time, but relative to provided timestamp)
I am thinking of using {{ .StartsAt.Unix }}
unix timestamp value from the Grafana alert and passing it as a custom Dashboard variable via the URL. Then the $timestamp would be used in a Loki query in the Dashboard that generates the list of logs.
Would this be possible?
Currently I am experimenting with the variables and custom log dashboard, but stuck with the next steps and not even sure if this can be done in this way. Would appreciate any input. Thanks!
I am using Grafana 9.3 at the moment, but can upgrade.