Skip to content

Commit 11b38a3

Browse files
authored
Docs deprecate setup dashboards (#1142)
* Docs: deprecate loading dashboards and index pattern. Add deprecation notes to apm-server.yml and docs for loading dashboards and index patterns via Kibana. Add deprecation note for setting up Kibana endpoint as it won't be needed any more. implements #1135
1 parent 4ee50ab commit 11b38a3

25 files changed

+652
-162
lines changed

CHANGELOG.asciidoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ https://github.com/elastic/apm-server/compare/6.3\...master[View commits]
2424
- Add source_mapping.elasticsearch configuration option {pull}1114[1114].
2525
- Add /v1/metrics endpoint {pull}1000[1000] {pull}1121[1121].
2626
- Push onboarding doc to separate ES index {pull}1159[1159].
27+
- Deprecate usage of `apm-server setup` {pull}1142[1142].
2728

2829

2930
[[release-notes-6.3]]

NOTICE.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1694,6 +1694,7 @@ Apache License 2.0
16941694

16951695
--------------------------------------------------------------------
16961696
Dependency: github.com/spf13/pflag
1697+
Version: v1.0.1
16971698
Revision: e57e3eeb33f795204c1ca35f56c44f83227c6e66
16981699
License type (autodetected): BSD-3-Clause
16991700
./vendor/github.com/spf13/pflag/LICENSE:

_meta/beat.yml

Lines changed: 51 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,51 @@ setup.template.settings:
155155
#number_of_routing_shards: 30
156156

157157

158-
#============================== Dashboards =====================================
158+
#============================== Template =====================================
159+
160+
# A template is used to set the mapping in Elasticsearch
161+
# By default template loading is enabled and the template is loaded.
162+
# These settings can be adjusted to load your own template or overwrite existing ones.
163+
164+
# Set to false to disable template loading.
165+
#setup.template.enabled: true
166+
167+
# Template name. By default the template name is "apm-%{[beat.version]}"
168+
# The template name and pattern has to be set in case the elasticsearch index pattern is modified.
169+
#setup.template.name: "apm-%{[beat.version]}"
170+
171+
# Template pattern. By default the template pattern is "apm-%{[beat.version]}-*" to apply to the default index settings.
172+
# The first part is the version of the beat and then -* is used to match all daily indices.
173+
# The template name and pattern has to be set in case the elasticsearch index pattern is modified.
174+
#setup.template.pattern: "apm-%{[beat.version]}-*"
175+
176+
# Path to fields.yml file to generate the template
177+
#setup.template.fields: "${path.config}/fields.yml"
178+
179+
# Overwrite existing template
180+
#setup.template.overwrite: false
181+
182+
# Elasticsearch template settings
183+
#setup.template.settings:
184+
185+
# A dictionary of settings to place into the settings.index dictionary
186+
# of the Elasticsearch template. For more details, please check
187+
# https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html
188+
#index:
189+
#number_of_shards: 1
190+
#codec: best_compression
191+
#number_of_routing_shards: 30
192+
193+
# A dictionary of settings for the _source field. For more details, please check
194+
# https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-source-field.html
195+
#_source:
196+
#enabled: false
197+
198+
199+
#============================== Deprecated: Dashboards =====================================
200+
#
201+
# Deprecated: Loading dashboards from the APM Server into Kibana is deprecated from 6.4 on.
202+
# We suggest to use the Kibana UI to load APM Server dashboards and index pattern instead.
159203
#
160204
# These settings control loading the sample dashboards to the Kibana index. Loading
161205
# the dashboards are disabled by default and can be enabled either by setting the
@@ -197,51 +241,14 @@ setup.template.settings:
197241
#setup.dashboards.retry.maximum: 0
198242

199243

200-
#============================== Template =====================================
201-
202-
# A template is used to set the mapping in Elasticsearch
203-
# By default template loading is enabled and the template is loaded.
204-
# These settings can be adjusted to load your own template or overwrite existing ones.
244+
#============================== Deprecated: Kibana =====================================
205245

206-
# Set to false to disable template loading.
207-
#setup.template.enabled: true
208-
209-
# Template name. By default the template name is "apm-%{[beat.version]}"
210-
# The template name and pattern has to be set in case the elasticsearch index pattern is modified.
211-
#setup.template.name: "apm-%{[beat.version]}"
212-
213-
# Template pattern. By default the template pattern is "apm-%{[beat.version]}-*" to apply to the default index settings.
214-
# The first part is the version of the beat and then -* is used to match all daily indices.
215-
# The template name and pattern has to be set in case the elasticsearch index pattern is modified.
216-
#setup.template.pattern: "apm-%{[beat.version]}-*"
217-
218-
# Path to fields.yml file to generate the template
219-
#setup.template.fields: "${path.config}/fields.yml"
220-
221-
# Overwrite existing template
222-
#setup.template.overwrite: false
223-
224-
# Elasticsearch template settings
225-
#setup.template.settings:
226-
227-
# A dictionary of settings to place into the settings.index dictionary
228-
# of the Elasticsearch template. For more details, please check
229-
# https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html
230-
#index:
231-
#number_of_shards: 1
232-
#codec: best_compression
233-
#number_of_routing_shards: 30
234-
235-
# A dictionary of settings for the _source field. For more details, please check
236-
# https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-source-field.html
237-
#_source:
238-
#enabled: false
239-
240-
241-
#============================== Kibana =====================================
246+
# Deprecated: Starting with APM Server version 6.4, loading dashboards and index pattern
247+
# from the APM Server into Kibana is deprecated.
248+
# We suggest to use the Kibana UI to load APM Server dashboards and index pattern instead.
249+
#
250+
# Setting up a Kibana endpoint is not necessary when loading the index pattern and dashboards via the UI.
242251

243-
# Starting with Beats version 6.0.0, the dashboards are loaded via the Kibana API.
244-
# This requires a Kibana endpoint configuration.
245252
#setup.kibana:
246253

247254
# Kibana Host

apm-server.yml

Lines changed: 51 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,51 @@ setup.template.settings:
155155
#number_of_routing_shards: 30
156156

157157

158-
#============================== Dashboards =====================================
158+
#============================== Template =====================================
159+
160+
# A template is used to set the mapping in Elasticsearch
161+
# By default template loading is enabled and the template is loaded.
162+
# These settings can be adjusted to load your own template or overwrite existing ones.
163+
164+
# Set to false to disable template loading.
165+
#setup.template.enabled: true
166+
167+
# Template name. By default the template name is "apm-%{[beat.version]}"
168+
# The template name and pattern has to be set in case the elasticsearch index pattern is modified.
169+
#setup.template.name: "apm-%{[beat.version]}"
170+
171+
# Template pattern. By default the template pattern is "apm-%{[beat.version]}-*" to apply to the default index settings.
172+
# The first part is the version of the beat and then -* is used to match all daily indices.
173+
# The template name and pattern has to be set in case the elasticsearch index pattern is modified.
174+
#setup.template.pattern: "apm-%{[beat.version]}-*"
175+
176+
# Path to fields.yml file to generate the template
177+
#setup.template.fields: "${path.config}/fields.yml"
178+
179+
# Overwrite existing template
180+
#setup.template.overwrite: false
181+
182+
# Elasticsearch template settings
183+
#setup.template.settings:
184+
185+
# A dictionary of settings to place into the settings.index dictionary
186+
# of the Elasticsearch template. For more details, please check
187+
# https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html
188+
#index:
189+
#number_of_shards: 1
190+
#codec: best_compression
191+
#number_of_routing_shards: 30
192+
193+
# A dictionary of settings for the _source field. For more details, please check
194+
# https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-source-field.html
195+
#_source:
196+
#enabled: false
197+
198+
199+
#============================== Deprecated: Dashboards =====================================
200+
#
201+
# Deprecated: Loading dashboards from the APM Server into Kibana is deprecated from 6.4 on.
202+
# We suggest to use the Kibana UI to load APM Server dashboards and index pattern instead.
159203
#
160204
# These settings control loading the sample dashboards to the Kibana index. Loading
161205
# the dashboards are disabled by default and can be enabled either by setting the
@@ -197,51 +241,14 @@ setup.template.settings:
197241
#setup.dashboards.retry.maximum: 0
198242

199243

200-
#============================== Template =====================================
201-
202-
# A template is used to set the mapping in Elasticsearch
203-
# By default template loading is enabled and the template is loaded.
204-
# These settings can be adjusted to load your own template or overwrite existing ones.
244+
#============================== Deprecated: Kibana =====================================
205245

206-
# Set to false to disable template loading.
207-
#setup.template.enabled: true
208-
209-
# Template name. By default the template name is "apm-%{[beat.version]}"
210-
# The template name and pattern has to be set in case the elasticsearch index pattern is modified.
211-
#setup.template.name: "apm-%{[beat.version]}"
212-
213-
# Template pattern. By default the template pattern is "apm-%{[beat.version]}-*" to apply to the default index settings.
214-
# The first part is the version of the beat and then -* is used to match all daily indices.
215-
# The template name and pattern has to be set in case the elasticsearch index pattern is modified.
216-
#setup.template.pattern: "apm-%{[beat.version]}-*"
217-
218-
# Path to fields.yml file to generate the template
219-
#setup.template.fields: "${path.config}/fields.yml"
220-
221-
# Overwrite existing template
222-
#setup.template.overwrite: false
223-
224-
# Elasticsearch template settings
225-
#setup.template.settings:
226-
227-
# A dictionary of settings to place into the settings.index dictionary
228-
# of the Elasticsearch template. For more details, please check
229-
# https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html
230-
#index:
231-
#number_of_shards: 1
232-
#codec: best_compression
233-
#number_of_routing_shards: 30
234-
235-
# A dictionary of settings for the _source field. For more details, please check
236-
# https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-source-field.html
237-
#_source:
238-
#enabled: false
239-
240-
241-
#============================== Kibana =====================================
246+
# Deprecated: Starting with APM Server version 6.4, loading dashboards and index pattern
247+
# from the APM Server into Kibana is deprecated.
248+
# We suggest to use the Kibana UI to load APM Server dashboards and index pattern instead.
249+
#
250+
# Setting up a Kibana endpoint is not necessary when loading the index pattern and dashboards via the UI.
242251

243-
# Starting with Beats version 6.0.0, the dashboards are loaded via the Kibana API.
244-
# This requires a Kibana endpoint configuration.
245252
#setup.kibana:
246253

247254
# Kibana Host

cmd/root.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,6 @@ var RootCmd *cmd.BeatsRootCmd
3737
func init() {
3838
var runFlags = pflag.NewFlagSet(Name, pflag.ExitOnError)
3939
RootCmd = cmd.GenRootCmdWithIndexPrefixWithRunFlags(Name, IdxPattern, "", beater.New, runFlags)
40+
RootCmd.RunCmd.Flags().MarkDeprecated("setup", "use Kibana UI for initial setup.")
41+
RootCmd.SetupCmd.Deprecated = "use Kibana UI for initial setup."
4042
}

docs/copied-from-beats/command-reference.asciidoc

Lines changed: 59 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,21 +485,41 @@ environment without actually running {beatname_uc} and ingesting data.
452485

453486
*FLAGS*
454487

488+
ifndef::deprecate_dashboard_loading[]
489+
*`--dashboards`*::
490+
Sets up the Kibana dashboards only. This option loads the dashboards from the
491+
{beatname_uc} package. For more options, such as loading customized dashboards,
492+
see {beatsdevguide}/import-dashboards.html[Importing Existing Beat Dashboards]
493+
in the _Beats Developer Guide_.
494+
endif::[]
495+
496+
ifdef::deprecate_dashboard_loading[]
455497
*`--dashboards`*::
498+
499+
deprecated[{deprecate_dashboard_loading}]
500+
+
456501
Sets up the Kibana dashboards only.
502+
endif::[]
457503

458504
*`-h, --help`*::
459505
Shows help for the `setup` command.
460506

507+
ifdef::has_ml_jobs[]
508+
461509
*`--machine-learning`*::
462510
Sets up machine learning job configurations only.
463511

512+
endif::[]
513+
464514
ifeval::["{beatname_lc}"=="filebeat"]
465515

466516
*`--modules MODULE_LIST`*::
467517
Specifies a comma-separated list of modules. Use this flag to avoid errors when
468518
there are no modules defined in the +{beatname_lc}.yml+ file.
469519

520+
*`--pipelines`*::
521+
Sets up ingest pipelines for configured filesets.
522+
470523
endif::[]
471524

472525
*`--template`*::

docs/copied-from-beats/dashboards.asciidoc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,17 @@ command (as described here) or
1818
+{beatname_lc}.yml+ config file.
1919

2020
This requires a Kibana endpoint configuration. If you didn't already configure
21-
a Kibana endpoint, see <<{beatname_lc}-configuration,configure {beatname_uc}>>.
21+
a Kibana endpoint, see <<{beatname_lc}-configuration,configure {beatname_uc}>>.
2222

2323
Make sure Kibana is running before you perform this step. If you are accessing a
2424
secured Kibana instance, make sure you've configured credentials as described in
2525
<<{beatname_lc}-configuration>>.
2626

2727
To set up the Kibana dashboards for {beatname_uc}, use the appropriate command
28-
for your system.
28+
for your system. The command shown here loads the dashboards from the {beatname_uc}
29+
package. For more options, such as loading customized dashboards, see
30+
{beatsdevguide}/import-dashboards.html[Importing Existing Beat Dashboards] in
31+
the _Beats Developer Guide_.
2932
ifndef::only-elasticsearch[]
3033
If you've configured the Logstash output, see
3134
<<load-dashboards-logstash>>.

0 commit comments

Comments
 (0)