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.
- 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 Multiple Metrics.
- Alert Level: Select Warning (Warn) from the drop-down list.
- Metric Type: Select Standard creation.
- Multi-metric Alert Condition:
- Select Node CPU Usage 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 Continuous 3 Count Period.
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.Note You 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 OK.
- 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: