Can't make Metricbeat to use passed env variable

I'm trying to run metricbeat service in docker, according to the official documentation (version 7.2.0). Here's my bash command for setup:

docker run -d --name=metricbeat docker.elastic.co/beats/metricbeat:7.2.0 setup\
 -e setup.kibana.host=http://XXX.XXX.XXX.XXX:5601\
 -e output.elasticsearch.host=["XXX.XXX.XXX.XXX:9200"]\
 -e output.elasticsearch.password=XXXXXXXX

As you see I'm passing the output.elasticsearch.host variable and it's definitely not equal to the default value. But here's the part of the metricbeat container logs:

2019-07-31T14:32:40.335Z        INFO    elasticsearch/client.go:166     Elasticsearch url: http://elasticsearch:9200

This means that metricbeat used the default Elastic host instead of the environment variable value. How can I fix it?

Thanks in advance!

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