Skip to content

Commit b1c10f4

Browse files
authored
[DOCS] Adds scope to monitoring (#57852) (#60665)
1 parent a21ec41 commit b1c10f4

File tree

1 file changed

+17
-38
lines changed

1 file changed

+17
-38
lines changed

docs/reference/monitoring/configuring-metricbeat.asciidoc

Lines changed: 17 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ as described in <<collecting-monitoring-data>>.
1414

1515
image::monitoring/images/metricbeat.png[Example monitoring architecture]
1616

17-
//NOTE: The tagged regions are re-used in the Stack Overview.
18-
19-
. Enable the collection of monitoring data. +
17+
. Enable the collection of monitoring data.
2018
+
2119
--
2220
// tag::enable-collection[]
@@ -35,22 +33,21 @@ PUT _cluster/settings
3533
"xpack.monitoring.collection.enabled": true
3634
}
3735
}
38-
----------------------------------
36+
----------------------------------
3937

4038
If {es} {security-features} are enabled, you must have `monitor` cluster privileges to
4139
view the cluster settings and `manage` cluster privileges to change them.
42-
4340
// end::enable-collection[]
41+
4442
For more information, see <<monitoring-settings>> and <<cluster-update-settings>>.
4543
--
4644

4745
. {metricbeat-ref}/metricbeat-installation-configuration.html[Install {metricbeat}] on each
4846
{es} node in the production cluster.
4947

50-
. Enable the {es} {xpack} module in {metricbeat} on each {es} node. +
48+
. Enable the {es} {xpack} module in {metricbeat} on each {es} node.
5149
+
5250
--
53-
// tag::enable-es-module[]
5451
For example, to enable the default configuration in the `modules.d` directory,
5552
run the following command:
5653

@@ -59,47 +56,35 @@ run the following command:
5956
metricbeat modules enable elasticsearch-xpack
6057
----------------------------------------------------------------------
6158

62-
For more information, see
63-
{metricbeat-ref}/configuration-metricbeat.html[Specify which modules to run] and
64-
{metricbeat-ref}/metricbeat-module-elasticsearch.html[{es} module].
65-
66-
// end::enable-es-module[]
59+
Alternatively, you can use the {es} module, as described in the
60+
{metricbeat-ref}/metricbeat-module-elasticsearch.html[{es} module usage for {stack} monitoring].
6761
--
6862

69-
. Configure the {es} {xpack} module in {metricbeat} on each {es} node. +
63+
. Configure the {es} {xpack} module in {metricbeat} on each {es} node.
7064
+
7165
--
72-
// tag::configure-es-module[]
7366
The `modules.d/elasticsearch-xpack.yml` file contains the following settings:
7467

7568
[source,yaml]
7669
----------------------------------
7770
- module: elasticsearch
78-
metricsets:
79-
- ccr
80-
- cluster_stats
81-
- index
82-
- index_recovery
83-
- index_summary
84-
- ml_job
85-
- node_stats
86-
- shard
87-
- enrich
71+
xpack.enabled: true
8872
period: 10s
89-
hosts: ["http://localhost:9200"]
73+
hosts: ["http://localhost:9200"] <1>
74+
#scope: node <2>
9075
#username: "user"
9176
#password: "secret"
92-
xpack.enabled: true
9377
----------------------------------
94-
95-
By default, the module collects {es} monitoring metrics from
78+
<1> By default, the module collects {es} monitoring metrics from
9679
`http://localhost:9200`. If that host and port number are not correct, you must
9780
update the `hosts` setting. If you configured {es} to use encrypted
9881
communications, you must access it via HTTPS. For example, use a `hosts` setting
9982
like `https://localhost:9200`.
100-
// end::configure-es-module[]
83+
<2> By default, `scope` is set to `node` and each entry in the `hosts` list
84+
indicates a distinct node in an {es} cluster. If you set `scope` to `cluster`,
85+
each entry in the `hosts` list indicates a single endpoint for a distinct {es}
86+
cluster (for example, a load-balancing proxy fronting the cluster).
10187

102-
// tag::remote-monitoring-user[]
10388
If Elastic {security-features} are enabled, you must also provide a user ID
10489
and password so that {metricbeat} can collect metrics successfully:
10590

@@ -110,13 +95,11 @@ Alternatively, use the
11095

11196
.. Add the `username` and `password` settings to the {es} module configuration
11297
file.
113-
// end::remote-monitoring-user[]
11498
--
11599

116100
. Optional: Disable the system module in {metricbeat}.
117101
+
118102
--
119-
// tag::disable-system-module[]
120103
By default, the {metricbeat-ref}/metricbeat-module-system.html[system module] is
121104
enabled. The information it collects, however, is not shown on the *Monitoring*
122105
page in {kib}. Unless you want to use that information for other purposes, run
@@ -127,10 +110,9 @@ the following command:
127110
metricbeat modules disable system
128111
----------------------------------------------------------------------
129112

130-
// end::disable-system-module[]
131113
--
132114

133-
. Identify where to send the monitoring data. +
115+
. Identify where to send the monitoring data.
134116
+
135117
--
136118
TIP: In production environments, we strongly recommend using a separate cluster
@@ -182,10 +164,9 @@ For more information about these configuration options, see
182164

183165
. {metricbeat-ref}/metricbeat-starting.html[Start {metricbeat}] on each node.
184166

185-
. Disable the default collection of {es} monitoring metrics. +
167+
. Disable the default collection of {es} monitoring metrics.
186168
+
187169
--
188-
// tag::disable-default-collection[]
189170
Set `xpack.monitoring.elasticsearch.collection.enabled` to `false` on the
190171
production cluster.
191172

@@ -204,8 +185,6 @@ PUT _cluster/settings
204185
If {es} {security-features} are enabled, you must have `monitor` cluster
205186
privileges to view the cluster settings and `manage` cluster privileges
206187
to change them.
207-
208-
// end::disable-default-collection[]
209188
--
210189

211190
. {kibana-ref}/monitoring-data.html[View the monitoring data in {kib}].

0 commit comments

Comments
 (0)