Beat not waiting for elasticsearch when sending dashboard

Hi,

I'm runinng the ELK stack in docker containers (6.4). I have Metricbeat with custom dashboards that i'm mounting into the container. If elasticsearch isn't up, I get the folowing error:

metricbeat_1 | Exiting: Error importing Kibana dashboards: fail to create the Elasticsearch loader: Error creating Elasticsearch client: Couldn't connect to any of the configured Elasticsearch hosts. Errors: [Error connection to Elasticsearch http://elasticsearch:9200: Get http://elasticsearch:9200: dial tcp 172.18.0.2:9200: connect: connection refused]

I'm going to want to use docker-compose to bring up elasticsearch, logstash, kibana, metricbeat, and apm. But the nature of docker-compose is to just bring up all the containers. Is there any way i can make the beats and apm wait for elasticsearch to be up rather than spitting out that error?

Thanks,
jas

Hi,

Beats implement a retry mechanism for the output itself, but I'm afraid there is no way to retry the setup process.

If I understand your scenario, you could use some of the ideas proposed here: https://docs.docker.com/compose/startup-order/

You could also configure the scenario to run setup manually after docker-compose up, while the beats will start sending data right away, you can deploy the dashboards afterwards.

Hi Carlos,

How can I deploy the dashboards afterwards? That might be a solution that works for me.

thanks,
jas

Or, is there a way that I can move load my dashboards when kibana starts? I don't mind moving my dashboard json files to kibana. Is that possible?

thanks,
Jas

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