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:
Enable the Public Network Access feature on the Kibana Configuration page of the Elasticsearch cluster. For more information, see Configure a public or private IP address whitelist for Kibana.
Enable the Auto Indexing feature for the Elasticsearch cluster, or add the +.monitoring-logstash* or +.monitoring* indexes to the Elasticsearch cluster. For more information, see Configure the YML file and Index API.
Procedure
Go to the Logstash Clusters page of the Alibaba Cloud Elasticsearch console.
Navigate to the desired cluster.
In the top navigation bar, select the region where the cluster resides.
On the Logstash Clusters page, find the cluster and click its ID.
In the left-side navigation pane of the page that appears, click Cluster Monitoring.
In the Monitoring and Alerting Configuration section, click Modify on the right side of X-Pack Monitoring.
In the Modify Configuration panel, set X-Pack Monitoring to Enable and associate the Logstash cluster with an Elasticsearch cluster.
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.
Click Test Connectivity.
If no error is reported, the Elasticsearch cluster is connected.
WarningAfter you enable or disable X-Pack Monitoring, the system restarts the Logstash cluster. This may affect your services. Proceed with caution.
Click OK.
The system returns to the Cluster Monitoring page and restarts the Logstash cluster.
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.
ImportantYou can view the monitoring data of the Logstash cluster in the Kibana console only after the Logstash cluster is restarted.
On the Cluster Monitoring page, click Kibana Console on the right side of Connect to Elasticsearch Cluster.
Enter the username and password to log on to the Kibana console.
For more information, see Log on to the Kibana console.
Go to the homepage as prompted. In the left-side navigation pane, click Monitoring.
NoteIn 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.
In the Logstash section, view the monitoring data of the Logstash cluster.