This topic describes how to modify an alarm configuration through using the example of updating the statement associated with the alarm.

Limits

  • An alarm can be associated with two types of statements: search statements and search-and-analysis statements. After you associate a statement of either type with an alarm, you can only update the statement as a new version of the same type, rather than one of the other type.

    For example, after you associate the request_method: GET search statement with an alarm, you can change it to error ( search statement), but you cannot change it to error| select count(1) as c(search-and-analysis statement).

  • For more information about how to modify an alarm configuration of an earlier version, see Upgrade an alarm configuration to the latest version.

  • If you want to modify an alarm configuration of the latest version, you can click Modify on the Alarm page, or choose Alarm > Modify on the dashboard page where the charts associated with the alarm is added.

Procedure

  1. Log on to the Log Service console and click the project name.
  2. In the left-side navigation pane of the Logstores page, click Dashboard.
  3. Click the name of the target dashboard.
  4. In the progress bar, choose Alert > Modify.
  5. On the right of the target statement, click the edit icon .

  6. On the displayed page, edit the statement, and then click OK.
    Note Before clicking OK, you can click Preview to preview the output of the new statement on the page.


  7. Modify other parameters for the alarm as needed, such as Search Interval and Trigger Condition, and then click Next. For more information, see Configure an alarm
  8. Modify notifications for the alarm as needed. For more information, see Set alarm notifications.
  9. Click Submit.

    The most recent time at which an alarm configuration was updated is shown in the Last Updated At column of the Alarm page.