ResourceMetricRuleProps
Properties for defining a ResourceMetricRule
.
See https://www.alibabacloud.com/help/ros/developer-reference/aliyun-cms-resourcemetricrule
Initializer
using AlibabaCloud.SDK.ROS.CDK.Cms;
new ResourceMetricRuleProps {
object ContactGroups,
object Escalations,
object MetricName,
object Namespace,
object Resources,
object CompositeExpression = null,
object DeletionForce = null,
object EffectiveInterval = null,
object EmailSubject = null,
object Interval = null,
object Labels = null,
object NoDataPolicy = null,
object NoEffectiveInterval = null,
object Period = null,
object Prometheus = null,
object RuleId = null,
object RuleName = null,
object SilenceTime = null,
object Webhook = null
};
Properties
Name | Type | Description |
---|---|---|
ContactGroups |
object |
Property contactGroups: The alert contact group. |
Escalations |
object |
Property escalations: You must select at least one of the Critical, Warn, and Info alert levels. |
MetricName |
object |
Property metricName: The name of the metric. |
Namespace |
object |
Property namespace: The namespace of the cloud service. |
Resources |
object |
Property resources: The information about the resource. |
CompositeExpression |
object |
Property compositeExpression: The trigger conditions for multiple metrics. |
DeletionForce |
object |
Property deletionForce: Whether to delete rule even if it is not created by ROS. |
EffectiveInterval |
object |
Property effectiveInterval: The time period during which the alert rule is effective. |
EmailSubject |
object |
Property emailSubject: The subject of the alert notification email. |
Interval |
object |
Property interval: The interval at which the alert is triggered. |
Labels |
object |
Property labels:. |
NoDataPolicy |
object |
Property noDataPolicy: The processing method of alerts when no monitoring data is found. |
NoEffectiveInterval |
object |
Property noEffectiveInterval: The time period during which the alert rule is ineffective. |
Period |
object |
Property period: The statistical period of the metric. |
Prometheus |
object |
Property prometheus: The Prometheus alert rule. |
RuleId |
object |
Property ruleId: The ID of the alert rule. |
RuleName |
object |
Property ruleName: The name of the alert rule. |
SilenceTime |
object |
Property silenceTime: The mute period during which new alerts are not sent even if the trigger conditions are met. |
Webhook |
object |
Property webhook: The callback URL to which a POST request is sent when an alert is triggered based on the alert rule. |
ContactGroups
Required
public object ContactGroups { get; set; }
- Type: object
Property contactGroups: The alert contact group.
The alert notifications are sent to the contacts that belong to the alert contact group. Note: An alert contact group can contain one or more alert contacts. For information about how to create alert contacts and alert contact groups, see PutContact and PutContactGroup.
Escalations
Required
public object Escalations { get; set; }
- Type: object
Property escalations: You must select at least one of the Critical, Warn, and Info alert levels.
MetricName
Required
public object MetricName { get; set; }
- Type: object
Property metricName: The name of the metric.
For information about how to query the name of a metric, see Appendix 1: Metrics. Note: If you create a Prometheus alert rule for Hybrid Cloud Monitoring, you must set this parameter to the name of the namespace. For information about how to obtain the name of a namespace, see DescribeHybridMonitorNamespaceList.
Namespace
Required
public object Namespace { get; set; }
- Type: object
Property namespace: The namespace of the cloud service.
For information about how to query the namespace of a cloud service, Appendix 1: Metrics. Note: If you create a Prometheus alert rule for Hybrid Cloud Monitoring, you must set this parameter to acs_prometheus.
Resources
Required
public object Resources { get; set; }
- Type: object
Property resources: The information about the resource.
Examples: [{"instanceId":"i-uf6j91r34rnwawoo*"}] and [{"userId":"100931896542*"}]. For information about the supported dimensions that are used to query resources, see Appendix 1: Metrics.
CompositeExpression
Optional
public object CompositeExpression { get; set; }
- Type: object
Property compositeExpression: The trigger conditions for multiple metrics.
Note: The trigger conditions for a single metric and multiple metrics are mutually exclusive. You cannot specify trigger conditions for a single metric and multiple metrics at the same time.
DeletionForce
Optional
public object DeletionForce { get; set; }
- Type: object
Property deletionForce: Whether to delete rule even if it is not created by ROS.
Default is false
EffectiveInterval
Optional
public object EffectiveInterval { get; set; }
- Type: object
Property effectiveInterval: The time period during which the alert rule is effective.
EmailSubject
Optional
public object EmailSubject { get; set; }
- Type: object
Property emailSubject: The subject of the alert notification email.
Interval
Optional
public object Interval { get; set; }
- Type: object
Property interval: The interval at which the alert is triggered.
Unit: seconds. Note: For information about how to query the statistical period of a metric, see Appendix 1: Metrics.
Labels
Optional
public object Labels { get; set; }
- Type: object
Property labels:.
NoDataPolicy
Optional
public object NoDataPolicy { get; set; }
- Type: object
Property noDataPolicy: The processing method of alerts when no monitoring data is found.
Valid values:
- KEEP_LAST_STATE (default value): No operation is performed.
- INSUFFICIENT_DATA: An alert whose content is "Insufficient data" is triggered.
- OK: The status is considered normal.
NoEffectiveInterval
Optional
public object NoEffectiveInterval { get; set; }
- Type: object
Property noEffectiveInterval: The time period during which the alert rule is ineffective.
Period
Optional
public object Period { get; set; }
- Type: object
Property period: The statistical period of the metric.
Unit: seconds. The default value is the interval at which the monitoring data of the metric is collected. Note: For information about how to query the statistical period of a metric, see Appendix 1: Metrics.
Prometheus
Optional
public object Prometheus { get; set; }
- Type: object
Property prometheus: The Prometheus alert rule.
Note: This parameter is required only when you create a Prometheus alert rule for Hybrid Cloud Monitoring.
RuleId
Optional
public object RuleId { get; set; }
- Type: object
Property ruleId: The ID of the alert rule.
If not specified, ROS will generate one. You can specify a new ID or the ID of an existing alert rule. For information about how to query the ID of an alert rule, see DescribeMetricRuleList. Note: If you specify a new ID, a threshold-triggered alert rule is created.
RuleName
Optional
public object RuleName { get; set; }
- Type: object
Property ruleName: The name of the alert rule.
If not specified and the rule is created by ROS, default to RuleId. You can specify a new name or the name of an existing alert rule. For information about how to query the name of an alert rule, see DescribeMetricRuleList. Note: If you specify a new name, a threshold-triggered alert rule is created.
SilenceTime
Optional
public object SilenceTime { get; set; }
- Type: object
Property silenceTime: The mute period during which new alerts are not sent even if the trigger conditions are met.
Unit: seconds. Default value: 86400. Note: If an alert is not cleared within the mute period, a new alert notification is sent when the mute period ends.
Webhook
Optional
public object Webhook { get; set; }
- Type: object
Property webhook: The callback URL to which a POST request is sent when an alert is triggered based on the alert rule.