ClickHouse data source cannot be used. Error HTTP Error Bad Gateway

ClickHouse data source cannot be used. Error HTTP Error Bad Gateway

That sounds like a networking problem. Can you access or ping the Clickhouse url from where Grafana is installed?