Alert notification - alertname and rulename

Hello,

I am testing grafana alerting in grafana v9.5.1. I use google chat as a contact point. I’ve noticed a weird behavior when an alerts triggers because of a no data / datasource timeout …

The picture below shows the notification we get for a normal trigger (B0 is to high)
This is the default template, we can see a label alertname with the alert name, seems logic.
Screenshot 2023-05-18 at 10-48-03 Messagerie Boxtal

But when an alert triggers because of a novalue / datasource timeout … We get the real alert name with the rulename label and alertname gets replaced by DatasourceWhatever.
anormal

Is this the expected behavior ?
Building templates with go is already painful enough, changing labels is not user friendly.

I also have noticed that grafana adds a Error annotation when the alerts triggers for nodata / timeout. Is there a doc page that explains which label / annotations are added / modified / deleted and in what situations ? I was not able to find such a page.

Thanks and have a good day :slight_smile:

Hello,

Should I post my message on github or slack ?

Have a good day !

Hi! That’s because these are two different alerts :slightly_smiling_face: The first alert is called Cotation V1 - HTTP Response and is fired when the condition is exceeded. The second alert is called DatasourceNoData or DatasourceError and it includes, as a label, the name of the alert that returned no data or couldn’t be evaluated. In this case Cotation V2 - shipping quote.