I am trying to run ELK APM - application performance monitoring container on AWS.

Image: docker.elastic.co/apm/apm-server:7.3.1

Port mapping 8200:8200

and setting Environment variables

output.elasticsearch.hosts = ['http://ec2-xxxxxxx.compute.amazonaws.com:9200']
setup.kibana.host = ec2-xxxxxxx.compute.amazonaws.com:5601

This stated here: https://www.elastic.co/guide/en/apm/server/current/running-on-docker.html

should work: -E output.elasticsearch.hosts=["elasticsearch:9200"]

which corresponds to environment variable set in aws.

Also regular config file suggests naming should be same: https://www.elastic.co/guide/en/apm/server/current/elasticsearch-output.html

but started container for sure ignores the settings. And error is seen in logs:

ERROR   pipeline/output.go:100  Failed to connect to backoff(elasticsearch(http://elasticsearch:9200)): Get http://elasticsearch:9200: lookup elasticsearch on no such host

so clearly showing that its using default configuration from /usr/share/apm-server/apm-server.yml

see https://github.com/elastic/apm-server/blob/master/apm-server.docker.yml#L335

where elasticsearch output is set to http://elasticsearch:9200

  • Could you check whether it is a firewall issue? – 030 Dec 31 '19 at 18:24
  • the problem is that container inside does not take environment variables on startup. Firewall not involved yet (but security groups are ok). Temporary solution is to build custom image, upload to ECR and start from here.. – Arunas Bartisius Jan 1 at 16:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.