Configuring Monitoring in Kibana

edit

Configuring Monitoring in Kibana

edit

X-Pack monitoring gives you insight into the operation of your Elastic Stack. For more information, see X-Pack monitoring and Monitoring the Elastic Stack.

  1. To monitor Kibana:

    1. 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 Elasticsearch and data is ignored from all other sources. For more information, see Monitoring Settings in Elasticsearch.
    2. 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.
    3. Identify where to send monitoring data. Kibana automatically sends metrics to the Elasticsearch 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.

      If X-Pack security is enabled on the production cluster, use an HTTPS URL such as https://<your_production_cluster>:9200 in this setting.

  2. To visualize monitoring data:

    1. Verify that xpack.monitoring.ui.enabled is set to true, which is the default value. For more information, see Monitoring Settings.
    2. 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.

      If X-Pack 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 How monitoring works.

  3. If X-Pack security is enabled on the production cluster:

    1. 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 Kibana sends monitoring data to the production cluster.
    2. Configure Kibana to encrypt communications between the Kibana server and the production cluster. This set up involves generating a server certificate and setting server.ssl.* and elasticsearch.ssl.certitifcateAuthorities settings in the kibana.yml file on the Kibana server. For example:

      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:

      elasticsearch.ssl.certificateAuthorities: /path/to/your/cacert.pem

      For more information, see Configuring Security.

  4. If X-Pack security is enabled on the monitoring cluster:

    1. Identify a user ID and password that Kibana 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, Kibana uses the elasticsearch.username and elasticsearch.password setting values.
    2. Configure Kibana to encrypt communications between the Kibana server and the monitoring cluster. Specify the xpack.monitoring.elasticsearch.ssl.* settings in the kibana.yml file on the Kibana 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:

      xpack.monitoring.elasticsearch.ssl.certificateAuthorities: /path/to/your/cacert.pem
  5. Restart Kibana.
  6. If X-Pack security is enabled on your Kibana server:

    1. Log in to Kibana 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:

      POST /_xpack/security/user/stack-monitor
      {
        "password" : "changeme",
        "roles" : [ "kibana_user", "monitoring_user" ]
      }
    2. If you are accessing a remote monitoring cluster, you must log in to Kibana with username and password credentials that are valid on both the Kibana server and the monitoring cluster.

See also Viewing Monitoring Data.