-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DOCS] Update Kibana monitoring tasks (#23736)
- Loading branch information
Showing
12 changed files
with
308 additions
and
174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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[] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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}>>. |
Oops, something went wrong.