Skip to content

Daily

Find out when a data source stops responding

Every morning you hear about any data source that fails its health check, before a dashboard goes blank.

Runs
Daily
Apps
Grafana Cloud
AI
Not needed
Access
datasources:read (Viewer may not be enough; use a role that can read data sources)

Send this to your assistant

Create a ClickRuntime automation: every morning at 7am run the health check on all my Grafana data sources and email me the ones that fail, with the error message.

Paste it into your assistant. It tells you what it will send or change before it runs live.

First time? Adding ClickRuntime to your assistant takes about two minutes.

Why use it

Why teams use this automation

A Grafana dashboard with a data source that has stopped responding does not fail loudly. Panels show No data, and people read that as nothing happening. A Prometheus endpoint that lost a credential, a Loki instance that fell behind, or a database password that rotated can leave a team blind for days, and the first sign is an incident that no graph explains.

Every day each configured data source in Grafana is listed and its health check is run, the same test as pressing Save and test in the data source settings. Any source that fails is named in an email with the error message so you can fix the cause.

It is a quick safeguard for anyone whose alerts and dashboards depend on several data sources they do not check by hand.

What you get out of it

  • Blind spots found before incidents

    A failing data source means alerts built on it cannot fire. Hearing about it the same morning prevents a silent gap in coverage. A failing data source means alert rules built on it cannot fire, so hearing about it the same morning prevents a silent gap in coverage.

  • Expired credentials caught early

    Rotated passwords and expired tokens are the most common cause. The email carries the error text, so the fix is usually obvious. Rotated passwords and expired tokens are the most common causes, and the email carries the error text, so the fix is usually obvious.

  • Less trust in empty graphs

    When someone says a panel shows nothing, you can check whether the source was healthy that day rather than debating it. When a colleague says a panel shows nothing, you can check whether the source was healthy that day instead of debating it.

  • Works across all your sources

    One check covers every data source, including ones nobody has opened for months, so forgotten connections stay honest. One check covers every data source in the stack, including ones nobody has opened for months, so forgotten connections stay honest.

  • Quiet when everything works

    Only failures are mentioned, so the email is something to act on and not a ritual to ignore. Only failures are mentioned, so the email is something to act on and not a ritual to ignore, even after months of green days.

How it works

What happens, step by step

  1. Every morning, ClickRuntime lists all the data sources connected to Grafana.

  2. It runs Grafana's own health check on each one.

  3. If any fail, you get an email naming each failing data source and the error it returned, before a dashboard goes blank. If all pass, you hear nothing.

Before it runs live

  • Connect Grafana Cloud

What you get

RunsDaily
Find out when a data source stops respondingtoday, 9:00Succeeded
Email · Data source healthNorthwind Postgres (grafana-postgresql-datasource): dial tcp: i/o timeout

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • Your own rules

    Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.

  • Any number of apps

    One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.

  • AI where it helps

    Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.

  • On a schedule or on each event

    Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.

Changes you can ask for

  • Run it at a different time, more or less often, or only on weekdays
  • Add an AI step, for example to summarize, sort or draft a reply
  • Add another app, for example also send it to Slack
  • Combine it with other Grafana Cloud steps into one automation

Under the hood

The code that runs this automation

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
get_a_daily_data_source_health_check.pyexample
from clickruntime import on_trigger, credentials, http, notify

GRAFANA = "https://acme.grafana.net"

@on_trigger
def run(event):
    headers = {"Authorization": f"Bearer {credentials.secret('GRAFANA_TOKEN')}"}
    sources = http.get(f"{GRAFANA}/api/datasources", headers=headers).json()
    failing = []
    for ds in sources:
        resp = http.get(f"{GRAFANA}/api/datasources/uid/{ds['uid']}/health", headers=headers)
        body = resp.json() if resp.content else {}
        if resp.status_code != 200 or body.get("status") != "OK":
            failing.append(f"{ds['name']} ({ds['type']}): {body.get('message', resp.status_code)}")
    if failing:
        notify.email_me(f"{len(failing)} Grafana data sources failing", "\n".join(failing))
    return {"checked": len(sources), "failing": len(failing)}

FAQ

Common questions

What does the health check actually test?
It runs Grafana's built-in test for each source, which verifies it can connect and authenticate. It does not run your dashboard queries, so a source can pass while a specific query is slow. It is a connection test, not a query benchmark.
Will it report the same failure every day?
Yes, until it is fixed, since the issue persists. If you would rather be told once, you can ask to remember reported failures and approve the change. Fixing the source clears it the following morning. Asking for one alert per failure is a small edit.
Do I need to list the data sources myself?
No. They are listed from your Grafana Cloud stack each time, so new sources are included without any edits. New sources are included automatically the next day, because the list is fetched fresh on every run, so you never need to maintain it by hand or remember to add new connections afterward.
What permissions does it need?
datasources:read (Viewer may not be enough; use a role that can read data sources). Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's AI allowance.
How many runs does it use?
One run each time it runs (daily). Checks that find nothing to do and stop right away aren't counted.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Find out when a data source stops responding” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.