Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can that work ? #6

Open
ebuildy opened this issue Jan 20, 2017 · 1 comment
Open

How can that work ? #6

ebuildy opened this issue Jan 20, 2017 · 1 comment

Comments

@ebuildy
Copy link

ebuildy commented Jan 20, 2017

Curious to know if this image is working?

curl $ELASTIC_PATH

and after

curl -XPUT "http://$ELASTIC_PATH/

while [ ! "$(curl $ELASTIC_PATH 2> /dev/null)" -a $counter -lt 30  ]; do
      sleep 1
      let counter++
      echo "waiting for Elasticsearch to be up ($counter/30)"
    done

    curl -XPUT "http://$ELASTIC_PATH/_template/metricbeat" -d@/metricbeat/metricbeat.template-es2x.json
@athieriot
Copy link
Owner

Hi there,
Thank you for the heads up.

First of all, this feature is in fact only use in the specific scenario where you set an ELASTICSEARCH_URL. For example in the case you forward Metric beats events to Logstash but still want the Elasticsearch template to be uploaded. So I suspect most people are not using it and, if it's not working, that's probably why it stayed under the radar.
On top of it, this part failing doesn't mean the container will stop running. You might not have your template uploaded but the service will start just fine after 30 failed attempts.

However, would you mind expanding your exact issue? I believe that cURL will fallback automatically on HTTP if not scheme is given. That first call being use as a simple ping anyway.

I'll be happy to publish a fix if there is any problem.

Aurélien

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants