public static final class ModifyMetricRuleTemplateRequest.AlertTemplates.Builder extends Object
| 构造器和说明 |
|---|
Builder() |
public ModifyMetricRuleTemplateRequest.AlertTemplates.Builder escalations(ModifyMetricRuleTemplateRequest.Escalations escalations)
public ModifyMetricRuleTemplateRequest.AlertTemplates.Builder category(String category)
Valid values of N: 1 to 200. For more information about how to obtain the abbreviation of a cloud service name, see `metricCategory` in the response parameter `Labels` of the [DescribeProjectMeta](~~114916~~) operation.
public ModifyMetricRuleTemplateRequest.AlertTemplates.Builder metricName(String metricName)
Valid values of N: 1 to 200. For information about how to obtain metrics, see [DescribeMetricMetaList](~~98846~~) or [Appendix 1: Metrics](~~163515~~).
public ModifyMetricRuleTemplateRequest.AlertTemplates.Builder namespace(String namespace)
Valid values of N: 1 to 200. For information about how to obtain the namespace of a cloud service, see [DescribeMetricMetaList](~~98846~~) or [Appendix 1: Metrics](~~163515~~).
public ModifyMetricRuleTemplateRequest.AlertTemplates.Builder period(Integer period)
Valid values of N: 1 to 200. > If the value is set to 300 seconds, the monitoring data is collected every 300 seconds. If the monitoring data is reported every 1 minute, the alert system calculates the average, maximum, and minimum values of the monitoring data of 5 minutes and checks whether the aggregated values exceed the threshold. To prevent unexpected alerts, we recommend that you set this parameter together with other parameters.
public ModifyMetricRuleTemplateRequest.AlertTemplates.Builder ruleName(String ruleName)
Valid values of N: 1 to 200.
public ModifyMetricRuleTemplateRequest.AlertTemplates.Builder selector(String selector)
Valid values of N: 1 to 200. For example, an alert template is applied to an application group, this parameter is set to `{"disk":"/"}`, and the MetricName parameter is set to `DiskUtilization`. In this case, the generated alert rule is applied to the root disk partition (`"/"`) of all instances in the application group to which the alert template is applied. > For more information about the values of extended fields, see [DescribeMetricRuleTemplateAttribute](~~114979~~).
public ModifyMetricRuleTemplateRequest.AlertTemplates.Builder webhook(String webhook)
Valid values of N: 1 to 200. The callback URL must be accessible over the Internet. CloudMonitor pushes an alert notification to the specified callback URL by sending an HTTP POST request. Only the HTTP protocol is supported.
public ModifyMetricRuleTemplateRequest.AlertTemplates build()
Copyright © 2024. All rights reserved.