Occasionally data sources will fail for one reason or another. It could be that the permissions or the password for a token has changed, your token has expired and needs to be re-authorized or a setting within your database has changed. If you have multiple dashboards it could be time consuming to check every one to see if the red exclamation mark is in the top right corner. However, you can create a klip that tracks all the data sources in your account. If any data source begins to fail you can quickly determine which data source is it and remedy the situation.
To build this monitoring klip, you will use the Klipfolio API. First, you can generate an API key by clicking on your name in the top right->Account->General Information->Edit->Generate New API Key.
Next, you will create a custom data source to pull data for the data sources in your account with the /datasource-instances endpoint. The exact query is:
https://app.klipfolio.com/api/1.0/datasource-instances?limit=100
*Note that the maximum amount of records the /datasource-instances endpoint returns in one call is 100. If you have more than 100 data sources, you will need to utilize pagination to return all data sources. Here is documentation on how to paginate through multiple pages in Klipfolio.
Once the data source is complete, you can now create a table to list all your data sources. In one column, you can have the data source name, in another the data source id and in the final, the fail count. You can sort the column that has the fail count highest to lowest. You could also filter the fail count column to only show records that are greater than zero, though in this example I have not. If any data source is failing, its refresh_fail_count record will be greater than zero. You can then identify the failing data sources quickly and take their data source id to investigate why the data source is failing. Once the data source begins to refresh properly, the refresh_fail_count will reset to zero.
Hopefully this helps you manage your data sources!
-Adam