# Metricbeat & docker & kibana dashboard

**URL:** <https://discuss.elastic.co/t/metricbeat-docker-kibana-dashboard/238090>\
**Category:** Beats\
**Tags:** docker, metricbeat\
**Created:** [June 22, 2020, 1:10pm UTC](https://discuss.elastic.co/t/metricbeat-docker-kibana-dashboard/238090 "2020-06-22T13:10:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![smm](https://avatars.discourse-cdn.com/v4/letter/s/bb73d2/32.png) [@smm](https://discuss.elastic.co/u/smm)\
**Post date:** [June 22, 2020, 1:10pm UTC](https://discuss.elastic.co/t/metricbeat-docker-kibana-dashboard/238090/1 "2020-06-22T13:10:44Z")

</div>

Hi there, I have a quite interesting question: I am deplyoing an elastic cluster with docker-compose. The problem I could not solve so far: docker-compose starts all containers, also metricbeat. But metricbeat tries to contact kibana in order to push dashboards & templates to elasticsearch. But a beat container is always faster than an elasrticsearch cluster ;-). Metricbeats tells: sorry, noone out there and exits the start. So, is it possible to solve this issue? How do you to this?  
Thanks for your input.

PS 'depende\_on:' does not help  
PPS Here is the metricbeat part I use:

metricbeat:  
image: [docker.elastic.co/beats/metricbeat:7.7.1](http://docker.elastic.co/beats/metricbeat:7.7.1)  
container\_name: metricbeat  
user: root  
environment:  
- ELASTICSEARCH\_USERNAME={ELASTICSEARCH\_USERNAME:-elastic} - ELASTICSEARCH\_PASSWORD={ELASTICSEARCH\_PASSWORD:-changeme}  
- ELASTICSEARCH\_HOSTS= "[http://esnode1:9200](http://esnode1:9200)"  
command: ["--strict.perms=false"]  
depends\_on:  
- kibana  
- esnode1  
- esnode2  
- esnode3  
#kibana:  
# condition: service\_healthy  
networks:  
- elasticnet  
volumes:  
- ./config/metricbeat.yml:/usr/share/metricbeat/metricbeat.yml:ro  
- /var/lib/docker/containers:/var/lib/docker/containers:ro  
- /var/run/docker.sock:/var/run/docker.sock:ro  
- metricbeatlogs:/usr/share/metricbeat/logs

PPPS Error message:  
metricbeat | Exiting: error connecting to Kibana: fail to get the Kibana version: HTTP GET request to [http://kibana:5601/api/status](http://kibana:5601/api/status) fails: fail to execute the HTTP GET request: Get [http://kibana:5601/api/status:](http://kibana:5601/api/status:) dial tcp 172.19.0.7:5601: connect: connection refused. Response: .  
metricbeat exited with code 1

---

<div class="post-metadata">

**Author:** ![mtojek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mtojek/32/63863_2.png) [@mtojek](https://discuss.elastic.co/u/mtojek)\
**Post date:** [June 23, 2020, 9:14am UTC](https://discuss.elastic.co/t/metricbeat-docker-kibana-dashboard/238090/2 "2020-06-23T09:14:23Z")

</div>

Did you try with healthchecks?

---

<div class="post-metadata">

**Author:** ![smm](https://avatars.discourse-cdn.com/v4/letter/s/bb73d2/32.png) [@smm](https://discuss.elastic.co/u/smm)\
**Post date:** [June 27, 2020, 8:38am UTC](https://discuss.elastic.co/t/metricbeat-docker-kibana-dashboard/238090/3 "2020-06-27T08:38:41Z")

</div>

No, actually I did not.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 25, 2020, 10:38am UTC](https://discuss.elastic.co/t/metricbeat-docker-kibana-dashboard/238090/4 "2020-07-25T10:38:42Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
