Skip to content

Commit

Permalink
[DOCS] Adds scope to monitoring (#57852) (#60665)
Browse files Browse the repository at this point in the history
  • Loading branch information
lcawl committed Aug 4, 2020
1 parent a21ec41 commit b1c10f4
Showing 1 changed file with 17 additions and 38 deletions.
55 changes: 17 additions & 38 deletions docs/reference/monitoring/configuring-metricbeat.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ as described in <<collecting-monitoring-data>>.

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

//NOTE: The tagged regions are re-used in the Stack Overview.

. Enable the collection of monitoring data. +
. Enable the collection of monitoring data.
+
--
// tag::enable-collection[]
Expand All @@ -35,22 +33,21 @@ PUT _cluster/settings
"xpack.monitoring.collection.enabled": true
}
}
----------------------------------
----------------------------------

If {es} {security-features} are enabled, you must have `monitor` cluster privileges to
view the cluster settings and `manage` cluster privileges to change them.

// end::enable-collection[]

For more information, see <<monitoring-settings>> and <<cluster-update-settings>>.
--

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

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

Expand All @@ -59,47 +56,35 @@ run the following command:
metricbeat modules enable elasticsearch-xpack
----------------------------------------------------------------------

For more information, see
{metricbeat-ref}/configuration-metricbeat.html[Specify which modules to run] and
{metricbeat-ref}/metricbeat-module-elasticsearch.html[{es} module].

// end::enable-es-module[]
Alternatively, you can use the {es} module, as described in the
{metricbeat-ref}/metricbeat-module-elasticsearch.html[{es} module usage for {stack} monitoring].
--

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

[source,yaml]
----------------------------------
- module: elasticsearch
metricsets:
- ccr
- cluster_stats
- index
- index_recovery
- index_summary
- ml_job
- node_stats
- shard
- enrich
xpack.enabled: true
period: 10s
hosts: ["http://localhost:9200"]
hosts: ["http://localhost:9200"] <1>
#scope: node <2>
#username: "user"
#password: "secret"
xpack.enabled: true
----------------------------------

By default, the module collects {es} monitoring metrics from
<1> By default, the module collects {es} monitoring metrics from
`http://localhost:9200`. If that host and port number are not correct, you must
update the `hosts` setting. If you configured {es} to use encrypted
communications, you must access it via HTTPS. For example, use a `hosts` setting
like `https://localhost:9200`.
// end::configure-es-module[]
<2> By default, `scope` is set to `node` and each entry in the `hosts` list
indicates a distinct node in an {es} cluster. If you set `scope` to `cluster`,
each entry in the `hosts` list indicates a single endpoint for a distinct {es}
cluster (for example, a load-balancing proxy fronting the cluster).

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

Expand All @@ -110,13 +95,11 @@ Alternatively, use the

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

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

// end::disable-system-module[]
--

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

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

. Disable the default collection of {es} monitoring metrics. +
. Disable the default collection of {es} monitoring metrics.
+
--
// tag::disable-default-collection[]
Set `xpack.monitoring.elasticsearch.collection.enabled` to `false` on the
production cluster.

Expand All @@ -204,8 +185,6 @@ PUT _cluster/settings
If {es} {security-features} are enabled, you must have `monitor` cluster
privileges to view the cluster settings and `manage` cluster privileges
to change them.

// end::disable-default-collection[]
--

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

0 comments on commit b1c10f4

Please sign in to comment.