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

  1. Go to the Create Alert Rule panel of the CloudMonitor console.
    1. Log on to the Elasticsearch console.
    2. In the top navigation bar, select the region where the desired cluster resides.
    3. 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.
    4. In the left-side navigation pane of the page that appears, click Cluster Monitoring.
    5. In the Monitoring and Alerting section, click Go to CloudMonitor. The Create Alert Rule panel of the CloudMonitor console appears.
      Go to CloudMonitor
  2. Close the Create Alert Rule panel. In the left-side navigation pane, choose Alerts > Alert Rules.
  3. 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.
    ParameterDescription
    ProductSelect Logstash from the drop-down list.
    Resource RangeSelect Instances.
    Associated ResourcesSelect the Logstash cluster.
    Rule DescriptionClick 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 GroupSelect 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.
    MetricDescription
    Node Disk UsageRequired. Set the threshold to a value that is less than 75%.
    Node Heap Memory UsageRequired. Set the threshold to a value that is less than 85%.
    Node CPU UsageOptional. Set the threshold to a value that is less than 95%.
    Node 1m LoadOptional. Set the threshold to a value that is 80% of the number of vCPUs.
  4. Click OK.
  5. 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:
    1. In the left-side navigation pane of the CloudMonitor console, click Dashboard. On the Dashboard page, click the Cloud Service Monitoring Dashboards tab.
    2. Select Logstash from the drop-down list and then select the region where the Logstash cluster resides.
    3. Select the Logstash cluster from the instance drop-down list and specify a time range to view the monitoring data.
      Logstash dashboard