diff --git a/docs/index.asciidoc b/docs/index.asciidoc index 28f95222733cca..7b5c58b6aa93f8 100644 --- a/docs/index.asciidoc +++ b/docs/index.asciidoc @@ -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[] @@ -74,4 +74,6 @@ include::limitations.asciidoc[] include::release-notes/highlights.asciidoc[] -include::CHANGELOG.asciidoc[] \ No newline at end of file +include::CHANGELOG.asciidoc[] + +include::redirects.asciidoc[] diff --git a/docs/monitoring/configuring-monitoring.asciidoc b/docs/monitoring/configuring-monitoring.asciidoc deleted file mode 100644 index 82ef1bbd77f0b1..00000000000000 --- a/docs/monitoring/configuring-monitoring.asciidoc +++ /dev/null @@ -1,4 +0,0 @@ -[[configuring-monitoring]] -== Configuring Monitoring - -See {ref}/configuring-monitoring.html[Configuring Monitoring in {es}]. diff --git a/docs/monitoring/getting-started.asciidoc b/docs/monitoring/getting-started.asciidoc deleted file mode 100644 index 1782661d5f0c89..00000000000000 --- a/docs/monitoring/getting-started.asciidoc +++ /dev/null @@ -1,4 +0,0 @@ -[[monitoring-getting-started]] -== Getting Started - -See {kibana-ref}/monitoring-data.html[Viewing Monitoring Data in {kib}]. diff --git a/docs/monitoring/images/metricbeat.png b/docs/monitoring/images/metricbeat.png new file mode 100644 index 00000000000000..a6967a0dc326ae Binary files /dev/null and b/docs/monitoring/images/metricbeat.png differ diff --git a/docs/monitoring/index.asciidoc b/docs/monitoring/index.asciidoc index fa57d13ed9623d..078b9eeaf85ace 100644 --- a/docs/monitoring/index.asciidoc +++ b/docs/monitoring/index.asciidoc @@ -19,7 +19,7 @@ metrics. Each node and instance is considered unique based on its persistent UUID, which is written to the <> directory when the node or instance starts. -* <> +* <> * <> -- diff --git a/docs/monitoring/monitoring-elasticsearch.asciidoc b/docs/monitoring/monitoring-elasticsearch.asciidoc deleted file mode 100644 index 5ce634b84c6e7c..00000000000000 --- a/docs/monitoring/monitoring-elasticsearch.asciidoc +++ /dev/null @@ -1,4 +0,0 @@ -[[monitoring-cluster]] -== Monitoring Elasticsearch - -See <> and {ref}/es-monitoring.html[Monitoring {es}]. diff --git a/docs/monitoring/monitoring-kibana.asciidoc b/docs/monitoring/monitoring-kibana.asciidoc index 3b93d9808a4dcc..c7e8ddc9c31cc6 100644 --- a/docs/monitoring/monitoring-kibana.asciidoc +++ b/docs/monitoring/monitoring-kibana.asciidoc @@ -1,5 +1,100 @@ +[role="xpack"] [[monitoring-kibana]] -== Monitoring Kibana +== Configuring monitoring in {kib} +++++ +Configuring monitoring +++++ -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 <>. + +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 <>. + +. 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://: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 <>. +-- + +. <>. + +. <>. + +include::monitoring-metricbeat.asciidoc[] +include::{kib-repo-dir}/settings/monitoring-settings.asciidoc[] diff --git a/docs/monitoring/monitoring-logstash.asciidoc b/docs/monitoring/monitoring-logstash.asciidoc deleted file mode 100644 index 27a35303e3057a..00000000000000 --- a/docs/monitoring/monitoring-logstash.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[[monitoring-logstash]] -== Monitoring Logstash - -See -{logstash-ref}/monitoring-logstash.html[Monitoring Logstash]. diff --git a/docs/monitoring/monitoring-metricbeat.asciidoc b/docs/monitoring/monitoring-metricbeat.asciidoc new file mode 100644 index 00000000000000..9bdeebdd750078 --- /dev/null +++ b/docs/monitoring/monitoring-metricbeat.asciidoc @@ -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 <>. + +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 +<>. +-- + +. {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 <>, +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]. + +-- + +. <>. + +. {metricbeat-ref}/metricbeat-starting[Start {metricbeat}]. + +. <>. diff --git a/docs/monitoring/monitoring-xkib.asciidoc b/docs/monitoring/monitoring-xkib.asciidoc deleted file mode 100644 index 6a451308860fdb..00000000000000 --- a/docs/monitoring/monitoring-xkib.asciidoc +++ /dev/null @@ -1,134 +0,0 @@ -[role="xpack"] -[[monitoring-xpack-kibana]] -== Configuring Monitoring in {kib} -++++ -Configuring Monitoring -++++ - -{monitoring} gives you insight into the operation of your {stack}. For more -information, see <> 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 <>. - -.. 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://: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 <>. - -.. 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://: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 <>. --- - -. 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 <>. - -include::{kib-repo-dir}/settings/monitoring-settings.asciidoc[] diff --git a/docs/monitoring/viewing-metrics.asciidoc b/docs/monitoring/viewing-metrics.asciidoc index 82ec152fdefa9a..13bcfc4be0751e 100644 --- a/docs/monitoring/viewing-metrics.asciidoc +++ b/docs/monitoring/viewing-metrics.asciidoc @@ -1,40 +1,89 @@ [role="xpack"] [[monitoring-data]] -== Viewing Monitoring Data in {kib} +== Viewing monitoring data in {kib} ++++ -Viewing Monitoring Data +Viewing monitoring data ++++ -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]. -. <>. +. Optional: <>. -. {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 <>. + +.. 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://: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 diff --git a/docs/redirects.asciidoc b/docs/redirects.asciidoc new file mode 100644 index 00000000000000..152e9a84717f61 --- /dev/null +++ b/docs/redirects.asciidoc @@ -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 <>. +