Cloud elastic search aiuthentication


I am trying to connect to an elastic search deployment on but hitting a wall with authentication maybe?

  • What Grafana version and what operating system are you using?

  • What are you trying to achieve?
    Connect to cloud elastic search

  • How are you trying to achieve it?
    Following the official ES doc

  • What happened?
    Bad Gateway

  • What did you expect to happen?
    Return results, just like it does to our internal elasticsearch

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.

logger=data-proxy-log userId=1 orgId=1 uname=xxx path=/api/datasources/proxy/24/zebra/_mapping remote_addr=[::1] referer=https://localhost:3000/datasources/edit/E4iN8elnk t=2022-05-12T15:02:50.38-0700 lvl=eror msg="Data proxy error" error="http: proxy error: net/http: invalid header field name \"apikey_key \""
logger=context t=2022-05-12T15:02:50.38-0700 lvl=eror msg="Request Completed" method=GET path=/api/datasources/proxy/24/zebra/_mapping status=502 remote_addr=[::1] time_ms=73 size=0 referer=https://localhost:3000/datasources/edit/E4iN8elnk
  • Did you follow any online instructions? If so, what is the URL?
    I am trying to follow this approach to get authentication to work

Using a free trial of es from


es = Elasticsearch(
    api_key=(config['DEFAULT']['apikey_id'], config['DEFAULT']['apikey_key']),

This from the above document might lead to a solution