From 870cec5f91b6a22289dc9aed275821bde104b74c Mon Sep 17 00:00:00 2001 From: DeDe Morton Date: Thu, 1 Nov 2018 15:09:16 -0700 Subject: [PATCH] Add conditions for each platform (#8811) * Add conditions for each platform * Add conditions to directory layout topic * Combine conditions for deb and rpm --- auditbeat/docs/configuring-howto.asciidoc | 4 +- auditbeat/docs/getting-started.asciidoc | 11 +- auditbeat/docs/index.asciidoc | 5 + filebeat/docs/configuring-howto.asciidoc | 4 +- filebeat/docs/getting-started.asciidoc | 12 +- filebeat/docs/index.asciidoc | 5 + heartbeat/docs/configuring-howto.asciidoc | 4 +- heartbeat/docs/getting-started.asciidoc | 11 +- heartbeat/docs/index.asciidoc | 5 + journalbeat/docs/configuring-howto.asciidoc | 4 - journalbeat/docs/getting-started.asciidoc | 11 +- journalbeat/docs/index.asciidoc | 2 + libbeat/docs/config-file-format.asciidoc | 1 - libbeat/docs/dashboards.asciidoc | 35 +++--- libbeat/docs/shared-directory-layout.asciidoc | 33 +++--- libbeat/docs/shared-logstash-config.asciidoc | 8 +- libbeat/docs/shared-template-load.asciidoc | 109 ++++++++++++------ libbeat/docs/yaml.asciidoc | 8 +- metricbeat/docs/configuring-howto.asciidoc | 4 +- metricbeat/docs/gettingstarted.asciidoc | 11 +- metricbeat/docs/index.asciidoc | 5 + packetbeat/docs/configuring-howto.asciidoc | 4 +- packetbeat/docs/gettingstarted.asciidoc | 11 +- packetbeat/docs/index.asciidoc | 5 + winlogbeat/docs/configuring-howto.asciidoc | 4 +- winlogbeat/docs/getting-started.asciidoc | 2 - winlogbeat/docs/index.asciidoc | 2 + 27 files changed, 168 insertions(+), 152 deletions(-) diff --git a/auditbeat/docs/configuring-howto.asciidoc b/auditbeat/docs/configuring-howto.asciidoc index 40efe9693071..5d7dd5477859 100644 --- a/auditbeat/docs/configuring-howto.asciidoc +++ b/auditbeat/docs/configuring-howto.asciidoc @@ -49,7 +49,6 @@ include::./auditbeat-general-options.asciidoc[] include::./reload-configuration.asciidoc[] -:allplatforms: include::../../libbeat/docs/queueconfig.asciidoc[] include::../../libbeat/docs/outputconfig.asciidoc[] @@ -70,10 +69,11 @@ include::../../libbeat/docs/loggingconfig.asciidoc[] :standalone: include::../../libbeat/docs/shared-env-vars.asciidoc[] +:standalone!: :standalone: -:allplatforms: include::../../libbeat/docs/yaml.asciidoc[] +:standalone!: include::../../libbeat/docs/regexp.asciidoc[] diff --git a/auditbeat/docs/getting-started.asciidoc b/auditbeat/docs/getting-started.asciidoc index b330ba204cf2..a6efca0f3dd3 100644 --- a/auditbeat/docs/getting-started.asciidoc +++ b/auditbeat/docs/getting-started.asciidoc @@ -181,13 +181,11 @@ include::../../libbeat/docs/step-look-at-config.asciidoc[] [id="{beatname_lc}-template"] === Step 3: Load the index template in {es} -:allplatforms: include::../../libbeat/docs/shared-template-load.asciidoc[] [[load-kibana-dashboards]] === Step 4: Set up the {kib} dashboards -:allplatforms: include::../../libbeat/docs/dashboards.asciidoc[] [id="{beatname_lc}-starting"] @@ -201,14 +199,7 @@ NOTE: If you use an init.d script to start {beatname_uc} on deb or rpm, you can' specify command line flags (see <>). To specify flags, start {beatname_uc} in the foreground. -*deb:* - -["source","sh",subs="attributes"] ----------------------------------------------------------------------- -sudo service {beatname_lc} start ----------------------------------------------------------------------- - -*rpm:* +*deb and rpm:* ["source","sh",subs="attributes"] ---------------------------------------------------------------------- diff --git a/auditbeat/docs/index.asciidoc b/auditbeat/docs/index.asciidoc index 508755b92c99..28e01662b530 100644 --- a/auditbeat/docs/index.asciidoc +++ b/auditbeat/docs/index.asciidoc @@ -12,6 +12,11 @@ include::{asciidoc-dir}/../../shared/attributes.asciidoc[] :discuss_forum: beats/{beatname_lc} :beat_default_index_prefix: {beatname_lc} :has_ml_jobs: yes +:deb_os: +:rpm_os: +:mac_os: +:docker_platform: +:win_os: include::../../libbeat/docs/shared-beats-attributes.asciidoc[] diff --git a/filebeat/docs/configuring-howto.asciidoc b/filebeat/docs/configuring-howto.asciidoc index 77d3bcfcb93b..94538d344261 100644 --- a/filebeat/docs/configuring-howto.asciidoc +++ b/filebeat/docs/configuring-howto.asciidoc @@ -54,7 +54,6 @@ include::./filebeat-general-options.asciidoc[] include::./reload-configuration.asciidoc[] -:allplatforms: include::../../libbeat/docs/queueconfig.asciidoc[] include::../../libbeat/docs/outputconfig.asciidoc[] @@ -77,14 +76,15 @@ include::../../libbeat/docs/loggingconfig.asciidoc[] :standalone: include::../../libbeat/docs/shared-env-vars.asciidoc[] +:standalone!: :autodiscoverJolokia: :autodiscoverHints: include::../../libbeat/docs/shared-autodiscover.asciidoc[] :standalone: -:allplatforms: include::../../libbeat/docs/yaml.asciidoc[] +:standalone!: include::../../libbeat/docs/regexp.asciidoc[] diff --git a/filebeat/docs/getting-started.asciidoc b/filebeat/docs/getting-started.asciidoc index 81f88a92d3af..f1371eaadf54 100644 --- a/filebeat/docs/getting-started.asciidoc +++ b/filebeat/docs/getting-started.asciidoc @@ -186,19 +186,16 @@ include::../../libbeat/docs/step-look-at-config.asciidoc[] [[config-filebeat-logstash]] === Step 3: Configure Filebeat to use Logstash -:allplatforms: include::../../libbeat/docs/shared-logstash-config.asciidoc[] [[filebeat-template]] === Step 4: Load the index template in Elasticsearch -:allplatforms: include::../../libbeat/docs/shared-template-load.asciidoc[] [[load-kibana-dashboards]] === Step 5: Set up the Kibana dashboards -:allplatforms: include::../../libbeat/docs/dashboards.asciidoc[] [[filebeat-starting]] @@ -212,14 +209,7 @@ NOTE: If you use an init.d script to start Filebeat on deb or rpm, you can't specify command line flags (see <>). To specify flags, start Filebeat in the foreground. -*deb:* - -["source","sh",subs="attributes"] ----------------------------------------------------------------------- -sudo service {beatname_lc} start ----------------------------------------------------------------------- - -*rpm:* +*deb and rpm:* ["source","sh",subs="attributes"] ---------------------------------------------------------------------- diff --git a/filebeat/docs/index.asciidoc b/filebeat/docs/index.asciidoc index 17dbcdfe8706..3ecf85403fd7 100644 --- a/filebeat/docs/index.asciidoc +++ b/filebeat/docs/index.asciidoc @@ -12,6 +12,11 @@ include::{asciidoc-dir}/../../shared/attributes.asciidoc[] :discuss_forum: beats/{beatname_lc} :beat_default_index_prefix: {beatname_lc} :has_ml_jobs: yes +:deb_os: +:rpm_os: +:mac_os: +:docker_platform: +:win_os: include::../../libbeat/docs/shared-beats-attributes.asciidoc[] diff --git a/heartbeat/docs/configuring-howto.asciidoc b/heartbeat/docs/configuring-howto.asciidoc index ff23dc75e633..dfa21e81c3e5 100644 --- a/heartbeat/docs/configuring-howto.asciidoc +++ b/heartbeat/docs/configuring-howto.asciidoc @@ -46,7 +46,6 @@ include::./heartbeat-options.asciidoc[] include::./heartbeat-general-options.asciidoc[] -:allplatforms: include::../../libbeat/docs/queueconfig.asciidoc[] include::../../libbeat/docs/outputconfig.asciidoc[] @@ -67,12 +66,13 @@ include::../../libbeat/docs/loggingconfig.asciidoc[] :standalone: include::../../libbeat/docs/shared-env-vars.asciidoc[] +:standalone!: include::../../libbeat/docs/shared-autodiscover.asciidoc[] :standalone: -:allplatforms: include::../../libbeat/docs/yaml.asciidoc[] +:standalone!: include::../../libbeat/docs/regexp.asciidoc[] diff --git a/heartbeat/docs/getting-started.asciidoc b/heartbeat/docs/getting-started.asciidoc index 18c3ed4b89c4..2a435afd1180 100644 --- a/heartbeat/docs/getting-started.asciidoc +++ b/heartbeat/docs/getting-started.asciidoc @@ -205,13 +205,11 @@ include::../../libbeat/docs/step-look-at-config.asciidoc[] [[heartbeat-template]] === Step 3: Load the index template in Elasticsearch -:allplatforms: include::../../libbeat/docs/shared-template-load.asciidoc[] [[load-kibana-dashboards]] === Step 4: Set up the Kibana dashboards -:allplatforms: include::../../libbeat/docs/dashboards.asciidoc[] [[heartbeat-starting]] @@ -225,14 +223,7 @@ NOTE: If you use an init.d script to start Heartbeat on deb or rpm, you can't specify command line flags (see <>). To specify flags, start Heartbeat in the foreground. -*deb:* - -["source","sh",subs="attributes"] ----------------------------------------------------------------------- -sudo service {beatname_lc}-elastic start ----------------------------------------------------------------------- - -*rpm:* +*deb and rpm:* ["source","sh",subs="attributes"] ---------------------------------------------------------------------- diff --git a/heartbeat/docs/index.asciidoc b/heartbeat/docs/index.asciidoc index e0ece667f7a9..0176b0072904 100644 --- a/heartbeat/docs/index.asciidoc +++ b/heartbeat/docs/index.asciidoc @@ -12,6 +12,11 @@ include::{asciidoc-dir}/../../shared/attributes.asciidoc[] :discuss_forum: beats/{beatname_lc} :beat_default_index_prefix: {beatname_lc} :has_ml_jobs: yes +:deb_os: +:rpm_os: +:mac_os: +:docker_platform: +:win_os: include::../../libbeat/docs/shared-beats-attributes.asciidoc[] diff --git a/journalbeat/docs/configuring-howto.asciidoc b/journalbeat/docs/configuring-howto.asciidoc index 95d56d427f28..be66d2682511 100644 --- a/journalbeat/docs/configuring-howto.asciidoc +++ b/journalbeat/docs/configuring-howto.asciidoc @@ -47,9 +47,7 @@ include::./config-options.asciidoc[] include::./general-options.asciidoc[] -:allplatforms: include::../../libbeat/docs/queueconfig.asciidoc[] -:allplatforms!: include::../../libbeat/docs/outputconfig.asciidoc[] @@ -75,10 +73,8 @@ include::../../libbeat/docs/shared-env-vars.asciidoc[] //include::../../libbeat/docs/shared-autodiscover.asciidoc[] :standalone: -:allplatforms: include::../../libbeat/docs/yaml.asciidoc[] :standalone!: -:allplatforms!: include::../../libbeat/docs/regexp.asciidoc[] diff --git a/journalbeat/docs/getting-started.asciidoc b/journalbeat/docs/getting-started.asciidoc index 6fffeff4b5e5..2be942e97014 100644 --- a/journalbeat/docs/getting-started.asciidoc +++ b/journalbeat/docs/getting-started.asciidoc @@ -182,7 +182,6 @@ include::../../libbeat/docs/step-look-at-config.asciidoc[] IMPORTANT: This documentation is placeholder content. It has not yet been reviewed. -:allplatforms: include::../../libbeat/docs/shared-template-load.asciidoc[] [[load-kibana-dashboards]] @@ -190,7 +189,6 @@ include::../../libbeat/docs/shared-template-load.asciidoc[] IMPORTANT: This documentation is placeholder content. It has not yet been reviewed. -:allplatforms: include::../../libbeat/docs/dashboards.asciidoc[] [id="{beatname_lc}-starting"] @@ -206,14 +204,7 @@ NOTE: If you use an init.d script to start {beatname_uc} on deb or rpm, you can' specify command line flags (see <>). To specify flags, start {beatname_uc} in the foreground. -*deb:* - -["source","sh",subs="attributes"] ----------------------------------------------------------------------- -sudo service {beatname_lc} start ----------------------------------------------------------------------- - -*rpm:* +*deb and rpm:* ["source","sh",subs="attributes"] ---------------------------------------------------------------------- diff --git a/journalbeat/docs/index.asciidoc b/journalbeat/docs/index.asciidoc index be27ac9a406c..6bb3fdecbcce 100644 --- a/journalbeat/docs/index.asciidoc +++ b/journalbeat/docs/index.asciidoc @@ -13,6 +13,8 @@ include::{asciidoc-dir}/../../shared/attributes.asciidoc[] :beat_default_index_prefix: {beatname_lc} :has_ml_jobs: no :libbeat-docs: Beats Platform Reference +:deb_os: +:rpm_os: include::../../libbeat/docs/shared-beats-attributes.asciidoc[] diff --git a/libbeat/docs/config-file-format.asciidoc b/libbeat/docs/config-file-format.asciidoc index efbfb34aad8f..d72b37ba10b9 100644 --- a/libbeat/docs/config-file-format.asciidoc +++ b/libbeat/docs/config-file-format.asciidoc @@ -378,5 +378,4 @@ output.console: [[config-file-format-tips]] === YAML tips and gotchas -:allplatforms: include::yaml.asciidoc[] diff --git a/libbeat/docs/dashboards.asciidoc b/libbeat/docs/dashboards.asciidoc index def0ddd9808e..ea210d56c955 100644 --- a/libbeat/docs/dashboards.asciidoc +++ b/libbeat/docs/dashboards.asciidoc @@ -32,9 +32,7 @@ the _Beats Developer Guide_. ifndef::only-elasticsearch[] If you've configured the Logstash output, see <>. -endif::[] - -ifdef::allplatforms[] +endif::only-elasticsearch[] ifeval::["{requires-sudo}"=="yes"] @@ -42,32 +40,37 @@ include::../../libbeat/docs/shared-note-sudo.asciidoc[] endif::[] +ifdef::deb_os,rpm_os[] *deb and rpm:* ["source","sh",subs="attributes"] ---------------------------------------------------------------------- {beatname_lc} setup --dashboards ---------------------------------------------------------------------- +endif::deb_os,rpm_os[] - +ifdef::mac_os[] *mac:* ["source","sh",subs="attributes"] ---------------------------------------------------------------------- ./{beatname_lc} setup --dashboards ---------------------------------------------------------------------- +endif::mac_os[] - +ifdef::docker_platform[] *docker:* ["source","sh",subs="attributes"] ---------------------------------------------------------------------- docker run --net="host" {dockerimage} setup --dashboards ---------------------------------------------------------------------- +endif::docker_platform[] +ifdef::win_os[] +ifndef::win_only[] *win:* - -endif::allplatforms[] +endif::win_only[] Open a PowerShell prompt as an Administrator (right-click the PowerShell icon and select *Run As Administrator*). @@ -79,6 +82,7 @@ and run: ---------------------------------------------------------------------- PS > .{backslash}{beatname_lc}.exe setup --dashboards ---------------------------------------------------------------------- +endif::win_os[] ifndef::only-elasticsearch[] [[load-dashboards-logstash]] @@ -93,8 +97,7 @@ credentials. TIP: The example shows a hard-coded password, but you should store sensitive values in the <>. -ifdef::allplatforms[] - +ifdef::deb_os,rpm_os[] *deb and rpm:* ["source","sh",subs="attributes"] @@ -106,8 +109,9 @@ ifdef::allplatforms[] -E output.elasticsearch.password={pwd} \ -E setup.kibana.host=localhost:5601 ---- +endif::deb_os,rpm_os[] - +ifdef::mac_os[] *mac:* ["source","sh",subs="attributes"] @@ -119,8 +123,10 @@ ifdef::allplatforms[] -E output.elasticsearch.password={pwd} \ -E setup.kibana.host=localhost:5601 ---- +endif::mac_os[] +ifdef::docker_platform[] *docker:* ["source","sh",subs="attributes"] @@ -132,11 +138,12 @@ docker run --net="host" {dockerimage} setup -e \ -E output.elasticsearch.password={pwd} \ -E setup.kibana.host=localhost:5601 ---- +endif::docker_platform[] - +ifdef::win_os[] +ifndef::win_only[] *win:* - -endif::allplatforms[] +endif::win_only[] Open a PowerShell prompt as an Administrator (right-click the PowerShell icon and select *Run As Administrator*). @@ -153,7 +160,7 @@ PS > .{backslash}{beatname_lc}.exe setup -e ` -E output.elasticsearch.password={pwd} ` -E setup.kibana.host=localhost:5601 ---- - +endif::win_os[] endif::only-elasticsearch[] diff --git a/libbeat/docs/shared-directory-layout.asciidoc b/libbeat/docs/shared-directory-layout.asciidoc index 8dce21cc9884..4391e180156c 100644 --- a/libbeat/docs/shared-directory-layout.asciidoc +++ b/libbeat/docs/shared-directory-layout.asciidoc @@ -24,14 +24,14 @@ The directory layout of an installation is as follows: | logs | The location for the logs created by {beatname_uc}. | {path.home}/logs | path.logs |======================================================================= -You can change these settings by using CLI flags or setting <> in the configuration -file. +You can change these settings by using CLI flags or setting +<> in the configuration file. ==== Default paths {beatname_uc} uses the following default paths unless you explicitly change them. -ifeval::["{beatname_lc}"!="winlogbeat"] +ifndef::win_only[] [float] ===== deb and rpm @@ -50,6 +50,9 @@ the systemd unit file. Make sure that you start the {beatname_uc} service by us the preferred operating system method (init scripts or `systemctl`). Otherwise the paths might be set incorrectly. +endif::win_only[] + +ifdef::docker_platform[] [float] ===== docker [cols="> because the options for auto loading the template are only available for the Elasticsearch output. -ifdef::allplatforms[] +ifndef::win-only[] include::../../libbeat/docs/step-test-config.asciidoc[] -endif::allplatforms[] +endif::win-only[] -ifdef::win[] +ifdef::win-only[] TIP: To test your configuration file, change to the directory where the {beatname_uc} binary is installed, and run {beatname_uc} in the foreground with the following options specified: +.\winlogbeat.exe test config -c .\winlogbeat.yml -e+. -endif::win[] +endif::win-only[] diff --git a/libbeat/docs/shared-template-load.asciidoc b/libbeat/docs/shared-template-load.asciidoc index 6f4f1c7da8ea..cd3670ad21a7 100644 --- a/libbeat/docs/shared-template-load.asciidoc +++ b/libbeat/docs/shared-template-load.asciidoc @@ -7,11 +7,6 @@ //// resolve Beat names: beatname_uc and beatname_lc //// Use the following include to pull this content into a doc file: //// include::../../libbeat/docs/shared-template-load.asciidoc[] -//// If you want to include conditional content, you also need to -//// add the following doc attribute definition before the -//// include statement so that you have: -//// :allplatforms: -//// include::../../libbeat/docs/shared-template-load.asciidoc[] //// This content must be embedded underneath a level 3 heading. ////////////////////////////////////////////////////////////////////////// @@ -35,19 +30,19 @@ ifndef::only-elasticsearch[] NOTE: A connection to Elasticsearch is required to load the index template. If the output is not Elasticsearch, you must <>. -endif::[] +endif::only-elasticsearch[] For more information, see: ifdef::only-elasticsearch[] * <> * <> -endif::[] +endif::only-elasticsearch[] ifndef::only-elasticsearch[] * <> * <> - required for non-Elasticsearch output -endif::[] +endif::only-elasticsearch[] [[load-template-auto]] ==== Configure template loading @@ -138,7 +133,7 @@ If another output is enabled, you need to temporarily disable that output and enable Elasticsearch by using the `-E` option. The examples here assume that Logstash output is enabled. You can omit the `-E` flags if Elasticsearch output is already enabled. -endif::[] +endif::only-elasticsearch[] If you are connecting to a secured Elasticsearch cluster, make sure you've configured credentials as described in <<{beatname_lc}-configuration>>. @@ -146,17 +141,21 @@ configured credentials as described in <<{beatname_lc}-configuration>>. If the host running {beatname_uc} does not have direct connectivity to Elasticsearch, see <>. +ifndef::win_only[] To load the template, use the appropriate command for your system. +endif::win_only[] + +ifdef::win_only[] +To load the template: +endif::win_only[] ifndef::only-elasticsearch[] :disable_logstash: {sp}-E output.logstash.enabled=false -endif::[] +endif::only-elasticsearch[] ifdef::only-elasticsearch[] :disable_logstash: -endif::[] - -ifdef::allplatforms[] +endif::only-elasticsearch[] ifeval::["{requires-sudo}"=="yes"] @@ -164,31 +163,36 @@ include::./shared-note-sudo.asciidoc[] endif::[] +ifdef::deb_os,rpm_os[] *deb and rpm:* ["source","sh",subs="attributes"] ---- {beatname_lc} setup --template{disable_logstash} -E 'output.elasticsearch.hosts=["localhost:9200"]' ---- +endif::deb_os,rpm_os[] +ifdef::mac_os[] *mac:* ["source","sh",subs="attributes"] ---- ./{beatname_lc} setup --template{disable_logstash} -E 'output.elasticsearch.hosts=["localhost:9200"]' ---- +endif::mac_os[] - +ifdef::mac_os[] *docker:* ["source","sh",subs="attributes"] ---------------------------------------------------------------------- docker run {dockerimage} setup --template{disable_logstash} -E 'output.elasticsearch.hosts=["localhost:9200"]' ---------------------------------------------------------------------- +endif::mac_os[] - +ifdef::win_os[] +ifndef::win_only[] *win:* - -endif::allplatforms[] +endif::win_only[] Open a PowerShell prompt as an Administrator (right-click the PowerShell icon and select *Run As Administrator*). @@ -200,7 +204,7 @@ and run: ---------------------------------------------------------------------- PS > .{backslash}{beatname_lc}.exe setup --template{disable_logstash} -E 'output.elasticsearch.hosts=["localhost:9200"]' ---------------------------------------------------------------------- - +endif::win_os[] [[force-kibana-new]] ===== Force Kibana to look at newest documents @@ -210,20 +214,34 @@ the index may contain old documents. After you load the index template, you can delete the old documents from +{beatname_lc}-*+ to force Kibana to look at the newest documents. Use this command: -*deb, rpm, and mac:* +ifdef::deb_os,rpm_os[] +*deb and rpm:* + +["source","sh",subs="attributes"] +---------------------------------------------------------------------- +curl -XDELETE 'http://localhost:9200/{beatname_lc}-*' +---------------------------------------------------------------------- +endif::deb_os,rpm_os[] + +ifdef::mac_os[] +*mac:* ["source","sh",subs="attributes"] ---------------------------------------------------------------------- curl -XDELETE 'http://localhost:9200/{beatname_lc}-*' ---------------------------------------------------------------------- +endif::mac_os[] +ifdef::win_os[] +ifndef::win_only[] *win:* +endif::win_only[] ["source","sh",subs="attributes"] ---------------------------------------------------------------------- PS > Invoke-RestMethod -Method Delete "http://localhost:9200/{beatname_lc}-*" ---------------------------------------------------------------------- - +endif::win_os[] This command deletes all indices that match the pattern +{beat_default_index_prefix}-*+. Before running this command, make sure you want to delete all indices that match @@ -236,43 +254,64 @@ If the host running {beatname_uc} does not have direct connectivity to Elasticsearch, you can export the index template to a file, move it to a machine that does have connectivity, and then install the template manually. -. Export the index template: -+ -ifdef::allplatforms[] +To export the index template, run: + +ifdef::deb_os,rpm_os[] *deb and rpm:* -+ + ["source","sh",subs="attributes"] ---- {beatname_lc} export template > {beatname_lc}.template.json ---- -+ +endif::deb_os,rpm_os[] + +ifdef::mac_os[] *mac:* -+ + ["source","sh",subs="attributes"] ---- ./{beatname_lc} export template > {beatname_lc}.template.json ---- -+ +endif::mac_os[] + +ifdef::win_os[] +ifndef::win_only[] *win:* -+ -endif::allplatforms[] +endif::win_only[] + ["source","sh",subs="attributes"] ---- PS > .{backslash}{beatname_lc}.exe export template --es.version {stack-version} | Out-File -Encoding UTF8 {beatname_lc}.template.json ---- +endif::win_os[] + +To install the template, run: + +ifdef::deb_os,rpm_os[] +*deb and rpm:* -. Install the template: -+ -*deb, rpm, and mac:* -+ ["source","sh",subs="attributes"] ---- curl -XPUT -H 'Content-Type: application/json' http://localhost:9200/_template/{beatname_lc}-{stack-version} -d@{beatname_lc}.template.json ---- -+ +endif::deb_os,rpm_os[] + +ifdef::mac_os[] +*mac:* + +["source","sh",subs="attributes"] +---- +curl -XPUT -H 'Content-Type: application/json' http://localhost:9200/_template/{beatname_lc}-{stack-version} -d@{beatname_lc}.template.json +---- +endif::mac_os[] + +ifdef::win_os[] +ifndef::win_only[] *win:* -+ +endif::win_only[] + ["source","sh",subs="attributes"] ---- PS > Invoke-RestMethod -Method Put -ContentType "application/json" -InFile {beatname_lc}.template.json -Uri http://localhost:9200/_template/{beatname_lc}-{stack-version} ---- +endif::win_os[] diff --git a/libbeat/docs/yaml.asciidoc b/libbeat/docs/yaml.asciidoc index 1266115ba625..15997c4acf03 100644 --- a/libbeat/docs/yaml.asciidoc +++ b/libbeat/docs/yaml.asciidoc @@ -46,23 +46,23 @@ Simply change to the directory where the binary is installed, and run the Beat in the foreground with the `test config` command specified. For example: -ifdef::allplatforms[] +ifndef::win-only[] ["source","shell",subs="attributes"] ---------------------------------------------------------------------- {beatname_lc} test config -c {beatname_lc}.yml ---------------------------------------------------------------------- -endif::allplatforms[] +endif::win-only[] -ifdef::win[] +ifdef::win-only[] ["source","shell",subs="attributes"] ---------------------------------------------------------------------- .\winlogbeat.exe test config -c .\winlogbeat.yml -e ---------------------------------------------------------------------- -endif::win[] +endif::win-only[] You'll see a message if the Beat finds an error in the file. diff --git a/metricbeat/docs/configuring-howto.asciidoc b/metricbeat/docs/configuring-howto.asciidoc index e20e78f7d948..c0fa9058025e 100644 --- a/metricbeat/docs/configuring-howto.asciidoc +++ b/metricbeat/docs/configuring-howto.asciidoc @@ -47,7 +47,6 @@ include::./metricbeat-general-options.asciidoc[] include::./reload-configuration.asciidoc[] -:allplatforms: include::../../libbeat/docs/queueconfig.asciidoc[] include::../../libbeat/docs/outputconfig.asciidoc[] @@ -68,14 +67,15 @@ include::../../libbeat/docs/loggingconfig.asciidoc[] :standalone: include::../../libbeat/docs/shared-env-vars.asciidoc[] +:standalone!: :autodiscoverJolokia: :autodiscoverHints: include::../../libbeat/docs/shared-autodiscover.asciidoc[] :standalone: -:allplatforms: include::../../libbeat/docs/yaml.asciidoc[] +:standalone!: include::../../libbeat/docs/regexp.asciidoc[] diff --git a/metricbeat/docs/gettingstarted.asciidoc b/metricbeat/docs/gettingstarted.asciidoc index 4861f0ed7783..1bb8036309fa 100644 --- a/metricbeat/docs/gettingstarted.asciidoc +++ b/metricbeat/docs/gettingstarted.asciidoc @@ -214,13 +214,11 @@ include::../../libbeat/docs/step-look-at-config.asciidoc[] [id="{beatname_lc}-template"] === Step 3: Load the index template in Elasticsearch -:allplatforms: include::../../libbeat/docs/shared-template-load.asciidoc[] [[load-kibana-dashboards]] === Step 4: Set up the Kibana dashboards -:allplatforms: include::../../libbeat/docs/dashboards.asciidoc[] [id="{beatname_lc}-starting"] @@ -234,14 +232,7 @@ NOTE: If you use an init.d script to start {beatname_uc} on deb or rpm, you can' specify command line flags (see <>). To specify flags, start {beatname_uc} in the foreground. -*deb:* - -["source","sh",subs="attributes"] ----------------------------------------------------------------------- -sudo service {beatname_lc} start ----------------------------------------------------------------------- - -*rpm:* +*deb and rpm:* ["source","sh",subs="attributes"] ---------------------------------------------------------------------- diff --git a/metricbeat/docs/index.asciidoc b/metricbeat/docs/index.asciidoc index 6168cb2f80e9..913bdcf0e904 100644 --- a/metricbeat/docs/index.asciidoc +++ b/metricbeat/docs/index.asciidoc @@ -12,6 +12,11 @@ include::{asciidoc-dir}/../../shared/attributes.asciidoc[] :discuss_forum: beats/{beatname_lc} :beat_default_index_prefix: {beatname_lc} :has_ml_jobs: yes +:deb_os: +:rpm_os: +:mac_os: +:docker_platform: +:win_os: include::../../libbeat/docs/shared-beats-attributes.asciidoc[] diff --git a/packetbeat/docs/configuring-howto.asciidoc b/packetbeat/docs/configuring-howto.asciidoc index 72a22e81fe79..74fb08fc36cf 100644 --- a/packetbeat/docs/configuring-howto.asciidoc +++ b/packetbeat/docs/configuring-howto.asciidoc @@ -46,7 +46,6 @@ include::./packetbeat-options.asciidoc[] include::./packetbeat-general-options.asciidoc[] -:allplatforms: include::../../libbeat/docs/queueconfig.asciidoc[] include::../../libbeat/docs/outputconfig.asciidoc[] @@ -69,10 +68,11 @@ include::../../libbeat/docs/loggingconfig.asciidoc[] :standalone: include::../../libbeat/docs/shared-env-vars.asciidoc[] +:standalone!: :standalone: -:allplatforms: include::../../libbeat/docs/yaml.asciidoc[] +:standalone!: include::../../libbeat/docs/http-endpoint.asciidoc[] diff --git a/packetbeat/docs/gettingstarted.asciidoc b/packetbeat/docs/gettingstarted.asciidoc index dd38968bddba..d749029d3cc0 100644 --- a/packetbeat/docs/gettingstarted.asciidoc +++ b/packetbeat/docs/gettingstarted.asciidoc @@ -239,14 +239,12 @@ include::../../libbeat/docs/step-look-at-config.asciidoc[] === Step 3: Load the index template in Elasticsearch :requires-sudo: yes -:allplatforms: include::../../libbeat/docs/shared-template-load.asciidoc[] [[load-kibana-dashboards]] === Step 4: Set up the Kibana dashboards :requires-sudo: yes -:allplatforms: include::../../libbeat/docs/dashboards.asciidoc[] [[packetbeat-starting]] @@ -260,14 +258,7 @@ NOTE: If you use an init.d script to start Packetbeat on deb or rpm, you can't specify command line flags (see <>). To specify flags, start Packetbeat in the foreground. -*deb:* - -["source","sh",subs="attributes"] ----------------------------------------------------------------------- -sudo service {beatname_lc} start ----------------------------------------------------------------------- - -*rpm:* +*deb and rpm:* ["source","sh",subs="attributes"] ---------------------------------------------------------------------- diff --git a/packetbeat/docs/index.asciidoc b/packetbeat/docs/index.asciidoc index 105c7663ae34..920377164a6c 100644 --- a/packetbeat/docs/index.asciidoc +++ b/packetbeat/docs/index.asciidoc @@ -12,6 +12,11 @@ include::{asciidoc-dir}/../../shared/attributes.asciidoc[] :discuss_forum: beats/{beatname_lc} :beat_default_index_prefix: {beatname_lc} :has_ml_jobs: yes +:deb_os: +:rpm_os: +:mac_os: +:docker_platform: +:win_os: include::../../libbeat/docs/shared-beats-attributes.asciidoc[] diff --git a/winlogbeat/docs/configuring-howto.asciidoc b/winlogbeat/docs/configuring-howto.asciidoc index 146564db5a17..2ae8ab527daa 100644 --- a/winlogbeat/docs/configuring-howto.asciidoc +++ b/winlogbeat/docs/configuring-howto.asciidoc @@ -40,7 +40,6 @@ include::./winlogbeat-options.asciidoc[] include::./winlogbeat-general-options.asciidoc[] -:win: include::../../libbeat/docs/queueconfig.asciidoc[] include::../../libbeat/docs/outputconfig.asciidoc[] @@ -61,10 +60,11 @@ include::../../libbeat/docs/loggingconfig.asciidoc[] :standalone: include::../../libbeat/docs/shared-env-vars.asciidoc[] +:standalone!: :standalone: -:win: include::../../libbeat/docs/yaml.asciidoc[] +:standalone!: include::../../libbeat/docs/http-endpoint.asciidoc[] diff --git a/winlogbeat/docs/getting-started.asciidoc b/winlogbeat/docs/getting-started.asciidoc index dca176fbd856..ecfc3162f314 100644 --- a/winlogbeat/docs/getting-started.asciidoc +++ b/winlogbeat/docs/getting-started.asciidoc @@ -111,7 +111,6 @@ PS C:\Program Files\Winlogbeat> .\winlogbeat.exe test config -c .\winlogbeat.yml [[config-winlogbeat-logstash]] === Step 3: Configure Winlogbeat to use Logstash -:win: include::../../libbeat/docs/shared-logstash-config.asciidoc[] [[winlogbeat-template]] @@ -122,7 +121,6 @@ include::../../libbeat/docs/shared-template-load.asciidoc[] [[load-kibana-dashboards]] === Step 5: Set up the Kibana dashboards -:win: include::../../libbeat/docs/dashboards.asciidoc[] [[winlogbeat-starting]] diff --git a/winlogbeat/docs/index.asciidoc b/winlogbeat/docs/index.asciidoc index 638e4614af13..2417d31ff3d9 100644 --- a/winlogbeat/docs/index.asciidoc +++ b/winlogbeat/docs/index.asciidoc @@ -12,6 +12,8 @@ include::{asciidoc-dir}/../../shared/attributes.asciidoc[] :discuss_forum: beats/{beatname_lc} :beat_default_index_prefix: {beatname_lc} :has_ml_jobs: yes +:win_os: +:win_only: include::../../libbeat/docs/shared-beats-attributes.asciidoc[]