diff --git a/docs/copied-from-beats/command-reference.asciidoc b/docs/copied-from-beats/command-reference.asciidoc index d721b95eecd..9efa2c6678e 100644 --- a/docs/copied-from-beats/command-reference.asciidoc +++ b/docs/copied-from-beats/command-reference.asciidoc @@ -17,11 +17,11 @@ :deploy-command-short-desc: Deploys the specified function to your serverless environment ifndef::no_dashboards[] -:export-command-short-desc: Exports the configuration, index template, or a dashboard to stdout +:export-command-short-desc: Exports the configuration, index template, ilm-policy or a dashboard to stdout endif::no_dashboards[] ifdef::no_dashboards[] -:export-command-short-desc: Exports the configuration or index template to stdout +:export-command-short-desc: Exports the configuration, index template, or ilm-policy to stdout endif::no_dashboards[] :help-command-short-desc: Shows help for any command @@ -32,15 +32,15 @@ endif::no_dashboards[] :run-command-short-desc: Runs {beatname_uc}. This command is used by default if you start {beatname_uc} without specifying a command ifdef::has_ml_jobs[] -:setup-command-short-desc: Sets up the initial environment, including the index template, {kib} dashboards (when available), and machine learning jobs (when available) +:setup-command-short-desc: Sets up the initial environment, including the index template, ilm policy and write alias, {kib} dashboards (when available), and machine learning jobs (when available) endif::[] ifdef::no_dashboards[] -:setup-command-short-desc: Sets up the initial environment, including the ES index template +:setup-command-short-desc: Sets up the initial environment, including the ES index template, ilm policy and write alias endif::no_dashboards[] ifndef::has_ml_jobs,no_dashboards[] -:setup-command-short-desc: Sets up the initial environment, including the index template and {kib} dashboards (when available) +:setup-command-short-desc: Sets up the initial environment, including the index template, ilm policy and write alias, and {kib} dashboards (when available) endif::[] :update-command-short-desc: Updates the specified function @@ -145,13 +145,13 @@ endif::[] ifndef::no_dashboards[] {export-command-short-desc}. You can use this command to quickly view your configuration, see the contents of the index -template, or export a dashboard from {kib}. +template and the ilm policy, or export a dashboard from {kib}. endif::no_dashboards[] ifdef::no_dashboards[] {export-command-short-desc}. You can use this command to quickly view your configuration or see the contents of the index -template. +template or the ilm policy. endif::no_dashboards[] *SYNOPSIS* @@ -194,19 +194,21 @@ endif::no_dashboards[] [[template-subcommand]]*`template`*:: Exports the index template to stdout. You can specify the `--es.version` and -`--index` flags to further define what gets exported. +`--index` flags to further define what gets exported. Furthermore you can export +the template to a file instead of `stdout` by defining a directory via `--dir`. -ifndef::apm-server[] [[ilm-policy-subcommand]] *`ilm-policy`*:: -Exports ILM policy to stdout. -endif::apm-server[] +Exports ILM policy to stdout. You can specify the `--es.version` and a `--dir` +to which the policy should be exported as a file rather than exporting to `stdout`. *FLAGS* *`--es.version VERSION`*:: When used with <>, exports an index template that is compatible with the specified version. +When used with <>, exports the ilm policy +if the specified ES version is enabled for ILM. *`-h, --help`*:: Shows help for the `export` command. @@ -216,6 +218,10 @@ When used with <>, sets the base name to use for the index template. If this flag is not specified, the default base name is +{beatname_lc}+. +*`--dir DIRNAME`*:: +Define a directory to which the template and ilm-policy should be exported to +as files instead of printing them to `stdout`. + ifndef::no_dashboards[] *`--id DASHBOARD_ID`*:: When used with <>, specifies the dashboard ID. @@ -584,6 +590,10 @@ Or: {setup-command-short-desc} * The index template ensures that fields are mapped correctly in Elasticsearch. +If index lifecycle management is enabled it also ensures that the defined ILM policy +and write alias are connected to the indices matching the index template. +The ILM policy takes care of the lifecycle of an index, when to do a rollover, +when to move an index from the hot phase to the next phase etc. ifndef::no_dashboards[] * The {kib} dashboards make it easier for you to visualize {beatname_uc} data @@ -636,15 +646,19 @@ enabled modules in the +{beatname_lc}.yml+ file. If you used the directory, also specify the `--modules` flag. endif::[] -ifndef::apm-server[] +*`--index-management`*:: +Sets up components related to Elasticsearch index management including +template, ilm policy, and write alias. + *`--template`*:: +deprecated[7.2] Sets up the index template only. -endif::apm-server[] +It is recommended to use `--index-management` instead. -ifdef::apm-server[] -*` --index-management`*:: -Sets up <>. -endif::[] +*`--ilm-policy`*:: +deprecated[7.2] +Sets up the index lifecycle policy. +It is recommended to use `--index-management` instead. {global-flags} @@ -657,7 +671,7 @@ ifeval::["{beatname_lc}"=="filebeat"] {beatname_lc} setup --machine-learning {beatname_lc} setup --pipelines {beatname_lc} setup --pipelines --modules system,nginx,mysql <1> -{beatname_lc} setup --template +{beatname_lc} setup --index-management ----- <1> If you used the <> command to enable modules in the `modules.d` directory, also specify the `--modules` flag to indicate which @@ -671,14 +685,14 @@ ifndef::no_dashboards[] ----- {beatname_lc} setup --dashboards {beatname_lc} setup --machine-learning -{beatname_lc} setup --template +{beatname_lc} setup --index-management ----- endif::no_dashboards[] ifdef::no_dashboards[] ["source","sh",subs="attributes"] ----- {beatname_lc} setup --machine-learning -{beatname_lc} setup --template +{beatname_lc} setup --index-management ----- endif::no_dashboards[]