# Error in Grafana Alerting - Failed getting data source

**URL:** <https://community.grafana.com/t/error-in-grafana-alerting-failed-getting-data-source/100114>\
**Category:** Alerting\
**Tags:** datasource, alerting\
**Created:** [July 31, 2023, 6:22am UTC](https://community.grafana.com/t/error-in-grafana-alerting-failed-getting-data-source/100114 "2023-07-31T06:22:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![saiumeshkumar](https://avatars.discourse-cdn.com/v4/letter/s/7cd45c/32.png) [@saiumeshkumar](https://community.grafana.com/u/saiumeshkumar)\
**Post date:** [July 31, 2023, 6:22am UTC](https://community.grafana.com/t/error-in-grafana-alerting-failed-getting-data-source/100114/1 "2023-07-31T06:22:36Z")

</div>

We are running grafana 7.5.17 with postgres as backend and we are running into below alerting errors

```auto
lvl=eror msg="Failed getting data source" logger=sqlstore err=EOF uid= id=9 name= orgId=1

```

```auto
lvl=eror msg="Alert Rule Result Error" logger=alerting.evalContext ruleId=18903 name="<ALERT_TITLE>" error="could not find datasource: EOF" changing state to=alerting

```

Checked the database and the datasource is present in db in `data_source` table and also validated that the datasource is present in the `api/datasources` API response

For the alerts that had set `If execution error or timeout` as `Alerting`, alert is triggered with `Error: could not find datasource: EOF`

We are seeing this for all kinds of datasources - prometheus, elasticsearch, stackdriver and postgres

Why are we getting this error and what to do to fix this ?
