Alibaba Cloud Logstash allows you to monitor Logstash clusters and configure custom alert rules and notification methods for Logstash clusters. To ensure the stability of your Logstash cluster, we recommend that you configure monitoring and alerting for the cluster. This way, the system can monitor items, such as cluster status and disk usage, in real time. We also recommend that you check notifications that are sent to you by text message and take appropriate measures to resolve issues at the earliest opportunity. This topic describes how to configure a custom alert policy for a Logstash cluster.
Procedure
Go to the Create Alert Rule panel of the CloudMonitor console.
Log on to the Elasticsearch console.
In the top navigation bar, select the region where the desired cluster resides.
In the left-side navigation pane, click Logstash Clusters. On the Logstash Clusters page, find the cluster for which you want to configure a custom alert policy and click its ID.
In the left-side navigation pane of the page that appears, click Cluster Monitoring.
In the Monitoring and Alerting section, click Go to CloudMonitor. The Create Alert Rule panel of the CloudMonitor console appears.
Close the Create Alert Rule panel. In the left-side navigation pane, choose .
On the Alert Rules page, click Create Alert Rule. In the Create Alert Rule panel, configure the parameters to create a custom alert rule.
The following table describes the settings of the parameters in this example. Retain the default settings of the parameters that are not described in the table. For more information about the parameters, see Create an alert rule.
Parameter
Description
Product
Select Logstash from the drop-down list.
Resource Range
Select Instances.
Associated Resources
Select the Logstash cluster.
Rule Description
Click Add Rule. In the Add Rule Description panel, enter a name for the custom alert rule in the Alert Rule field and configure the other parameters based on the following instructions:
Metric Type: Select Combined Metrics.
Alert Level: Select Warning (Warn) from the drop-down list.
Multi-metric Alert Condition:
Select CPU Utilization of Logstash Instance Node from the drop-down list and set the threshold to a value that is greater than or equal to 85%.
Click Add Metric, select Node Disk Usage from the drop-down list, and then set the threshold to a value that is greater than or equal to 85%.
Click Add Metric, select Node Heap Memory Usage from the drop-down list, and then set the threshold to a value that is greater than or equal to 85%.
Click Add Metric, select Node 1m Load from the drop-down list, and then set the threshold to a value that is greater than or equal to 5.
Relationship Between Metrics: Select Generate alerts if one of the conditions is met (||).
Number of Times Threshold Is Reached Before An Alert Is Triggered: Select 3 Consecutive Cycles.
Alert Contact Group
Select the alert contact group that you created. For information about how to create an alert contact group, see Create an alert contact or alert contact group.
You can click Advanced Settings and enter a URL that can be accessed over the Internet in the Alert Callback field. This way, CloudMonitor can push alert notifications to the URL by using a POST request. Only HTTP is supported. For more information about how to use the alert callback feature to send alert notifications, see Use the alert callback feature to send notifications about threshold-triggered alerts.
When you configure a custom alert rule for a Logstash cluster, you can refer to the following table to configure thresholds for each metric.
NoteYou can configure only the following metrics for a Logstash cluster in CloudMonitor. If other metrics are displayed, ignore them.
Metric
Description
Node Disk Usage
Required. Set the threshold to a value that is less than 75%.
Node Heap Memory Usage
Required. Set the threshold to a value that is less than 85%.
Node CPU Usage
Optional. Set the threshold to a value that is less than 95%.
Node 1m Load
Optional. Set the threshold to a value that is 80% of the number of vCPUs.
Click Confirm.
View the Logstash dashboard.
After the configuration is complete and the Logstash cluster enters a normal state, the system starts to monitor the cluster and displays monitoring data. If the value of a metric exceeds the related threshold, the system sends an alert notification to the specified alert contact. You can perform the following steps to view the Logstash dashboard:
In the left-side navigation pane of the CloudMonitor console, click Dashboard. On the Dashboard page, click the Cloud Service Monitoring Dashboards tab.
Select Logstash from the drop-down list and then select the region where the Logstash cluster resides.
Select the Logstash cluster from the instance drop-down list and specify a time range to view the monitoring data.