ResourceMetricRuleProps
Properties for defining a ResourceMetricRule.
See https://www.alibabacloud.com/help/ros/developer-reference/aliyun-cms-resourcemetricrule
Initializer
import { ResourceMetricRuleProps } from '@alicloud/ros-cdk-cms'
const resourceMetricRuleProps: ResourceMetricRuleProps = { ... }
Properties
| Name | Type | Description |
|---|---|---|
contactGroups |
@alicloud/ros-cdk-core.IResolvable | string | @alicloud/ros-cdk-core.IResolvable[] |
Property contactGroups: The alert contact group. |
escalations |
@alicloud/ros-cdk-core.IResolvable | EscalationsProperty |
Property escalations: You must select at least one of the Critical, Warn, and Info alert levels. |
metricName |
string | @alicloud/ros-cdk-core.IResolvable |
Property metricName: The name of the metric. |
namespace |
string | @alicloud/ros-cdk-core.IResolvable |
Property namespace: The namespace of the cloud service. |
resources |
@alicloud/ros-cdk-core.IResolvable | {[ key: string ]: any}[] |
Property resources: The information about the resource. |
compositeExpression |
@alicloud/ros-cdk-core.IResolvable | CompositeExpressionProperty |
Property compositeExpression: The trigger conditions for multiple metrics. |
deletionForce |
boolean | @alicloud/ros-cdk-core.IResolvable |
Property deletionForce: Whether to delete rule even if it is not created by ROS. |
effectiveInterval |
string | @alicloud/ros-cdk-core.IResolvable |
Property effectiveInterval: The time period during which the alert rule is effective. |
emailSubject |
string | @alicloud/ros-cdk-core.IResolvable |
Property emailSubject: The subject of the alert notification email. |
interval |
number | @alicloud/ros-cdk-core.IResolvable |
Property interval: The interval at which the alert is triggered. |
labels |
@alicloud/ros-cdk-core.IResolvable | @alicloud/ros-cdk-core.IResolvable | LabelsProperty[] |
Property labels:. |
noDataPolicy |
string | @alicloud/ros-cdk-core.IResolvable |
Property noDataPolicy: The processing method of alerts when no monitoring data is found. |
noEffectiveInterval |
string | @alicloud/ros-cdk-core.IResolvable |
Property noEffectiveInterval: The time period during which the alert rule is ineffective. |
period |
number | @alicloud/ros-cdk-core.IResolvable |
Property period: The statistical period of the metric. |
prometheus |
@alicloud/ros-cdk-core.IResolvable | PrometheusProperty |
Property prometheus: The Prometheus alert rule. |
ruleId |
string | @alicloud/ros-cdk-core.IResolvable |
Property ruleId: The ID of the alert rule. |
ruleName |
string | @alicloud/ros-cdk-core.IResolvable |
Property ruleName: The name of the alert rule. |
silenceTime |
number | @alicloud/ros-cdk-core.IResolvable |
Property silenceTime: The mute period during which new alerts are not sent even if the trigger conditions are met. |
webhook |
string | @alicloud/ros-cdk-core.IResolvable |
Property webhook: The callback URL to which a POST request is sent when an alert is triggered based on the alert rule. |
contactGroupsRequired
public readonly contactGroups: IResolvable | string | IResolvable[];
- Type: @alicloud/ros-cdk-core.IResolvable | string | @alicloud/ros-cdk-core.IResolvable[]
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.
escalationsRequired
public readonly escalations: IResolvable | EscalationsProperty;
- Type: @alicloud/ros-cdk-core.IResolvable | EscalationsProperty
Property escalations: You must select at least one of the Critical, Warn, and Info alert levels.
metricNameRequired
public readonly metricName: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
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.
namespaceRequired
public readonly namespace: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
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.
resourcesRequired
public readonly resources: IResolvable | {[ key: string ]: any}[];
- Type: @alicloud/ros-cdk-core.IResolvable | {[ key: string ]: any}[]
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.
compositeExpressionOptional
public readonly compositeExpression: IResolvable | CompositeExpressionProperty;
- Type: @alicloud/ros-cdk-core.IResolvable | CompositeExpressionProperty
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.
deletionForceOptional
public readonly deletionForce: boolean | IResolvable;
- Type: boolean | @alicloud/ros-cdk-core.IResolvable
Property deletionForce: Whether to delete rule even if it is not created by ROS.
Default is false
effectiveIntervalOptional
public readonly effectiveInterval: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
Property effectiveInterval: The time period during which the alert rule is effective.
emailSubjectOptional
public readonly emailSubject: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
Property emailSubject: The subject of the alert notification email.
intervalOptional
public readonly interval: number | IResolvable;
- Type: number | @alicloud/ros-cdk-core.IResolvable
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.
labelsOptional
public readonly labels: IResolvable | IResolvable | LabelsProperty[];
- Type: @alicloud/ros-cdk-core.IResolvable | @alicloud/ros-cdk-core.IResolvable | LabelsProperty[]
Property labels:.
noDataPolicyOptional
public readonly noDataPolicy: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
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.
noEffectiveIntervalOptional
public readonly noEffectiveInterval: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
Property noEffectiveInterval: The time period during which the alert rule is ineffective.
periodOptional
public readonly period: number | IResolvable;
- Type: number | @alicloud/ros-cdk-core.IResolvable
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.
prometheusOptional
public readonly prometheus: IResolvable | PrometheusProperty;
- Type: @alicloud/ros-cdk-core.IResolvable | PrometheusProperty
Property prometheus: The Prometheus alert rule.
Note: This parameter is required only when you create a Prometheus alert rule for Hybrid Cloud Monitoring.
ruleIdOptional
public readonly ruleId: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
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.
ruleNameOptional
public readonly ruleName: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
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.
silenceTimeOptional
public readonly silenceTime: number | IResolvable;
- Type: number | @alicloud/ros-cdk-core.IResolvable
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.
webhookOptional
public readonly webhook: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
Property webhook: The callback URL to which a POST request is sent when an alert is triggered based on the alert rule.