Skip to content

Commit

Permalink
[DOCS] Facilitates content re-use in the monitoring configuration (#3…
Browse files Browse the repository at this point in the history
  • Loading branch information
lcawl committed May 28, 2019
1 parent 4095908 commit 03fe269
Showing 1 changed file with 56 additions and 45 deletions.
101 changes: 56 additions & 45 deletions docs/monitoring/monitoring-metricbeat.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@ image::monitoring/images/metricbeat.png[Example monitoring architecture]
To learn about monitoring in general, see
{stack-ov}/xpack-monitoring.html[Monitoring the {stack}].

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

. Disable the default collection of {kib} monitoring metrics. +
+
--
// tag::disable-kibana-collection[]
Add the following setting in the {kib} configuration file (`kibana.yml`):

[source,yaml]
Expand All @@ -26,7 +29,7 @@ xpack.monitoring.kibana.collection.enabled: false
----------------------------------

Leave the `xpack.monitoring.enabled` set to its default value (`true`).

// end::disable-kibana-collection[]
For more information, see
<<monitoring-settings-kb,Monitoring settings in {kib}>>.
--
Expand Down Expand Up @@ -79,12 +82,13 @@ For more information, see {ref}/monitoring-settings.html[Monitoring settings in
and {ref}/cluster-update-settings.html[Cluster update settings].
--

. {metricbeat-ref}/metricbeat-installation.html[Install {metricbeat}] on the
. {metricbeat-ref}/metricbeat-installation.html[Install {metricbeat}] on the
same server as {kib}.

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

Expand All @@ -96,14 +100,38 @@ metricbeat modules enable kibana-xpack
For more information, see
{metricbeat-ref}/configuration-metricbeat.html[Specify which modules to run] and
{metricbeat-ref}/metricbeat-module-kibana.html[{kib} module].
// end::enable-kibana-module[]
--

. Configure the {kib} {xpack} module in {metricbeat}. +
+
--
// tag::configure-kibana-module[]
The `modules.d/kibana-xpack.yml` file contains the following settings:

[source,yaml]
----------------------------------
- module: kibana
metricsets:
- stats
period: 10s
hosts: ["localhost:5601"]
#basepath: ""
#username: "user"
#password: "secret"
xpack.enabled: true
----------------------------------

. By default the module will collect {kib} monitoring metrics from `http://localhost:5601`.
If the local {kib} instance has a different address, you must specify it via the `hosts` setting
in the `modules.d/kibana-xpack.yml` file.
By default, the module collects {kib} monitoring metrics from `localhost:5601`.
If that host and port number are not correct, you must update the `hosts`
setting. If you configured {kib} to use encrypted communications, you must
access it via HTTPS. For example, use a `hosts` setting like
`https://localhost:5601`.
// end::configure-kibana-module[]

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

.. Create a user on the production cluster that has the
`remote_monitoring_collector` {stack-ov}/built-in-roles.html[built-in role].
Expand All @@ -112,22 +140,8 @@ Alternatively, use the `remote_monitoring_user`

.. Add the `username` and `password` settings to the {kib} module configuration
file.
+
// end::remote-monitoring-user[]
--
For example, add the following settings in the `modules.d/kibana-xpack.yml` file:

[source,yaml]
----------------------------------
- module: kibana
...
username: remote_monitoring_user
password: YOUR_PASSWORD
----------------------------------
--

. If you configured {kib} to use <<configuring-tls,encrypted communications>>,
you must access it via HTTPS. For example, use a `hosts` setting like
`https://localhost:5601` in the `modules.d/kibana-xpack.yml` file.

. Identify where to send the monitoring data. +
+
Expand All @@ -144,42 +158,39 @@ configuration file (`metricbeat.yml`):
[source,yaml]
----------------------------------
output.elasticsearch:
# Array of hosts to connect to.
hosts: ["http://es-mon-1:9200", "http://es-mon2:9200"] <1>
# Optional protocol and basic auth credentials.
#protocol: "https"
#username: "elastic"
#password: "changeme"
----------------------------------
<1> In this example, the data is stored on a monitoring cluster with nodes
`es-mon-1` and `es-mon-2`.
`es-mon-1` and `es-mon-2`.

For more information about these configuration options, see
{metricbeat-ref}/elasticsearch-output.html[Configure the {es} output].
If you configured the monitoring cluster to use encrypted communications, you
must access it via HTTPS. For example, use a `hosts` setting like
`https://es-mon-1:9200`.

--
IMPORTANT: The {es} {monitor-features} use ingest pipelines, therefore the
cluster that stores the monitoring data must have at least one ingest node.

. If the {es} {security-features} are enabled on the monitoring cluster, you
If the {es} {security-features} are enabled on the monitoring cluster, you
must provide a valid user ID and password so that {metricbeat} can send metrics
successfully.
successfully:

... Create a user on the monitoring cluster that has the
.. Create a user on the monitoring cluster that has the
`remote_monitoring_agent` {stack-ov}/built-in-roles.html[built-in role].
Alternatively, use the `remote_monitoring_user`
{stack-ov}/built-in-users.html[built-in user].

.. Add the `username` and `password` settings to the {es} output information in
the {metricbeat} configuration file (`metricbeat.yml`):
+
--
[source,yaml]
----------------------------------
output.elasticsearch:
...
username: remote_monitoring_user
password: YOUR_PASSWORD
----------------------------------
--
the {metricbeat} configuration file.

. If you configured the monitoring cluster to use
{ref}/configuring-tls.html[encrypted communications], you must access it via
HTTPS. For example, use a `hosts` setting like `https://es-mon-1:9200` in the
`metricbeat.yml` file.
For more information about these configuration options, see
{metricbeat-ref}/elasticsearch-output.html[Configure the {es} output].
--

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

Expand Down

0 comments on commit 03fe269

Please sign in to comment.