我已经使用 docker compose 设置了 elasticsearch 和 kibana。localhost:9200elasticsearch部署在:而 kibana 部署在localhost:5601
尝试使用 docker run 部署 metricbeat 时,出现以下错误:
$ docker run docker.elastic.co/beats/metricbeat:6.3.2 setup -E setup.kibana.host=kibana:5601 -E output.elasticsearch.hosts=["localhost:9200"]
Exiting: Couldn't connect to any of the configured Elasticsearch hosts. Errors: [Error connection to Elasticsearch http://localhost:9200: Get http://localhost:9200: dial tcp [::1]:9200: connect: cannot assign requested address]
Exiting: Couldn't connect to any of the configured Elasticsearch hosts. Errors: [Error connection to Elasticsearch http://elasticsearch:9200: Get http://elasticsearch:9200: lookup elasticsearch on 192.168.65.1:53: no such host]
Run Code Online (Sandbox Code Playgroud)
我的 docker-compose.yml: …