We’ve a few options:
1 - Suppress the No Data
scenario/state entirely
You can configure NoData state to “Normal” or “Keep Last State” . This will suppress DatasourceNoData
notifications for both - when there is no data or when the no data scenario is resolved:
More on the docs: modify the no data and error state.
2 - Using a notification policy when the alert state is set to “No data”
When the alert state is set to “No Data” and there is no data, the alert rule generates the DatasourceNoData
alert.
Then, you could suppress the “resolved” notification of the DatasourceNoData
alert as follows.
2.1 - Define a notification policy to handle the DatasourceNoData
alert: alertname = DatasourceNoData
. See @jangaraj’s answer here.
2.2 - In the contact point of the notification policy, you have two options:
-
enable the
Disable resolved message
option to skip notifications only when MissingSeries are resolved. -
set up an empty/null contact point to skip all
DatasourceNoData
notifications.
- For Normal(MissingSeries) scenarios, see Stale alert instances | Grafana documentation
The following guides provide practical examples and guidance:
Hope it helps!