Metricbeat 7.0.0 on Windows x64 Elasticsearch template setup error


(Chernomazov) #1

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!


(DeDe Morton) #2

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"]'

(Chernomazov) #3

@dedemorton
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.


(DeDe Morton) #4

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