Grafana integration with Elasticsearch : Bad Gateway

I am trying to integrate Elasticsearch as datasource with Grafana but getting Bad Gateway error.

Elasticsearch 8.2 version running on one VM (OS - ubuntu)-

I downloaded ‘grafana-enterprise-10.0.2.linux-amd64.tar.gz’ package in another VN (OS - ubuntu) and changed the ‘http_port’ and ‘domain’ parameter in default.ini file only and just running it without installing.

I got the solution. Thank you.