We are facing an issue while we want to connect Grafana to an ElasticSearch database.
Here is our situation : Grafana is connected to ElasticSearch through a gateway Knox.
Knox, for reasons we don’t understand yet, removes the “\n” characters and so, when Grafana performs an “_msearch” query (each query separated by “\n”), it gives an HTTP 400…
We tried with to query ElasticSearch with “curl” through Knox like that :
curl -i -H “Content-Type: application/json” -XPOST “http://…” => does not work
curl -i -H “Content-Type: application/octet-stream” -XPOST “http://…” => it works !
So, with a “Content-Type: application/octet-stream” we success to query ElasticSearch through Knox.
But, Grafana does not work this way : it produces HTTP query with “Content-Type: application/json”.
Thus, we attempt to modify Grafana’s source code but even if we modify this file :
replacing “application/json” by “application/octet-stream”, recompiling the whole application, Grafana still query ElasticSearch with “application/json”…
So, could you help us to solve this issue and make possible Grafana querying with “content-type:application/octet-stream” instead of “content-type:application/json” ?