Clarify docs about manually loading the template#5635
Clarify docs about manually loading the template#5635andrewkroh merged 3 commits intoelastic:masterfrom
Conversation
| ["source","sh",subs="attributes"] | ||
| ---- | ||
| ./{beatname_lc} setup --template | ||
| ./{beatname_lc} setup --template -E output.logstash.enabled=false -E 'output.elasticsearch.hosts=["localhost:9200"]' |
There was a problem hiding this comment.
decided to show this in the example since it sounds like the most common use case for manual loading is when Logstash output is configured.
|
|
||
| ["source","sh",subs="attributes"] | ||
| ---- | ||
| ./{beatname_lc} export template > {beatname_lc}.template.json |
There was a problem hiding this comment.
For Winlogbeat I think it makes sense to show the curl command because you might export it on Windows and then import it on a *nix machine. This does mess up the conditional logic because the export command needs to be .\{beatname_lc}.exe.
To solve this I recommend breaking apart the export and import steps. Keep the conditional logic around the export commands. And always show how to import it using both Windows (Invoke-RestMethod ) and nix (curl).
|
In the section where we show how to delete the index I think we should show the equivalent Windows command.
|
| docker run {dockerimage} setup --template -E output.logstash.enabled=false -E 'output.elasticsearch.hosts=["localhost:9200"]' | ||
| ---------------------------------------------------------------------- | ||
|
|
||
|
|
There was a problem hiding this comment.
Adding double line breaks after examples because it fixes rendering issues when these files are viewed on GitHub (I can't do this for examples that exist within lists, so you'll notice some inconsistencies here).
|
@andrewkroh I've made the changes that you requested. I decided to make the Note a separate section because it was getting too long to be a note. I have not updated the original screen shots in the PR to show these changes. If you want me to, just let me know. |
| ==== Load the template manually (alternate method) | ||
|
|
||
| If the host running {beatname_uc} does not have direct connectivity to | ||
| Elasticsearch, you can export the index template to a file and then install the |
There was a problem hiding this comment.
Maybe it won't be obvious to users that they need to move or copy it to a different machine with ES connectivity. Should we add this into this sentence (e.g. export, transfer, and then install)?
| + | ||
| ["source","sh",subs="attributes"] | ||
| ---- | ||
| curl -XPUT -H 'Content-Type: application/json' http://elasticsearch:9200/_template/{beatname_lc}-{stack-version} -d@{beatname_lc}.template.json |
There was a problem hiding this comment.
In other places we just use localhost:9200. To be consistent I think this (and the one below) should also be localhost:9200.
|
@andrewkroh I've made the additional changes that you requested. |
Clarify docs about manually loading the template
Clarify docs about manually loading the template
Clarify docs about manually loading the template
Clarify docs about manually loading the template
Clarify docs about manually loading the template
Clarify docs about manually loading the template
Resolves #5615
I also did a bit of editing to pare away some unnecessary words, reflow sections, and add context where I felt it was missing.
The conditional coding on this particular topic is a bit eccentric due to the existence of Winlogbeat, so I'm going to paste a screen capture of the compiled webpage here. For Winlogbeat (not shown here), all the unix-specific commands are removed.
These screens are old. See the diff for changes
(I'm going to fix the "pass credentials" section in a separate PR because it's shared content that lives in a separate file.)