This topic describes how to modify an alarm configuration through using the example of updating the statement associated with the alarm.
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: GETsearch 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 on the dashboard page where the charts associated with the alarm is added.
- Log on to the Log Service console and click the project name.
- In the left-side navigation pane of the Logstores page, click Dashboard.
- Click the name of the target dashboard.
- In the progress bar, choose .
- On the right of the target statement, click the edit icon .
- 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.
- 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
- Modify notifications for the alarm as needed. For more information, see Set alarm notifications.
- 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.