Hi,
I’m looking for a way of iterating through all my dashboards, and verifying that there’s data in them all (programmatically). I was looking into Alerts for this, thinking I could simply set alert on NoData, but it seems there’s no way to only alert if there’s no data. Am I missing something?
Thanks, Tom
If you fetch all the alerts via the API then you can check the evalData -> noData field:
[
{
"id": 9,
"dashboardId": 145,
"panelId": 2,
"name": "Metrics Ingestion alert",
"message": "Metric Ingestion rate has dropped",
"state": "no_data",
"newStateDate": "2017-11-27T02:16:02-05:00",
"evalDate": "0001-01-01T00:00:00Z",
"evalData": {
"noData": true
},
"executionError": "",
"dashboardUri": "db\/myalerts"
}
]