This topic describes how to enable the X-Pack Monitoring feature. This feature helps monitor your Alibaba Cloud Logstash cluster. After you enable the feature for your Logstash cluster and associate the cluster with an Elasticsearch cluster, you can monitor the Logstash cluster in the Kibana console of the Elasticsearch cluster.

Prerequisites

  • An Alibaba Cloud Logstash cluster is created. For more information, see Create an Alibaba Cloud Logstash cluster.
  • An Alibaba Cloud Elasticsearch cluster is created. For more information, see Create an Alibaba Cloud Elasticsearch cluster. The Elasticsearch cluster must reside in the same virtual private cloud (VPC) as the Logstash cluster. We recommend that you create an Elasticsearch cluster that uses the same major version as the Logstash cluster. If you create an Elasticsearch cluster that uses a major version different from the major version of the Logstash cluster, you must make sure that the version of the Elasticsearch cluster is compatible with the version of the Logstash cluster.
  • The following operations are performed for the Elasticsearch cluster:

Procedure

  1. Log on to the Elasticsearch console.
  2. Navigate to the desired cluster.
    1. In the top navigation bar, select the region where the cluster resides.
    2. In the left-side navigation pane, click Logstash Clusters. On the Logstash Clusters page, find the cluster and click its ID.
  3. In the left-side navigation pane of the page that appears, click Cluster Monitoring.
  4. In the Monitoring and Alerting section, click Edit on the right side of X-Pack Monitoring.
    Enable X-Pack Monitoring
  5. In the Edit Configuration panel, set X-Pack Monitoring to Enable and associate the Logstash cluster with an Elasticsearch cluster.
    Edit Configuration panel
    Parameter Description
    Elasticsearch Cluster Select the Elasticsearch cluster with which you want to associate the Logstash cluster. You must select an Elasticsearch cluster that resides in the same VPC as the Logstash cluster. We recommend that you select an Elasticsearch cluster that uses the same major version as the Logstash cluster. If you select an Elasticsearch cluster that uses a major version different from the major version of the Logstash cluster, you must make sure that the version of the Elasticsearch cluster is compatible with the version of the Logstash cluster.
    Username Enter the username that is used to access the Elasticsearch cluster.
    Password Enter the password that is used to access the Elasticsearch cluster.
  6. Click Test Connectivity.
    If no error is reported, the Elasticsearch cluster is connected.
    Warning After you enable or disable X-Pack Monitoring, the system restarts the Logstash cluster. This may affect your services. Proceed with caution.
  7. Click OK.
    The system returns to the Cluster Monitoring page and restarts the Logstash cluster.
  8. After the Logstash cluster is restarted, view the monitoring data of the Logstash cluster.
    After the Logstash cluster is restarted, the value of X-Pack Monitoring changes to Enable, and the associated Elasticsearch cluster appears.
    Important You can view the monitoring data of the Logstash cluster in the Kibana console only after the Logstash cluster is restarted.
    1. On the Cluster Monitoring page, click Kibana Console on the right side of Connect to Elasticsearch Cluster.
      X-Pack Monitoring enabled
    2. Enter the username and password to log on to the Kibana console.
      For more information, see Log on to the Kibana console.
    3. Go to the homepage as prompted. In the left-side navigation pane, click Monitoring.
      Note In this example, the Kibana console of an Elasticsearch V6.7 cluster is used. The operations for other versions of clusters may vary. The actual operations in the Kibana console prevail.
    4. In the Logstash section, view the monitoring data of the Logstash cluster.
      Logstash monitoring page