I’m working with Grafana alerting and trying to understand how the order of alerts is determined in email notifications.
In my case, I have multiple firings of the same alert rule, but with different label values (e.g., different instances or components). However, the order in which these alerts appear in the email seems inconsistent.
I’ve tried sorting the data in the alert query, but it doesn’t affect the order in the email. I also tested whether alerts are sorted alphabetically by label values or alert name, but that doesn’t seem to be the case either.
According to the documentation, alerts are grouped by labels like firing/resolved and alert name, but there’s no explanation about the order within each group in the email body.
Does anyone know how this ordering is determined, or if it can be customized?