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

Docs to manually loading template in 6.0 #5615

Closed
andrewkroh opened this issue Nov 16, 2017 · 0 comments · Fixed by #5635
Closed

Docs to manually loading template in 6.0 #5615

andrewkroh opened this issue Nov 16, 2017 · 0 comments · Fixed by #5635
Labels

Comments

@andrewkroh
Copy link
Member

andrewkroh commented Nov 16, 2017

The documentation for manually loading index templates only works if you are using the ES output. The users that most commonly need to manually load the index templates are users of non-ES outputs.

To accomplish this task you need to disable the Logstash output and manually enable ES on the CLI.

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

Alternatively you can export the template to a file and use curl or Invoke-RestMethod. This is useful if the host running Beats does not have direct connectivity to ES.

Windows:

# Write the template to disk.
PS> .\winlogbeat.exe export template --es.version 6.0.0 | Out-File -Encoding UTF8 winlogbeat.template.json

# Install it to ES.
PS > Invoke-RestMethod -Method Put -ContentType "application/json" -InFile winlogbeat.template.json -Uri http://elasticsearch:9200/_template/winlogbeat-6.0.0

Unix:

filebeat export template > filebeat.template.json

curl -XPUT -H 'Content-Type: application/json' http://elasticsearch:9200/_template/filebeat-6.0.0 -d@filebeat.template.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant