# Grafana with elasticsearch : HTTP 400 bad request issue

**URL:** <https://discuss.elastic.co/t/grafana-with-elasticsearch-http-400-bad-request-issue/142791>\
**Category:** Elasticsearch\
**Created:** [August 2, 2018, 4:44pm UTC](https://discuss.elastic.co/t/grafana-with-elasticsearch-http-400-bad-request-issue/142791 "2018-08-02T16:44:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sebastienf](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@sebastienf](https://discuss.elastic.co/u/sebastienf)\
**Post date:** [August 2, 2018, 4:44pm UTC](https://discuss.elastic.co/t/grafana-with-elasticsearch-http-400-bad-request-issue/142791/1 "2018-08-02T16:44:07Z")

</div>

I am trying to bind Grafana 5.2.1 with ES 5.5.  
I success to make an ES Data Source and it works perfectly ; index and time field are read correctly without error).  
Then, I am facing a weird issue ; when I create a dashboard then a graph (simple histogram), I get an HTTP 400 "bad request", with the reason "Validation Failed: 1: no requests added;".

I can reproduce this exception throught a curl like this, where all stand in one line :

```
curl -XPOST 'http://#####:9200/_msearch' -u 'user:password' -d '{"index" : "my_index"} {"query" : {"match_all" : {}}, "from" : 0, "size" : 10}'

```

And if I do the curl like this (with breaking lines), it works perfectly :

```
curl -XPOST 'http://#####:9200/_msearch' -u 'user:password' -d '
{"index" : "my_index"}
{"query" : {"match_all" : {}}, "from" : 0, "size" : 10}

'

```

So, I presume that Grafana tranforms the query and makes something wrong.  
I did not see anything about my trouble, so I'll be pleased if anyone can help me. Thanks.

---

<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:** [August 30, 2018, 4:44pm UTC](https://discuss.elastic.co/t/grafana-with-elasticsearch-http-400-bad-request-issue/142791/2 "2018-08-30T16:44:17Z")

</div>

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