From b1c10f457a893f64dabfc79e1fdbabfebfb22993 Mon Sep 17 00:00:00 2001 From: Lisa Cawley Date: Tue, 4 Aug 2020 12:40:11 -0700 Subject: [PATCH] [DOCS] Adds scope to monitoring (#57852) (#60665) --- .../configuring-metricbeat.asciidoc | 55 ++++++------------- 1 file changed, 17 insertions(+), 38 deletions(-) diff --git a/docs/reference/monitoring/configuring-metricbeat.asciidoc b/docs/reference/monitoring/configuring-metricbeat.asciidoc index d85cfe0c4fd34..21c9e5cca6934 100644 --- a/docs/reference/monitoring/configuring-metricbeat.asciidoc +++ b/docs/reference/monitoring/configuring-metricbeat.asciidoc @@ -14,9 +14,7 @@ as described in <>. 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[] @@ -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 <> and <>. -- . {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: @@ -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: @@ -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 @@ -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 @@ -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. @@ -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}].