Metricbeat 7.0.0 on Windows x64 Elasticsearch template setup error

Metricbeat: 7.0.0
ELK: 7.0.0
OS: MS Windows Server 2016 Core

I call on the Elasticsearch host

metricbeat setup --template -E output.logstash.enabled=false -E 'output.elasticsearch.hosts=["localhost:9200"]'

and I get

Error: invalid argument "'output.elasticsearch.hosts=[localhost:9200]'" for "-E, --E" flag: expected ',' when parsing '[localhost:9200]''

I just copy the command from documentation!

It looks like you are running the command on Windows. You need to run the following command from a powershell prompt as described in the documentation.

.\metricbeat.exe setup --template -E output.logstash.enabled=false -E 'output.elasticsearch.hosts=["localhost:9200"]'
1 Like

You're absolutely right! Thanks.

Probably it will be useful to add some checks to run such operations in the Powershell with plain error messages.

That's a good idea. You can request this by opening an enhancement request in the beats repo.

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