Skip to content

Commit db8dac8

Browse files
simittruflin
authored andcommitted
Docs: Add deprecation check for dashboard loading. (#7675)
For APM Server the recommended way of loading dashboards and Kibana index pattern will be through the Kibana UI from 6.4 on. Since the docs are based on the libbeat docs we need to add a deprecation flag for dashboard and index pattern related documentation. relates to elastic/apm-server#1142
1 parent 623be88 commit db8dac8

File tree

5 files changed

+92
-10
lines changed

5 files changed

+92
-10
lines changed

libbeat/docs/command-reference.asciidoc

Lines changed: 53 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,22 @@
2020
:modules-command-short-desc: Manages configured modules
2121
:run-command-short-desc: Runs {beatname_uc}. This command is used by default if you start {beatname_uc} without specifying a command
2222

23+
ifndef::deprecate_dashboard_loading[]
24+
2325
ifdef::has_ml_jobs[]
2426
:setup-command-short-desc: Sets up the initial environment, including the index template, Kibana dashboards (when available), and machine learning jobs (when available)
2527
endif::[]
2628

2729
ifndef::has_ml_jobs[]
28-
:setup-command-short-desc: Sets up the initial environment, including the index template, Kibana dashboards (when available)
30+
:setup-command-short-desc: Sets up the initial environment, including the index template and Kibana dashboards (when available)
31+
endif::[]
32+
33+
endif::[]
34+
35+
ifdef::deprecate_dashboard_loading[]
36+
37+
:setup-command-short-desc: Sets up the initial environment, including the ES index template and Kibana dashboards (deprecated).
38+
2939
endif::[]
3040

3141
:test-command-short-desc: Tests the configuration
@@ -39,9 +49,17 @@ endif::[]
3949
<titleabbrev>Command reference</titleabbrev>
4050
++++
4151

52+
ifndef::deprecate_dashboard_loading[]
4253
{beatname_uc} provides a command-line interface for starting {beatname_uc} and
43-
performing common tasks, like testing configuration files and loading
44-
dashboards. The command-line also supports <<global-flags,global flags>>
54+
performing common tasks, like testing configuration files and loading dashboards.
55+
endif::[]
56+
57+
ifdef::deprecate_dashboard_loading[]
58+
{beatname_uc} provides a command-line interface for starting {beatname_uc} and
59+
performing common tasks, like testing configuration files and loading dashboards (deprecated).
60+
endif::[]
61+
62+
The command-line also supports <<global-flags,global flags>>
4563
for controlling global behaviors.
4664

4765
ifeval::["{beatname_lc}"!="winlogbeat"]
@@ -391,8 +409,19 @@ the end of the file is reached. By default harvesters are closed after
391409
endif::[]
392410

393411
*`--setup`*::
394-
Loads the sample Kibana dashboards. If you want to load the dashboards without
395-
running {beatname_uc}, use the <<setup-command,`setup`>> command instead.
412+
ifdef::deprecate_dashboard_loading[]
413+
deprecated[{deprecate_dashboard_loading}]
414+
endif::[]
415+
+
416+
ifdef::has_ml_jobs[]
417+
Loads the initial setup, including Elasticsearch template, Kibana index pattern,
418+
Kibana dashboards and Machine learning jobs.
419+
endif::[]
420+
ifndef::has_ml_jobs[]
421+
Loads the initial setup, including Elasticsearch template, Kibana index pattern and Kibana dashboards.
422+
endif::[]
423+
If you want to use the command without running {beatname_uc}, use the <<setup-command,`setup`>> command instead.
424+
396425

397426
ifeval::["{beatname_lc}"=="metricbeat"]
398427

@@ -431,13 +460,17 @@ Or:
431460
[[setup-command]]
432461
==== `setup` command
433462

434-
{setup-command-short-desc}.
463+
{setup-command-short-desc}
435464

436465
* The index template ensures that fields are mapped correctly in Elasticsearch.
466+
437467
* The Kibana dashboards make it easier for you to visualize {beatname_uc} data
438468
in Kibana.
469+
470+
ifdef::has_ml_jobs[]
439471
* The machine learning jobs contain the configuration information and metadata
440472
necessary to analyze data for anomalies.
473+
endif::[]
441474

442475
Use this command instead of `run --setup` when you want to set up the
443476
environment without actually running {beatname_uc} and ingesting data.
@@ -452,18 +485,32 @@ environment without actually running {beatname_uc} and ingesting data.
452485

453486
*FLAGS*
454487

488+
ifndef::deprecate_dashboard_loading[]
455489
*`--dashboards`*::
456490
Sets up the Kibana dashboards only. This option loads the dashboards from the
457491
{beatname_uc} package. For more options, such as loading customized dashboards,
458492
see {beatsdevguide}/import-dashboards.html[Importing Existing Beat Dashboards]
459493
in the _Beats Developer Guide_.
494+
endif::[]
495+
496+
ifdef::deprecate_dashboard_loading[]
497+
*`--dashboards`*::
498+
499+
deprecated[{deprecate_dashboard_loading}]
500+
+
501+
Sets up the Kibana dashboards only.
502+
endif::[]
460503

461504
*`-h, --help`*::
462505
Shows help for the `setup` command.
463506

507+
ifdef::has_ml_jobs[]
508+
464509
*`--machine-learning`*::
465510
Sets up machine learning job configurations only.
466511

512+
endif::[]
513+
467514
ifeval::["{beatname_lc}"=="filebeat"]
468515

469516
*`--modules MODULE_LIST`*::

libbeat/docs/dashboardsconfig.asciidoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111

1212
[[configuration-dashboards]]
1313
== Load the Kibana dashboards
14+
ifdef::deprecate_dashboard_loading[]
15+
16+
deprecated[{deprecate_dashboard_loading}]
17+
18+
endif::[]
1419

1520
{beatname_uc} comes packaged with example Kibana dashboards, visualizations,
1621
and searches for visualizing {beatname_uc} data in Kibana.

libbeat/docs/outputconfig.asciidoc

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,10 +216,16 @@ The index name to write events to. The default is
216216
+"{beatname_lc}-%\{[beat.version]\}-%\{+yyyy.MM.dd\}"+ (for example,
217217
+"{beatname_lc}-{version}-2017.04.26"+). If you change this setting, you also
218218
need to configure the `setup.template.name` and `setup.template.pattern` options
219-
(see <<configuration-template>>). If you are using the pre-built Kibana
220-
dashboards, you also need to set the `setup.dashboards.index` option (see
221-
<<configuration-dashboards>>).
219+
(see <<configuration-template>>).
222220

221+
If you are using the pre-built Kibana dashboards,
222+
you also need to set the `setup.dashboards.index` option (see <<configuration-dashboards>>).
223+
224+
ifdef::deprecate_dashboard_loading[]
225+
226+
deprecated[{deprecate_dashboard_loading}]
227+
228+
endif::[]
223229

224230
===== `indices`
225231

@@ -378,7 +384,7 @@ The Logstash output sends events directly to Logstash by using the lumberjack
378384
protocol, which runs over TCP. Logstash allows for additional processing and routing of
379385
generated events.
380386

381-
include::../../libbeat/docs/shared-logstash-config.asciidoc[]
387+
include::./shared-logstash-config.asciidoc[]
382388

383389
==== Accessing metadata fields
384390

libbeat/docs/shared-kibana-config.asciidoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111

1212
[[setup-kibana-endpoint]]
1313
== Set up the Kibana endpoint
14+
ifdef::deprecate_dashboard_loading[]
15+
16+
deprecated[{deprecate_dashboard_loading}]
17+
18+
endif::[]
1419

1520
ifeval::["{beatname_lc}" == "apm-server"]
1621
The Kibana dashboards are loaded into Kibana via the Kibana API.

libbeat/docs/shared-template-load.asciidoc

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,18 +94,37 @@ that you specify should include the root name of the index plus version and
9494
date information. You also need to configure the `setup.template.name` and
9595
`setup.template.pattern` options to match the new name. For example:
9696
+
97+
ifndef::deprecate_dashboard_loading[]
98+
9799
["source","sh",subs="attributes,callouts"]
98100
-----
99101
output.elasticsearch.index: "customname-%{[beat.version]}-%{+yyyy.MM.dd}"
100102
setup.template.name: "customname"
101103
setup.template.pattern: "customname-*"
102104
setup.dashboards.index: "customname-*" <1>
103105
-----
106+
104107
<1> If you plan to
105108
<<load-kibana-dashboards, set up the Kibana dashboards>>, also set
106109
this option to overwrite the index name defined in the dashboards and index
107110
pattern.
108111

112+
endif::[]
113+
114+
ifdef::deprecate_dashboard_loading[]
115+
116+
["source","sh",subs="attributes,callouts"]
117+
-----
118+
output.elasticsearch.index: "customname-%{[beat.version]}-%{+yyyy.MM.dd}"
119+
setup.template.name: "customname"
120+
setup.template.pattern: "customname-*"
121+
-----
122+
+
123+
Also ensure to change the index name accordingly in the Kibana dashboards,
124+
when loading via the Kibana UI.
125+
126+
endif::[]
127+
109128
See <<configuration-template>> for the full list of configuration options.
110129

111130

0 commit comments

Comments
 (0)