I’m trying to silence alerts using as matcher “alertname=DatasourceNoData” but that doesn’t seem to work.
I think the problem is related to the alert settings in Grafana. Try checking your alert conditions carefully to ensure that the resolver “alertname=DatasourceNoData” is specified correctly. It may also be worth checking other alert settings, such as how often the data is checked or how the alerts are sent.
I’m using notification policy for that. My first policies (without further evaluation of next policies) are for datasourceerror and nodata and they are redirected to “/dev/null” contact point (email contact point with nonexisting email adrress in my case).
I have also enabled alert state history, so I graph number of alerts in nodata/datasourcerror state, just to have idea about their health of my alerts (when I suppressed these errors).