I've been searching for a while but I wasn't able to find a solution and would need some help with this.
Say I have an alert like this one:
"alert": "myalertname",
"annotations": {
"description": "This is a description.",
"query": "I want my expr field here",
"summary": "This is a summary"
},
"expr": "my_expression(1)",
"labels": {
"severity": "high"
}
... and I would like to include the query inside the "expr" field into my annotations, without manually adding it in there for every single alert.
Is this exposed as a variable somehow? Can I reference it in another way, maybe?
The end goal is to have it shown in the PagerDuty alert so it's easily accessible to the responders without having them search the repo containing the alert definitions.
Thanks!