Skip to content

Commit

Permalink
Asciidoctor migration (elastic#12006)
Browse files Browse the repository at this point in the history
* Change tagging to work with asciidoctor

* Fix formatting issues

* Changes from review
  • Loading branch information
dedemorton committed Aug 30, 2019
1 parent 0501702 commit 31a7ac1
Show file tree
Hide file tree
Showing 14 changed files with 94 additions and 58 deletions.
4 changes: 2 additions & 2 deletions docs/devguide/migrate-dashboards.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ dashboards:
Using the yml file, you can export all the dashboards for a single module or for the entire Beat using a single command:

[source,shell]
------------------
----
cd metricbeat/module/system
go run ../../../dev-tools/cmd/dashboards/export_dashboards.go -yml module.yml
-------------------
----

12 changes: 6 additions & 6 deletions docs/devguide/newdashboards.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ The `setup` phase loads:
For more details about the `setup` command, run the following:

[source,shell]
-------------------------
----
./metricbeat help setup
This command does initial setup of the environment:
Expand All @@ -73,15 +73,15 @@ Flags:
--machine-learning Setup machine learning job configurations only
--modules string List of enabled modules (comma separated)
--template Setup index template only
---------------------------
----

The flags are useful when you don't want to load everything. For example, to
import only the dashboards, use the `--dashboards` flag:

[source,shell]
---------------------
----
./metricbeat setup --dashboards
-------------------------------
----

Starting with Beats 6.0.0, the dashboards are no longer loaded directly into Elasticsearch. Instead, they are imported directly into Kibana.
Thus, if your Kibana instance is not listening on localhost, or you enabled
Expand All @@ -90,9 +90,9 @@ the config for the Beat, or pass the Kibana host and credentials as
arguments to the `setup` command. For example:

[source,shell]
-------------------------
----
./metricbeat setup -E setup.kibana.host=192.168.3.206:5601 -E setup.kibana.username=elastic -E setup.kibana.password=secret
--------------------------
----

By default, the `setup` command imports the dashboards from the `kibana`
directory, which is available in the Beat package.
Expand Down
6 changes: 6 additions & 0 deletions filebeat/docs/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ include::{asciidoc-dir}/../../shared/attributes.asciidoc[]
:has_ml_jobs: yes
:has_central_config:
:has_solutions:
:ignores_max_retries:
:has_docker_label_ex:
:has_decode_csv_fields_processor:
:has_script_processor:
:has_modules_command:
:has_registry:
:deb_os:
:rpm_os:
:mac_os:
Expand Down
2 changes: 2 additions & 0 deletions journalbeat/docs/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ include::{asciidoc-dir}/../../shared/attributes.asciidoc[]
:github_repo_name: beats
:discuss_forum: beats/{beatname_lc}
:beat_default_index_prefix: {beatname_lc}
:has_decode_csv_fields_processor:
:has_script_processor:
:deb_os:
:rpm_os:
:linux_os:
Expand Down
16 changes: 8 additions & 8 deletions libbeat/docs/command-reference.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -82,31 +82,31 @@ endif::[]
[options="header"]
|=======================
|Commands |
ifeval::[("{beatname_lc}"=="functionbeat")]
ifeval::["{beatname_lc}"=="functionbeat"]
|<<deploy-command,`deploy`>> | {deploy-command-short-desc}.
endif::[]
|<<export-command,`export`>> |{export-command-short-desc}.
|<<help-command,`help`>> |{help-command-short-desc}.
|<<keystore-command,`keystore`>> |{keystore-command-short-desc}.
ifeval::[("{beatname_lc}"=="functionbeat")]
ifeval::["{beatname_lc}"=="functionbeat"]
|<<package-command,`package`>> |{package-command-short-desc}.
|<<remove-command,`remove`>> |{remove-command-short-desc}.
endif::[]
ifeval::[("{beatname_lc}"=="filebeat") or ("{beatname_lc}"=="metricbeat")]
ifdef::has_modules_command[]
|<<modules-command,`modules`>> |{modules-command-short-desc}.
endif::[]
|<<run-command,`run`>> |{run-command-short-desc}.
|<<setup-command,`setup`>> |{setup-command-short-desc}.
|<<test-command,`test`>> |{test-command-short-desc}.
ifeval::[("{beatname_lc}"=="functionbeat")]
ifeval::["{beatname_lc}"=="functionbeat"]
|<<update-command,`update`>> |{update-command-short-desc}.
endif::[]
|<<version-command,`version`>> |{version-command-short-desc}.
|=======================

Also see <<global-flags,Global flags>>.

ifeval::[("{beatname_lc}"=="functionbeat")]
ifeval::["{beatname_lc}"=="functionbeat"]
[[deploy-command]]
==== `deploy` command

Expand Down Expand Up @@ -325,7 +325,7 @@ Shows help for the `keystore` command.

See <<keystore>> for more examples.

ifeval::[("{beatname_lc}"=="functionbeat")]
ifeval::["{beatname_lc}"=="functionbeat"]
[[package-command]]
==== `package` command

Expand Down Expand Up @@ -387,7 +387,7 @@ Shows help for the `remove` command.
-----
endif::[]

ifeval::[("{beatname_lc}"=="filebeat") or ("{beatname_lc}"=="metricbeat")]
ifdef::has_modules_command[]
[[modules-command]]
==== `modules` command

Expand Down Expand Up @@ -730,7 +730,7 @@ ifeval::["{beatname_lc}"=="metricbeat"]
-----
endif::[]

ifeval::[("{beatname_lc}"=="functionbeat")]
ifeval::["{beatname_lc}"=="functionbeat"]
[[update-command]]
==== `update` command

Expand Down
32 changes: 8 additions & 24 deletions libbeat/docs/outputconfig.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -468,21 +468,17 @@ endif::[]

===== `max_retries`

ifeval::[("{beatname_lc}"=="filebeat") or ("{beatname_lc}"=="winlogbeat")]

ifdef::ignores_max_retries[]
{beatname_uc} ignores the `max_retries` setting and retries indefinitely.

endif::[]

ifeval::[("{beatname_lc}"!="filebeat") and ("{beatname_lc}"!="winlogbeat")]

ifndef::ignores_max_retries[]
The number of times to retry publishing an event after a publishing failure.
After the specified number of retries, the events are typically dropped.

Set `max_retries` to a value less than 0 to retry until all events are published.

The default is 3.

endif::[]


Expand Down Expand Up @@ -735,21 +731,17 @@ The number of seconds to wait for responses from the Logstash server before timi

===== `max_retries`

ifeval::[("{beatname_lc}"=="filebeat") or ("{beatname_lc}"=="winlogbeat")]

ifdef::ignores_max_retries[]
{beatname_uc} ignores the `max_retries` setting and retries indefinitely.

endif::[]

ifeval::[("{beatname_lc}"!="filebeat") and ("{beatname_lc}"!="winlogbeat")]

ifndef::ignores_max_retries[]
The number of times to retry publishing an event after a publishing failure.
After the specified number of retries, the events are typically dropped.

Set `max_retries` to a value less than 0 to retry until all events are published.

The default is 3.

endif::[]

===== `bulk_max_size`
Expand Down Expand Up @@ -991,21 +983,17 @@ metadata for the configured topics. The default is true.

===== `max_retries`

ifeval::[("{beatname_lc}"=="filebeat") or ("{beatname_lc}"=="winlogbeat")]

ifdef::ignores_max_retries[]
{beatname_uc} ignores the `max_retries` setting and retries indefinitely.

endif::[]

ifeval::[("{beatname_lc}"!="filebeat") and ("{beatname_lc}"!="winlogbeat")]

ifndef::ignores_max_retries[]
The number of times to retry publishing an event after a publishing failure.
After the specified number of retries, the events are typically dropped.

Set `max_retries` to a value less than 0 to retry until all events are published.

The default is 3.

endif::[]

===== `bulk_max_size`
Expand Down Expand Up @@ -1251,21 +1239,17 @@ Redis after a network error. The default is 60s.

===== `max_retries`

ifeval::[("{beatname_lc}"=="filebeat") or ("{beatname_lc}"=="winlogbeat")]

ifdef::ignores_max_retries[]
{beatname_uc} ignores the `max_retries` setting and retries indefinitely.

endif::[]

ifeval::["{beatname_lc}"!="filebeat" and "{beatname_lc}"!="winlogbeat"]

ifndef::ignores_max_retries[]
The number of times to retry publishing an event after a publishing failure.
After the specified number of retries, the events are typically dropped.

Set `max_retries` to a value less than 0 to retry until all events are published.

The default is 3.

endif::[]


Expand Down
6 changes: 5 additions & 1 deletion libbeat/docs/processors-using.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ ifeval::["{beatname_lc}"=="filebeat"]
:processor-scope: input
endif::[]

ifeval::["{beatname_lc}"=="auditbeat" or "{beatname_lc}"=="metricbeat"]
ifeval::["{beatname_lc}"=="auditbeat"]
:processor-scope: module
endif::[]

ifeval::["{beatname_lc}"=="metricbeat"]
:processor-scope: module
endif::[]

Expand Down
1 change: 1 addition & 0 deletions libbeat/docs/security/securing-beats.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
[[securing-beats]]
== Configure {beatname_uc} to use {security}

[subs="attributes"]
++++
<titleabbrev>Use {security}</titleabbrev>
++++
Expand Down
2 changes: 1 addition & 1 deletion libbeat/docs/shared-central-management.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ ifndef::no_dashboards[]
<<load-kibana-dashboards,load the dashboards>> before enrolling the
Beat.
endif::[]
ifeval::[("{beatname_lc}"=="filebeat")]
ifeval::["{beatname_lc}"=="filebeat"]
* If you plan to define module configurations in central management, set up the
ingest pipelines before enrolling the Beat. For more information, see
<<load-ingest-pipelines>>.
Expand Down
58 changes: 49 additions & 9 deletions libbeat/docs/shared-docker.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,37 @@ ifndef::no_dashboards[]
endif::no_dashboards[]
and machine learning jobs. Run this command:

ifeval::[("{beatname_lc}"=="filebeat") or ("{beatname_lc}"=="metricbeat") or ("{beatname_lc}"=="heartbeat") or ("{beatname_lc}"=="journalbeat")]
ifeval::["{beatname_lc}"=="filebeat"]
["source", "sh", subs="attributes"]
--------------------------------------------
docker run \
{dockerimage} \
setup -E setup.kibana.host=kibana:5601 \
-E output.elasticsearch.hosts=["elasticsearch:9200"] <1> <2>
--------------------------------------------
endif::[]

ifeval::["{beatname_lc}"=="metricbeat"]
["source", "sh", subs="attributes"]
--------------------------------------------
docker run \
{dockerimage} \
setup -E setup.kibana.host=kibana:5601 \
-E output.elasticsearch.hosts=["elasticsearch:9200"] <1> <2>
--------------------------------------------
endif::[]

ifeval::["{beatname_lc}"=="heartbeat"]
["source", "sh", subs="attributes"]
--------------------------------------------
docker run \
{dockerimage} \
setup -E setup.kibana.host=kibana:5601 \
-E output.elasticsearch.hosts=["elasticsearch:9200"] <1> <2>
--------------------------------------------
endif::[]

ifeval::["{beatname_lc}"=="journalbeat"]
["source", "sh", subs="attributes"]
--------------------------------------------
docker run \
Expand Down Expand Up @@ -117,7 +147,7 @@ curl -L -O {dockerconfig}
One way to configure {beatname_uc} on Docker is to provide +{beatname_lc}.docker.yml+ via a volume mount.
With +docker run+, the volume mount can be specified like this.

ifeval::[("{beatname_lc}"=="filebeat")]
ifeval::["{beatname_lc}"=="filebeat"]
["source", "sh", subs="attributes"]
--------------------------------------------
docker run -d \
Expand All @@ -131,7 +161,7 @@ docker run -d \
--------------------------------------------
endif::[]

ifeval::[("{beatname_lc}"=="journalbeat")]
ifeval::["{beatname_lc}"=="journalbeat"]
Make sure you include the path to the host's journal. The path might be
`/var/log/journal` or `/run/log/journal`.

Expand Down Expand Up @@ -197,7 +227,20 @@ docker run -d \
--------------------------------------------
endif::[]

ifeval::[("{beatname_lc}"=="heartbeat") or ("{beatname_lc}"=="apm-server")]
ifeval::["{beatname_lc}"=="heartbeat"]
["source", "sh", subs="attributes"]
--------------------------------------------
docker run -d \
--name={beatname_lc} \
--user={beatname_lc} \
--volume="$(pwd)/{beatname_lc}.docker.yml:/usr/share/{beatname_lc}/{beatname_lc}.yml:ro" \
{dockerimage} \
--strict.perms=false -e \
-E output.elasticsearch.hosts=["elasticsearch:9200"] <1> <2>
--------------------------------------------
endif::[]

ifeval::["{beatname_lc}"=="apm-server"]
["source", "sh", subs="attributes"]
--------------------------------------------
docker run -d \
Expand All @@ -217,8 +260,7 @@ using the syntax shown earlier.

===== Customize your configuration

ifeval::[("{beatname_lc}"=="filebeat") or ("{beatname_lc}"=="metricbeat")]

ifdef::has_docker_label_ex[]
The +{beatname_lc}.docker.yml+ file you downloaded earlier is configured to deploy Beats modules based on the Docker labels applied to your containers. See <<configuration-autodiscover-hints>> for more details. Add labels to your application Docker containers, and they will be picked up by the Beats autodiscover feature when they are deployed. Here is an example command for an Apache HTTP Server container with labels to configure the Filebeat and Metricbeat modules for the Apache HTTP Server:

["source", "sh", subs="attributes"]
Expand All @@ -235,11 +277,9 @@ docker run \
-p 8080:80 \
httpd:2.4
--------------------------------------------

endif::[]

ifeval::[("{beatname_lc}"!="filebeat") and ("{beatname_lc}"!="metricbeat")]

ifndef::has_docker_label_ex[]
The +{beatname_lc}.docker.yml+ downloaded earlier should be customized for your environment. See <<configuring-howto-{beatname_lc}>> for more details. Edit the configuration file and customize it to match your environment then re-deploy your {beatname_uc} container.
endif::[]

Expand Down
2 changes: 1 addition & 1 deletion libbeat/docs/shared-path-config.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The `path` section of the +{beatname_lc}.yml+ config file contains configuration
options that define where {beatname_uc} looks for its files. For example, {beatname_uc}
looks for the Elasticsearch template file in the configuration path and writes
log files in the logs path.
ifeval::["{beatname_lc}"=="filebeat" or "{beatname_lc}"=="winlogbeat"]
ifdef::has_registry[]
{beatname_uc} looks for its registry files in the data path.
endif::[]

Expand Down
6 changes: 0 additions & 6 deletions libbeat/docs/step-configure-output.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,9 @@ ifndef::has_module_steps[]
--
+
ifndef::only-elasticsearch[]
ifeval::["{beatname_lc}"!="filebeat" and "{beatname_lc}"!="winlogbeat"]
To send output to {ls},
<<logstash-output,Configure the {ls} output>> instead. For all other
outputs, see <<configuring-output>>.
endif::[]
ifeval::[("{beatname_lc}"=="filebeat") or ("{beatname_lc}"=="winlogbeat")]
To send output to {ls}, make sure you configure the Logstash output in
<<config-{beatname_lc}-logstash>>. For all other outputs, see <<configuring-output>>.
endif::[]
endif::only-elasticsearch[]
ifdef::only-elasticsearch[]
{es} is currently the only output supported by {beatname_uc}.
Expand Down
2 changes: 2 additions & 0 deletions metricbeat/docs/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ include::{asciidoc-dir}/../../shared/attributes.asciidoc[]
:has_ml_jobs: yes
:has_central_config:
:has_solutions:
:has_docker_label_ex:
:has_modules_command:
:deb_os:
:rpm_os:
:mac_os:
Expand Down
Loading

0 comments on commit 31a7ac1

Please sign in to comment.