# Unable to fetch data from elasticsearch for alerts from Grafana

**URL:** <https://discuss.elastic.co/t/unable-to-fetch-data-from-elasticsearch-for-alerts-from-grafana/308328>\
**Category:** Elasticsearch\
**Created:** [June 28, 2022, 6:57am UTC](https://discuss.elastic.co/t/unable-to-fetch-data-from-elasticsearch-for-alerts-from-grafana/308328 "2022-06-28T06:57:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jay\_bamaniya](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jay_bamaniya/32/107646_2.png) [@jay\_bamaniya](https://discuss.elastic.co/u/jay_bamaniya)\
**Post date:** [June 28, 2022, 6:57am UTC](https://discuss.elastic.co/t/unable-to-fetch-data-from-elasticsearch-for-alerts-from-grafana/308328/1 "2022-06-28T06:57:01Z")

</div>

I am unable to get the field (hostname, message) from elasticsearch to grafana for setting up my alerts. I wanted to get hostname as well as event message in my alerts so that it will easy for me to identify errors. I have tried multiple ways to do the same For Example : adding variable for the same but it doesnt works. Help me with the stuff. I am sharing image for the alert which I am receiving as alerts fire ups

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/3/c/3c8a3db4fec53d122f02764f4e4cbbc28980df5c.png)

The above image shows how an alert is fired without the instance name and you can see in messge/descirption/ I have tried multiple ways to get it by providing different ways of naming it

I am also sharing you the data source inputs that I have configured

 ![image (3)](https://us1.discourse-cdn.com/elastic/original/3X/8/7/87683544506c6559663e60e56da4f06ed67f8c36.png)

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 28, 2022, 6:58am UTC](https://discuss.elastic.co/t/unable-to-fetch-data-from-elasticsearch-for-alerts-from-grafana/308328/2 "2022-06-28T06:58:55Z")

</div>

I am not sure if we have a heap of Grafana knowledge here unfortunately, have you asked on their forums?

---

<div class="post-metadata">

**Author:** ![jay\_bamaniya](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jay_bamaniya/32/107646_2.png) [@jay\_bamaniya](https://discuss.elastic.co/u/jay_bamaniya)\
**Post date:** [June 28, 2022, 7:04am UTC](https://discuss.elastic.co/t/unable-to-fetch-data-from-elasticsearch-for-alerts-from-grafana/308328/3 "2022-06-28T07:04:25Z")

</div>

Yes I Have already posted the same in their forums but haven't got any reply from their side, I have posted it 4 days ago

---

<div class="post-metadata">

**Author:** ![jay\_bamaniya](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jay_bamaniya/32/107646_2.png) [@jay\_bamaniya](https://discuss.elastic.co/u/jay_bamaniya)\
**Post date:** [June 28, 2022, 7:05am UTC](https://discuss.elastic.co/t/unable-to-fetch-data-from-elasticsearch-for-alerts-from-grafana/308328/4 "2022-06-28T07:05:28Z")

</div>

Even if we get just hostname it will be very helpfull for us to analyse the error at that particular server

---

<div class="post-metadata">

**Author:** ![jay\_bamaniya](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jay_bamaniya/32/107646_2.png) [@jay\_bamaniya](https://discuss.elastic.co/u/jay_bamaniya)\
**Post date:** [June 28, 2022, 7:13am UTC](https://discuss.elastic.co/t/unable-to-fetch-data-from-elasticsearch-for-alerts-from-grafana/308328/5 "2022-06-28T07:13:50Z")

</div>

Is there any way, same thing can be done through Elasticsearch, I have gone through the docs of rules and connectors where it is possible to do so. They were asking for upgrade to use it in slack , can't I use slack without the upgrade

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 26, 2022, 7:14am UTC](https://discuss.elastic.co/t/unable-to-fetch-data-from-elasticsearch-for-alerts-from-grafana/308328/6 "2022-07-26T07:14:13Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
