Grafana Cloud with Elasticsearch Data Source

How can i use elasticsearch as data source in Grafana Cloud ? I have created an account in grafana cloud and i want to add data source as elasticsearch. I installed elasticsearch in my local server. When try to add elasticsearch as data source it is giving 502 error(gateway issue). So, how can i add elasticsearch as data source in grafana ?. Any ideas and explanations are welcome.

Joel T Stephen


First, make sure that you configure your elasticsearch datasource in Grafana using the Access=Direct, see screenshot below.

Second, you’ll need to enable CORS in elasticsearch since Grafana will communicate with your local elasticsearch instance solely from the browser. How you do this for your elasticsearch version can be found in officical elasticsearch documentation.