[DOCS] Update Kibana monitoring tasks (#23736)

This commit is contained in:
Lisa Cawley 2018-10-04 11:31:15 -07:00 committed by GitHub
parent 8b0b5b3ac6
commit 3a9deb0850
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 308 additions and 174 deletions

View file

@ -24,7 +24,7 @@ include::introduction.asciidoc[]
include::setup.asciidoc[]
include::monitoring/monitoring-xkib.asciidoc[]
include::monitoring/monitoring-kibana.asciidoc[]
include::security/securing-kibana.asciidoc[]
@ -76,4 +76,6 @@ include::release-notes/highlights.asciidoc[]
include::migration.asciidoc[]
include::CHANGELOG.asciidoc[]
include::CHANGELOG.asciidoc[]
include::redirects.asciidoc[]

View file

@ -1,4 +0,0 @@
[[configuring-monitoring]]
== Configuring Monitoring
See {ref}/configuring-monitoring.html[Configuring Monitoring in {es}].

View file

@ -1,4 +0,0 @@
[[monitoring-getting-started]]
== Getting Started
See {kibana-ref}/monitoring-data.html[Viewing Monitoring Data in {kib}].

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

View file

@ -19,7 +19,7 @@ metrics. Each node and instance is considered unique based on its persistent
UUID, which is written to the <<settings,`path.data`>> directory when the node
or instance starts.
* <<monitoring-xpack-kibana>>
* <<monitoring-kibana>>
* <<monitoring-data>>
--

View file

@ -1,4 +0,0 @@
[[monitoring-cluster]]
== Monitoring Elasticsearch
See {ref}/es-monitoring.html[Monitoring {es}].

View file

@ -1,5 +1,100 @@
[role="xpack"]
[[monitoring-kibana]]
== Monitoring Kibana
== Configuring monitoring in {kib}
++++
<titleabbrev>Configuring monitoring</titleabbrev>
++++
See
{kibana-ref}/monitoring-xpack-kibana.html[Monitoring {kib}].
If you enable the collection of monitoring data in your cluster, you can
optionally collect metrics about {kib}.
The following method involves sending the metrics to the production cluster,
which ultimately routes them to the monitoring cluster. For an alternative
method, see <<monitoring-metricbeat>>.
To learn about monitoring in general, see
{stack-ov}/xpack-monitoring.html[Monitoring the {stack}].
. Enable the collection of monitoring data in {stack}. Set
`xpack.monitoring.collection.enabled` to `true` on the production cluster. +
+
--
For example, you can use the following APIs to review and change this setting:
[source,js]
----------------------------------
GET _cluster/settings
PUT _cluster/settings
{
"persistent": {
"xpack.monitoring.collection.enabled": true
}
}
----------------------------------
For more information, see {ref}/monitoring-settings.html[Monitoring settings in {es}]
and {ref}/cluster-update-settings.html[Cluster update settings].
--
. Verify that `xpack.monitoring.enabled` and
`xpack.monitoring.kibana.collection.enabled` are set to `true` in the
`kibana.yml` file. These are the default values. For
more information, see <<monitoring-settings-kb,Monitoring settings in {kib}>>.
. Identify where to send monitoring data. {kib} automatically
sends metrics to the {es} cluster specified in the `elasticsearch.url` setting
in the `kibana.yml` file. This property has a default value of
`http://localhost:9200`. +
+
--
[TIP]
===============================
In production environments, we strongly recommend using a separate cluster
(referred to as the _monitoring cluster_) to store the data. Using a separate
monitoring cluster prevents production cluster outages from impacting your
ability to access your monitoring data. It also prevents monitoring activities
from impacting the performance of your production cluster.
If {security} is enabled on the production cluster, use an HTTPS URL such
as `https://<your_production_cluster>:9200` in this setting.
===============================
--
. If {security} is enabled on the production cluster:
.. Verify that there is a
valid user ID and password in the `elasticsearch.username` and
`elasticsearch.password` settings in the `kibana.yml` file. These values are
used when {kib} sends monitoring data to the production cluster.
.. Configure {kib} to encrypt communications between the {kib} server and the
production cluster. This set up involves generating a server certificate and
setting `server.ssl.*` and `elasticsearch.ssl.certificateAuthorities` settings
in the `kibana.yml` file on the {kib} server. For example:
+
--
[source,yaml]
--------------------------------------------------------------------------------
server.ssl.key: /path/to/your/server.key
server.ssl.certificate: /path/to/your/server.crt
--------------------------------------------------------------------------------
If you are using your own certificate authority to sign certificates, specify
the location of the PEM file in the `kibana.yml` file:
[source,yaml]
--------------------------------------------------------------------------------
elasticsearch.ssl.certificateAuthorities: /path/to/your/cacert.pem
--------------------------------------------------------------------------------
For more information, see <<using-kibana-with-security>>.
--
. <<start-stop,Start {kib}>>.
. <<monitoring-data,View the monitoring data in {kib}>>.
include::monitoring-metricbeat.asciidoc[]
include::{kib-repo-dir}/settings/monitoring-settings.asciidoc[]

View file

@ -1,5 +0,0 @@
[[monitoring-logstash]]
== Monitoring Logstash
See
{logstash-ref}/monitoring-logstash.html[Monitoring Logstash].

View file

@ -0,0 +1,125 @@
[role="xpack"]
[[monitoring-metricbeat]]
=== Monitoring {kib} with {metricbeat}
beta[] In 6.4 and later, you can use {metricbeat} to collect data about {kib}
and ship it to the monitoring cluster, rather than routing it through the
production cluster as described in <<monitoring-kibana>>.
image::monitoring/images/metricbeat.png[Example monitoring architecture]
To learn about monitoring in general, see
{stack-ov}/xpack-monitoring.html[Monitoring the {stack}].
. Enable the collection of monitoring data. Set
`xpack.monitoring.collection.enabled` to `true` on the production cluster. +
+
--
For example, you can use the following APIs to review and change this setting:
[source,js]
----------------------------------
GET _cluster/settings
PUT _cluster/settings
{
"persistent": {
"xpack.monitoring.collection.enabled": true
}
}
----------------------------------
For more information, see {ref}/monitoring-settings.html[Monitoring settings in {es}]
and {ref}/cluster-update-settings.html[Cluster update settings].
--
. Disable the default collection of {kib} monitoring metrics. +
+
--
Add the following setting in the {kib} configuration file (`kibana.yml`):
[source,yaml]
----------------------------------
xpack.monitoring.kibana.collection.enabled: false
----------------------------------
Leave the `xpack.monitoring.enabled` set to its default value (`true`).
For more information, see
<<monitoring-settings-kb,Monitoring settings in {kib}>>.
--
. {metricbeat-ref}/metricbeat-installation.html[Install {metricbeat}] on the
same server as {kib}.
. Enable the {kib} module in {metricbeat}. +
+
--
For example, to enable the default configuration in the `modules.d` directory,
run the following command:
["source","sh",subs="attributes,callouts"]
----------------------------------------------------------------------
metricbeat modules enable kibana
----------------------------------------------------------------------
For more information, see
{metricbeat-ref}/configuration-metricbeat.html[Specify which modules to run] and
{metricbeat-ref}/metricbeat-module-kibana.html[{kib} module].
--
. Configure the {kib} module in {metricbeat}. +
+
--
You must specify the following settings in the `modules.d/kibana.yml` file:
[source,yaml]
----------------------------------
- module: kibana
metricsets:
- stats
period: 10s
hosts: ["http://localhost:5601"] <1>
xpack.enabled: true
----------------------------------
<1> This setting identifies the host and port number that are used to access {kib}.
NOTE: If you configured {kib} to use <<configuring-tls,encrypted communications>>,
you must access it via HTTPS. For example, `https://localhost:5601`.
--
. Identify where to send the monitoring data. +
+
--
TIP: In production environments, we strongly recommend using a separate cluster
(referred to as the _monitoring cluster_) to store the data. Using a separate
monitoring cluster prevents production cluster outages from impacting your
ability to access your monitoring data. It also prevents monitoring activities
from impacting the performance of your production cluster.
For example, specify the {es} output information in the {metricbeat}
configuration file (`metricbeat.yml`):
[source,yaml]
----------------------------------
output.elasticsearch:
hosts: ["http://es-mon-1:9200", "http://es-mon2:9200"] <1>
----------------------------------
<1> In this example, the data is stored on a monitoring cluster with nodes
`es-mon-1` and `es-mon-2`.
NOTE: If you configured the monitoring cluster to use
{ref}/configuring-tls.html[encrypted communications], you must access it via
HTTPS. For example, `https://es-mon-1:9200`.
For more information about these configuration options, see
{metricbeat-ref}/elasticsearch-output.html[Configure the {es} output].
--
. <<start-stop,Start {kib}>>.
. {metricbeat-ref}/metricbeat-starting[Start {metricbeat}].
. <<monitoring-data,View the monitoring data in {kib}>>.

View file

@ -1,134 +0,0 @@
[role="xpack"]
[[monitoring-xpack-kibana]]
== Configuring Monitoring in {kib}
++++
<titleabbrev>Configuring Monitoring</titleabbrev>
++++
{monitoring} gives you insight into the operation of your {stack}. For more
information, see <<xpack-monitoring,{monitoring}>> and
{stack-ov}/xpack-monitoring.html[Monitoring the {stack}].
. To monitor {kib}:
.. Verify that the `xpack.monitoring.collection.enabled` setting is `true` on
the production cluster. If that setting is `false`, which is the default value,
the collection of monitoring data is disabled in {es} and data is ignored from
all other sources. For more information, see
{ref}/monitoring-settings.html[Monitoring Settings in {es}].
.. Verify that `xpack.monitoring.enabled` and
`xpack.monitoring.kibana.collection.enabled` are set to `true`, which are the
default values. For more information, see <<monitoring-settings-kb>>.
.. Identify where to send monitoring data. {kib} automatically
sends metrics to the {es} cluster specified in the `elasticsearch.url` setting
in the `kibana.yml` file. This property has a default value of
`http://localhost:9200`. This cluster is often referred to as the
_production cluster_.
+
--
TIP: If {security} is enabled on the production cluster, use an HTTPS URL such
as `https://<your_production_cluster>:9200` in this setting.
--
. To visualize monitoring data:
.. Verify that `xpack.monitoring.ui.enabled` is set to `true`, which is the
default value. For more information, see <<monitoring-settings-kb>>.
.. Identify where to retrieve monitoring data from. If you want to use a
separate _monitoring cluster_, set `xpack.monitoring.elasticsearch.url` in the
`kibana.yml` file. Otherwise, the monitoring data is stored in the production
cluster.
+
--
TIP: If {security} is enabled on the monitoring cluster, use an HTTPS URL such
as `https://<your_monitoring_cluster>:9200` in this setting.
To learn more about typical monitoring architectures with separate
production and monitoring clusters, see
{xpack-ref}/how-monitoring-works.html[How Monitoring Works].
--
. If {security} is enabled on the production cluster:
.. Verify that there is a
valid user ID and password in the `elasticsearch.username` and
`elasticsearch.password` settings in the `kibana.yml` file. These values are
used when {kib} sends monitoring data to the production cluster.
.. Configure {kib} to encrypt communications between the {kib} server and the
production cluster. This set up involves generating a server certificate and
setting `server.ssl.*` and `elasticsearch.ssl.certificateAuthorities` settings
in the `kibana.yml` file on the {kib} server. For example:
+
--
[source,yaml]
--------------------------------------------------------------------------------
server.ssl.key: /path/to/your/server.key
server.ssl.certificate: /path/to/your/server.crt
--------------------------------------------------------------------------------
If you are using your own certificate authority to sign certificates, specify
the location of the PEM file in the `kibana.yml` file:
[source,yaml]
--------------------------------------------------------------------------------
elasticsearch.ssl.certificateAuthorities: /path/to/your/cacert.pem
--------------------------------------------------------------------------------
For more information, see <<using-kibana-with-security>>.
--
. If {security} is enabled on the monitoring cluster:
.. Identify a user ID and password that {kib} can use to retrieve monitoring
data. Specify these values in the `xpack.monitoring.elasticsearch.username` and
`xpack.monitoring.elasticsearch.password` settings in the `kibana.yml` file.
If these settings are omitted, {kib} uses the `elasticsearch.username` and
`elasticsearch.password` setting values.
.. Configure {kib} to encrypt communications between the {kib} server and the
monitoring cluster. Specify the `xpack.monitoring.elasticsearch.ssl.*` settings
in the `kibana.yml` file on the {kib} server.
+
--
For example, if you are using your own certificate authority to sign
certificates, specify the location of the PEM file in the `kibana.yml` file:
[source,yaml]
--------------------------------------------------------------------------------
xpack.monitoring.elasticsearch.ssl.certificateAuthorities: /path/to/your/cacert.pem
--------------------------------------------------------------------------------
--
. Restart {kib}.
. If {security} is enabled on your {kib} server:
.. Log in to {kib} as a user who has both the `kibana_user` and
`monitoring_user` roles. These roles have the necessary privileges to view the
monitoring dashboards. For example:
+
--
[source,js]
--------------------------------------------------
POST /_xpack/security/user/stack-monitor
{
"password" : "changeme",
"roles" : [ "kibana_user", "monitoring_user" ]
}
--------------------------------------------------
// CONSOLE
--
.. If you are accessing a remote monitoring cluster, you must log in to {kib}
with username and password credentials that are valid on both the {kib} server
and the monitoring cluster.
See also <<monitoring-data>>.
include::{kib-repo-dir}/settings/monitoring-settings.asciidoc[]

View file

@ -1,40 +1,89 @@
[role="xpack"]
[[monitoring-data]]
== Viewing Monitoring Data in {kib}
== Viewing monitoring data in {kib}
++++
<titleabbrev>Viewing Monitoring Data</titleabbrev>
<titleabbrev>Viewing monitoring data</titleabbrev>
++++
You can enable {monitoring} in {es}, Logstash, {kib}, and Beats. By default, the
monitoring agents on {es} index data within the same cluster.
You can use {kib} to monitor the health and performance of {es}, {ls}, {kib},
and Beats.
TIP: If you have a dedicated monitoring cluster, the information is accessible
even if the {es} cluster you're monitoring is not. You can send data from
multiple clusters to the same monitoring cluster and view them all through the
same instance of {kib}. For more information, see
same instance of {kib}. To learn more about typical monitoring architectures
with separate production and monitoring clusters, see
{xpack-ref}/how-monitoring-works.html[How monitoring works].
To view and analyze the health and performance of {es}, Logstash, {kib}, and
Beats:
. {ref}/configuring-monitoring.html[Configure monitoring in {es}]. If you want
. Optional: {ref}/configuring-monitoring.html[Configure monitoring in {es}]. If you want
to use a separate monitoring cluster, see
{xpack-ref}/monitoring-production.html[Monitoring in a Production Environment].
{xpack-ref}/monitoring-production.html[Monitoring in a production environment].
. <<monitoring-xpack-kibana,Configure monitoring in {kib}>>.
. Optional: <<monitoring-kibana,Configure monitoring in {kib}>>.
. {logstash-ref}/configuring-logstash.html[Configure monitoring in Logstash].
. Optional: {logstash-ref}/configuring-logstash.html[Configure monitoring in Logstash].
. Configure monitoring in {auditbeat-ref}/monitoring.html[Auditbeat],
. Optional: Configure monitoring in {auditbeat-ref}/monitoring.html[Auditbeat],
{filebeat-ref}/monitoring.html[Filebeat],
{heartbeat-ref}/monitoring.html[Heartbeat],
{metricbeat-ref}/monitoring.html[Metricbeat],
{packetbeat-ref}/monitoring.html[Packetbeat], and
{winlogbeat-ref}/monitoring.html[Winlogbeat].
. Open {kib} in your web browser and log in. If you are running {kib}
locally, go to `http://localhost:5601/`. To access {kib} and view the
monitoring dashboards, you must log in as a user who has the `kibana_user`
and `monitoring_user` roles.
. Configure {kib} to visualize monitoring data:
.. Verify that `xpack.monitoring.ui.enabled` is set to `true`, which is the
default value. For more information, see <<monitoring-settings-kb>>.
.. Identify where to retrieve monitoring data from. If you want to use a
separate _monitoring cluster_, set `xpack.monitoring.elasticsearch.url` in the
`kibana.yml` file. Otherwise, the monitoring data is stored in the production
cluster.
+
--
TIP: If {security} is enabled on the monitoring cluster, use an HTTPS URL such
as `https://<your_monitoring_cluster>:9200` in this setting.
--
.. If {security} is enabled on the monitoring cluster, identify a user ID and
password that {kib} can use to retrieve monitoring data. Specify these values in
the `xpack.monitoring.elasticsearch.username` and
`xpack.monitoring.elasticsearch.password` settings in the `kibana.yml` file.
If these settings are omitted, {kib} uses the `elasticsearch.username` and
`elasticsearch.password` setting values.
.. If {security} is enabled on the monitoring cluster, configure {kib} to
encrypt communications between the {kib} server and the monitoring cluster.
Specify the `xpack.monitoring.elasticsearch.ssl.*` settings in the `kibana.yml`
file on the {kib} server.
+
--
For example, if you are using your own certificate authority to sign
certificates, specify the location of the PEM file in the `kibana.yml` file:
[source,yaml]
--------------------------------------------------------------------------------
xpack.monitoring.elasticsearch.ssl.certificateAuthorities: /path/to/your/cacert.pem
--------------------------------------------------------------------------------
--
. Open {kib} in your web browser and log in.
+
--
If you are running {kib} locally, go to `http://localhost:5601/`.
If {security} is enabled on the {kib} server, to access {kib} and view the
monitoring dashboards, you must log in as a user who has the `kibana_user` and
`monitoring_user` roles. These roles have the necessary privileges to view the
monitoring dashboards. For more information, see
{stack-ov}/built-in-roles.html[Built-in roles].
If you are accessing a remote monitoring cluster, you must log in to {kib}
with credentials that are valid on both the {kib} server and the monitoring
cluster.
--
. In the side navigation, click *Monitoring*. The first time you open {kib}
monitoring, data collection is

14
docs/redirects.asciidoc Normal file
View file

@ -0,0 +1,14 @@
[role="exclude",id="redirects"]
= Deleted pages
[partintro]
--
The following pages have moved or been deleted.
--
[role="exclude",id="monitoring-xpack-kibana"]
== Configuring monitoring in {kib}
See <<monitoring-kibana>>.