With the observability service of version 1.4.0 or later, you can create custom alert rules for virtual machines in associated clusters. Any alerts triggered by these rules are automatically resolved once the trigger conditions are no longer met.
Creating custom alert rules
Prerequisite
The cluster where the virtual machine requires custom alerts to be configured has been associated with the observability service.
Precaution
- Alerts triggered by custom alert rules only support sending alert notifications through the observability service.
- In a certain alert rule, if a cross-cluster migration is performed on a virtual machine in the alert object and the source virtual machine is not retained, if the destination cluster is already associated with the observability service, this virtual machine in the alert object will be updated to the migrated new virtual machine, and the alerts of the deprecated virtual machine will be automatically resolved.
- If the alert object is a VM group, then when the number of virtual machines in the corresponding virtual machine group changes, the alerts previously triggered by the custom rule will be automatically resolved and re-triggered.
Procedure
- In the left sidebar of the AOC Alert page, click Alert rule and on its page, click Custom rule.
- Click Create custom rule in the upper right corner of the custom rule page. You should see the Create custom alert rule dialog box pops up.
- Configure the basic information. Specify a name for the custom rule and add a description to the rule if needed.
- Select the alert object. You can select the alert object by choosing a cluster or a virtual machine group to filter the target virtual machine, or by directly selecting the target virtual machine.
Information:
Since some built-in alert rules are already applied to the system service virtual machine by default, to avoid duplicate alerting, the Exclude system service virtual machine option is checked by default. You can filter the Built-in rule list to view alert rules applied to the system service virtual machine. If the exclusion is not needed, uncheck the option.
- Configure the rule content. You can add a maximum of three trigger conditions for the same metric, triggering alerts of three levels (Critical, Notice, Info). Once you have determined the metrics, an alert text is automatically generated. You can also add an alert description to the alert text if needed.
- Determine whether to enable the custom alert rule (enabled by default). Once enabled, the custom alert rule will come into effect immediately after creation.
- Click Create.
Editing or deleting custom alert rules
Precaution
After modifying the trigger conditions (except for the duration) or the alert object, the previous alert triggered by the rule will be automatically resolved and re-triggered when the trigger conditions are met again.
Procedure
- In the left sidebar of the AOC Alert page, select Alert rule and on its page, click Custom rule.
- In the custom rule list, select the target rule and then click Edit or Delete in the pop-up details panel to complete the corresponding operation.