published on Thursday, Jul 16, 2026 by Pulumi
published on Thursday, Jul 16, 2026 by Pulumi
Provides a Cloud Monitor Service Metric Alarm Rule resource.
Describes the time-series metric alarm rule configured by the user.
For information about Cloud Monitor Service Metric Alarm Rule and how to use it, see What is Metric Alarm Rule.
NOTE: Available since v1.285.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const _default = new alicloud.cloudmonitor.ServiceMetricAlarmRule("default", {
status: true,
sendOk: true,
contactGroups: "云账号报警联系人",
silenceTime: "86400",
metricAlarmRuleId: "SystemDefault_acs_drds_IOPSUsageOfDo",
period: "60",
effectiveInterval: "00:00-23:59 +0800 dayofweek 1,2,3,4,5,6,7",
noDataPolicy: "KEEP_LAST_STATE",
namespace: "acs_drds",
metricName: "IOPSUsageOfDN",
escalations: {
critical: {
comparisonOperator: "GreaterThanThreshold",
times: 5,
statistics: "Average",
threshold: "80",
},
},
resources: JSON.stringify([{
resource: "_ALL",
}]),
ruleName: "SystemDefault_acs_drds_IOPSUsageOfDN",
});
import pulumi
import json
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
default = alicloud.cloudmonitor.ServiceMetricAlarmRule("default",
status=True,
send_ok=True,
contact_groups="云账号报警联系人",
silence_time="86400",
metric_alarm_rule_id="SystemDefault_acs_drds_IOPSUsageOfDo",
period="60",
effective_interval="00:00-23:59 +0800 dayofweek 1,2,3,4,5,6,7",
no_data_policy="KEEP_LAST_STATE",
namespace="acs_drds",
metric_name="IOPSUsageOfDN",
escalations={
"critical": {
"comparison_operator": "GreaterThanThreshold",
"times": 5,
"statistics": "Average",
"threshold": "80",
},
},
resources=json.dumps([{
"resource": "_ALL",
}]),
rule_name="SystemDefault_acs_drds_IOPSUsageOfDN")
package main
import (
"encoding/json"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cloudmonitor"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "terraform-example"
if param := cfg.Get("name"); param != "" {
name = param
}
tmpJSON0, err := json.Marshal([]map[string]interface{}{
map[string]interface{}{
"resource": "_ALL",
},
})
if err != nil {
return err
}
json0 := string(tmpJSON0)
_, err = cloudmonitor.NewServiceMetricAlarmRule(ctx, "default", &cloudmonitor.ServiceMetricAlarmRuleArgs{
Status: pulumi.Bool(true),
SendOk: pulumi.Bool(true),
ContactGroups: pulumi.String("云账号报警联系人"),
SilenceTime: pulumi.String("86400"),
MetricAlarmRuleId: pulumi.String("SystemDefault_acs_drds_IOPSUsageOfDo"),
Period: pulumi.String("60"),
EffectiveInterval: pulumi.String("00:00-23:59 +0800 dayofweek 1,2,3,4,5,6,7"),
NoDataPolicy: pulumi.String("KEEP_LAST_STATE"),
Namespace: pulumi.String("acs_drds"),
MetricName: pulumi.String("IOPSUsageOfDN"),
Escalations: &cloudmonitor.ServiceMetricAlarmRuleEscalationsArgs{
Critical: &cloudmonitor.ServiceMetricAlarmRuleEscalationsCriticalArgs{
ComparisonOperator: pulumi.String("GreaterThanThreshold"),
Times: pulumi.Int(5),
Statistics: pulumi.String("Average"),
Threshold: pulumi.String("80"),
},
},
Resources: pulumi.String(json0),
RuleName: pulumi.String("SystemDefault_acs_drds_IOPSUsageOfDN"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-example";
var @default = new AliCloud.CloudMonitor.ServiceMetricAlarmRule("default", new()
{
Status = true,
SendOk = true,
ContactGroups = "云账号报警联系人",
SilenceTime = "86400",
MetricAlarmRuleId = "SystemDefault_acs_drds_IOPSUsageOfDo",
Period = "60",
EffectiveInterval = "00:00-23:59 +0800 dayofweek 1,2,3,4,5,6,7",
NoDataPolicy = "KEEP_LAST_STATE",
Namespace = "acs_drds",
MetricName = "IOPSUsageOfDN",
Escalations = new AliCloud.CloudMonitor.Inputs.ServiceMetricAlarmRuleEscalationsArgs
{
Critical = new AliCloud.CloudMonitor.Inputs.ServiceMetricAlarmRuleEscalationsCriticalArgs
{
ComparisonOperator = "GreaterThanThreshold",
Times = 5,
Statistics = "Average",
Threshold = "80",
},
},
Resources = JsonSerializer.Serialize(new[]
{
new Dictionary<string, object?>
{
["resource"] = "_ALL",
},
}),
RuleName = "SystemDefault_acs_drds_IOPSUsageOfDN",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cloudmonitor.ServiceMetricAlarmRule;
import com.pulumi.alicloud.cloudmonitor.ServiceMetricAlarmRuleArgs;
import com.pulumi.alicloud.cloudmonitor.inputs.ServiceMetricAlarmRuleEscalationsArgs;
import com.pulumi.alicloud.cloudmonitor.inputs.ServiceMetricAlarmRuleEscalationsCriticalArgs;
import static com.pulumi.codegen.internal.Serialization.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var name = config.get("name").orElse("terraform-example");
var default_ = new ServiceMetricAlarmRule("default", ServiceMetricAlarmRuleArgs.builder()
.status(true)
.sendOk(true)
.contactGroups("云账号报警联系人")
.silenceTime("86400")
.metricAlarmRuleId("SystemDefault_acs_drds_IOPSUsageOfDo")
.period("60")
.effectiveInterval("00:00-23:59 +0800 dayofweek 1,2,3,4,5,6,7")
.noDataPolicy("KEEP_LAST_STATE")
.namespace("acs_drds")
.metricName("IOPSUsageOfDN")
.escalations(ServiceMetricAlarmRuleEscalationsArgs.builder()
.critical(ServiceMetricAlarmRuleEscalationsCriticalArgs.builder()
.comparisonOperator("GreaterThanThreshold")
.times(5)
.statistics("Average")
.threshold("80")
.build())
.build())
.resources(serializeJson(
jsonArray(jsonObject(
jsonProperty("resource", "_ALL")
))))
.ruleName("SystemDefault_acs_drds_IOPSUsageOfDN")
.build());
}
}
configuration:
name:
type: string
default: terraform-example
resources:
default:
type: alicloud:cloudmonitor:ServiceMetricAlarmRule
properties:
status: true
sendOk: true
contactGroups: 云账号报警联系人
silenceTime: '86400'
metricAlarmRuleId: SystemDefault_acs_drds_IOPSUsageOfDo
period: '60'
effectiveInterval: 00:00-23:59 +0800 dayofweek 1,2,3,4,5,6,7
noDataPolicy: KEEP_LAST_STATE
namespace: acs_drds
metricName: IOPSUsageOfDN
escalations:
critical:
comparisonOperator: GreaterThanThreshold
times: '5'
statistics: Average
threshold: '80'
resources:
fn::toJSON:
- resource: _ALL
ruleName: SystemDefault_acs_drds_IOPSUsageOfDN
pulumi {
required_providers {
alicloud = {
source = "pulumi/alicloud"
}
}
}
resource "alicloud_cloudmonitor_servicemetricalarmrule" "default" {
status = true
send_ok = true
contact_groups = "云账号报警联系人"
silence_time = "86400"
metric_alarm_rule_id = "SystemDefault_acs_drds_IOPSUsageOfDo"
period = "60"
effective_interval = "00:00-23:59 +0800 dayofweek 1,2,3,4,5,6,7"
no_data_policy = "KEEP_LAST_STATE"
namespace = "acs_drds"
metric_name = "IOPSUsageOfDN"
escalations = {
critical = {
comparison_operator = "GreaterThanThreshold"
times = "5"
statistics = "Average"
threshold = "80"
}
}
resources = jsonencode([{
"resource" = "_ALL"
}])
rule_name = "SystemDefault_acs_drds_IOPSUsageOfDN"
}
variable "name" {
type = string
default = "terraform-example"
}
📚 Need more examples? VIEW MORE EXAMPLES
Create ServiceMetricAlarmRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ServiceMetricAlarmRule(name: string, args: ServiceMetricAlarmRuleArgs, opts?: CustomResourceOptions);@overload
def ServiceMetricAlarmRule(resource_name: str,
args: ServiceMetricAlarmRuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ServiceMetricAlarmRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
metric_alarm_rule_id: Optional[str] = None,
contact_groups: Optional[str] = None,
rule_name: Optional[str] = None,
resources: Optional[str] = None,
namespace: Optional[str] = None,
metric_name: Optional[str] = None,
interval: Optional[str] = None,
prometheus: Optional[ServiceMetricAlarmRulePrometheusArgs] = None,
composite_expression: Optional[ServiceMetricAlarmRuleCompositeExpressionArgs] = None,
escalations: Optional[ServiceMetricAlarmRuleEscalationsArgs] = None,
no_data_policy: Optional[str] = None,
no_effective_interval: Optional[str] = None,
period: Optional[str] = None,
labels: Optional[Sequence[ServiceMetricAlarmRuleLabelArgs]] = None,
email_subject: Optional[str] = None,
effective_interval: Optional[str] = None,
send_ok: Optional[bool] = None,
silence_time: Optional[str] = None,
status: Optional[bool] = None,
webhook: Optional[str] = None)func NewServiceMetricAlarmRule(ctx *Context, name string, args ServiceMetricAlarmRuleArgs, opts ...ResourceOption) (*ServiceMetricAlarmRule, error)public ServiceMetricAlarmRule(string name, ServiceMetricAlarmRuleArgs args, CustomResourceOptions? opts = null)
public ServiceMetricAlarmRule(String name, ServiceMetricAlarmRuleArgs args)
public ServiceMetricAlarmRule(String name, ServiceMetricAlarmRuleArgs args, CustomResourceOptions options)
type: alicloud:cloudmonitor:ServiceMetricAlarmRule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "alicloud_cloudmonitor_service_metric_alarm_rule" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args ServiceMetricAlarmRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ServiceMetricAlarmRuleArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ServiceMetricAlarmRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ServiceMetricAlarmRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ServiceMetricAlarmRuleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var serviceMetricAlarmRuleResource = new AliCloud.CloudMonitor.ServiceMetricAlarmRule("serviceMetricAlarmRuleResource", new()
{
MetricAlarmRuleId = "string",
ContactGroups = "string",
RuleName = "string",
Resources = "string",
Namespace = "string",
MetricName = "string",
Interval = "string",
Prometheus = new AliCloud.CloudMonitor.Inputs.ServiceMetricAlarmRulePrometheusArgs
{
Annotations = new[]
{
new AliCloud.CloudMonitor.Inputs.ServiceMetricAlarmRulePrometheusAnnotationArgs
{
Key = "string",
Value = "string",
},
},
Level = "string",
PromQl = "string",
Times = 0,
},
CompositeExpression = new AliCloud.CloudMonitor.Inputs.ServiceMetricAlarmRuleCompositeExpressionArgs
{
ExpressionListJoin = "string",
ExpressionLists = new[]
{
new AliCloud.CloudMonitor.Inputs.ServiceMetricAlarmRuleCompositeExpressionExpressionListArgs
{
ComparisonOperator = "string",
MetricName = "string",
Period = 0,
Statistics = "string",
Threshold = "string",
},
},
ExpressionRaw = "string",
Level = "string",
Times = 0,
},
Escalations = new AliCloud.CloudMonitor.Inputs.ServiceMetricAlarmRuleEscalationsArgs
{
Critical = new AliCloud.CloudMonitor.Inputs.ServiceMetricAlarmRuleEscalationsCriticalArgs
{
ComparisonOperator = "string",
PreCondition = "string",
Statistics = "string",
Threshold = "string",
Times = 0,
},
Info = new AliCloud.CloudMonitor.Inputs.ServiceMetricAlarmRuleEscalationsInfoArgs
{
ComparisonOperator = "string",
PreCondition = "string",
Statistics = "string",
Threshold = "string",
Times = 0,
},
Warn = new AliCloud.CloudMonitor.Inputs.ServiceMetricAlarmRuleEscalationsWarnArgs
{
ComparisonOperator = "string",
PreCondition = "string",
Statistics = "string",
Threshold = "string",
Times = 0,
},
},
NoDataPolicy = "string",
NoEffectiveInterval = "string",
Period = "string",
Labels = new[]
{
new AliCloud.CloudMonitor.Inputs.ServiceMetricAlarmRuleLabelArgs
{
Key = "string",
Value = "string",
},
},
EmailSubject = "string",
EffectiveInterval = "string",
SendOk = false,
SilenceTime = "string",
Status = false,
Webhook = "string",
});
example, err := cloudmonitor.NewServiceMetricAlarmRule(ctx, "serviceMetricAlarmRuleResource", &cloudmonitor.ServiceMetricAlarmRuleArgs{
MetricAlarmRuleId: pulumi.String("string"),
ContactGroups: pulumi.String("string"),
RuleName: pulumi.String("string"),
Resources: pulumi.String("string"),
Namespace: pulumi.String("string"),
MetricName: pulumi.String("string"),
Interval: pulumi.String("string"),
Prometheus: &cloudmonitor.ServiceMetricAlarmRulePrometheusArgs{
Annotations: cloudmonitor.ServiceMetricAlarmRulePrometheusAnnotationArray{
&cloudmonitor.ServiceMetricAlarmRulePrometheusAnnotationArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
Level: pulumi.String("string"),
PromQl: pulumi.String("string"),
Times: pulumi.Int(0),
},
CompositeExpression: &cloudmonitor.ServiceMetricAlarmRuleCompositeExpressionArgs{
ExpressionListJoin: pulumi.String("string"),
ExpressionLists: cloudmonitor.ServiceMetricAlarmRuleCompositeExpressionExpressionListArray{
&cloudmonitor.ServiceMetricAlarmRuleCompositeExpressionExpressionListArgs{
ComparisonOperator: pulumi.String("string"),
MetricName: pulumi.String("string"),
Period: pulumi.Int(0),
Statistics: pulumi.String("string"),
Threshold: pulumi.String("string"),
},
},
ExpressionRaw: pulumi.String("string"),
Level: pulumi.String("string"),
Times: pulumi.Int(0),
},
Escalations: &cloudmonitor.ServiceMetricAlarmRuleEscalationsArgs{
Critical: &cloudmonitor.ServiceMetricAlarmRuleEscalationsCriticalArgs{
ComparisonOperator: pulumi.String("string"),
PreCondition: pulumi.String("string"),
Statistics: pulumi.String("string"),
Threshold: pulumi.String("string"),
Times: pulumi.Int(0),
},
Info: &cloudmonitor.ServiceMetricAlarmRuleEscalationsInfoArgs{
ComparisonOperator: pulumi.String("string"),
PreCondition: pulumi.String("string"),
Statistics: pulumi.String("string"),
Threshold: pulumi.String("string"),
Times: pulumi.Int(0),
},
Warn: &cloudmonitor.ServiceMetricAlarmRuleEscalationsWarnArgs{
ComparisonOperator: pulumi.String("string"),
PreCondition: pulumi.String("string"),
Statistics: pulumi.String("string"),
Threshold: pulumi.String("string"),
Times: pulumi.Int(0),
},
},
NoDataPolicy: pulumi.String("string"),
NoEffectiveInterval: pulumi.String("string"),
Period: pulumi.String("string"),
Labels: cloudmonitor.ServiceMetricAlarmRuleLabelArray{
&cloudmonitor.ServiceMetricAlarmRuleLabelArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
EmailSubject: pulumi.String("string"),
EffectiveInterval: pulumi.String("string"),
SendOk: pulumi.Bool(false),
SilenceTime: pulumi.String("string"),
Status: pulumi.Bool(false),
Webhook: pulumi.String("string"),
})
resource "alicloud_cloudmonitor_service_metric_alarm_rule" "serviceMetricAlarmRuleResource" {
lifecycle {
create_before_destroy = true
}
metric_alarm_rule_id = "string"
contact_groups = "string"
rule_name = "string"
resources = "string"
namespace = "string"
metric_name = "string"
interval = "string"
prometheus = {
annotations = [{
key = "string"
value = "string"
}]
level = "string"
prom_ql = "string"
times = 0
}
composite_expression = {
expression_list_join = "string"
expression_lists = [{
comparison_operator = "string"
metric_name = "string"
period = 0
statistics = "string"
threshold = "string"
}]
expression_raw = "string"
level = "string"
times = 0
}
escalations = {
critical = {
comparison_operator = "string"
pre_condition = "string"
statistics = "string"
threshold = "string"
times = 0
}
info = {
comparison_operator = "string"
pre_condition = "string"
statistics = "string"
threshold = "string"
times = 0
}
warn = {
comparison_operator = "string"
pre_condition = "string"
statistics = "string"
threshold = "string"
times = 0
}
}
no_data_policy = "string"
no_effective_interval = "string"
period = "string"
labels {
key = "string"
value = "string"
}
email_subject = "string"
effective_interval = "string"
send_ok = false
silence_time = "string"
status = false
webhook = "string"
}
var serviceMetricAlarmRuleResource = new ServiceMetricAlarmRule("serviceMetricAlarmRuleResource", ServiceMetricAlarmRuleArgs.builder()
.metricAlarmRuleId("string")
.contactGroups("string")
.ruleName("string")
.resources("string")
.namespace("string")
.metricName("string")
.interval("string")
.prometheus(ServiceMetricAlarmRulePrometheusArgs.builder()
.annotations(ServiceMetricAlarmRulePrometheusAnnotationArgs.builder()
.key("string")
.value("string")
.build())
.level("string")
.promQl("string")
.times(0)
.build())
.compositeExpression(ServiceMetricAlarmRuleCompositeExpressionArgs.builder()
.expressionListJoin("string")
.expressionLists(ServiceMetricAlarmRuleCompositeExpressionExpressionListArgs.builder()
.comparisonOperator("string")
.metricName("string")
.period(0)
.statistics("string")
.threshold("string")
.build())
.expressionRaw("string")
.level("string")
.times(0)
.build())
.escalations(ServiceMetricAlarmRuleEscalationsArgs.builder()
.critical(ServiceMetricAlarmRuleEscalationsCriticalArgs.builder()
.comparisonOperator("string")
.preCondition("string")
.statistics("string")
.threshold("string")
.times(0)
.build())
.info(ServiceMetricAlarmRuleEscalationsInfoArgs.builder()
.comparisonOperator("string")
.preCondition("string")
.statistics("string")
.threshold("string")
.times(0)
.build())
.warn(ServiceMetricAlarmRuleEscalationsWarnArgs.builder()
.comparisonOperator("string")
.preCondition("string")
.statistics("string")
.threshold("string")
.times(0)
.build())
.build())
.noDataPolicy("string")
.noEffectiveInterval("string")
.period("string")
.labels(ServiceMetricAlarmRuleLabelArgs.builder()
.key("string")
.value("string")
.build())
.emailSubject("string")
.effectiveInterval("string")
.sendOk(false)
.silenceTime("string")
.status(false)
.webhook("string")
.build());
service_metric_alarm_rule_resource = alicloud.cloudmonitor.ServiceMetricAlarmRule("serviceMetricAlarmRuleResource",
metric_alarm_rule_id="string",
contact_groups="string",
rule_name="string",
resources="string",
namespace="string",
metric_name="string",
interval="string",
prometheus={
"annotations": [{
"key": "string",
"value": "string",
}],
"level": "string",
"prom_ql": "string",
"times": 0,
},
composite_expression={
"expression_list_join": "string",
"expression_lists": [{
"comparison_operator": "string",
"metric_name": "string",
"period": 0,
"statistics": "string",
"threshold": "string",
}],
"expression_raw": "string",
"level": "string",
"times": 0,
},
escalations={
"critical": {
"comparison_operator": "string",
"pre_condition": "string",
"statistics": "string",
"threshold": "string",
"times": 0,
},
"info": {
"comparison_operator": "string",
"pre_condition": "string",
"statistics": "string",
"threshold": "string",
"times": 0,
},
"warn": {
"comparison_operator": "string",
"pre_condition": "string",
"statistics": "string",
"threshold": "string",
"times": 0,
},
},
no_data_policy="string",
no_effective_interval="string",
period="string",
labels=[{
"key": "string",
"value": "string",
}],
email_subject="string",
effective_interval="string",
send_ok=False,
silence_time="string",
status=False,
webhook="string")
const serviceMetricAlarmRuleResource = new alicloud.cloudmonitor.ServiceMetricAlarmRule("serviceMetricAlarmRuleResource", {
metricAlarmRuleId: "string",
contactGroups: "string",
ruleName: "string",
resources: "string",
namespace: "string",
metricName: "string",
interval: "string",
prometheus: {
annotations: [{
key: "string",
value: "string",
}],
level: "string",
promQl: "string",
times: 0,
},
compositeExpression: {
expressionListJoin: "string",
expressionLists: [{
comparisonOperator: "string",
metricName: "string",
period: 0,
statistics: "string",
threshold: "string",
}],
expressionRaw: "string",
level: "string",
times: 0,
},
escalations: {
critical: {
comparisonOperator: "string",
preCondition: "string",
statistics: "string",
threshold: "string",
times: 0,
},
info: {
comparisonOperator: "string",
preCondition: "string",
statistics: "string",
threshold: "string",
times: 0,
},
warn: {
comparisonOperator: "string",
preCondition: "string",
statistics: "string",
threshold: "string",
times: 0,
},
},
noDataPolicy: "string",
noEffectiveInterval: "string",
period: "string",
labels: [{
key: "string",
value: "string",
}],
emailSubject: "string",
effectiveInterval: "string",
sendOk: false,
silenceTime: "string",
status: false,
webhook: "string",
});
type: alicloud:cloudmonitor:ServiceMetricAlarmRule
properties:
compositeExpression:
expressionListJoin: string
expressionLists:
- comparisonOperator: string
metricName: string
period: 0
statistics: string
threshold: string
expressionRaw: string
level: string
times: 0
contactGroups: string
effectiveInterval: string
emailSubject: string
escalations:
critical:
comparisonOperator: string
preCondition: string
statistics: string
threshold: string
times: 0
info:
comparisonOperator: string
preCondition: string
statistics: string
threshold: string
times: 0
warn:
comparisonOperator: string
preCondition: string
statistics: string
threshold: string
times: 0
interval: string
labels:
- key: string
value: string
metricAlarmRuleId: string
metricName: string
namespace: string
noDataPolicy: string
noEffectiveInterval: string
period: string
prometheus:
annotations:
- key: string
value: string
level: string
promQl: string
times: 0
resources: string
ruleName: string
sendOk: false
silenceTime: string
status: false
webhook: string
ServiceMetricAlarmRule Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ServiceMetricAlarmRule resource accepts the following input properties:
- Contact
Groups string Alarm contact groups. Alarm notifications are sent to the contacts in these groups.
NOTE: An alarm contact group is a collection of one or more alarm contacts. For information about how to create alarm contacts and alarm contact groups, see PutContact and PutContactGroup.
- Metric
Alarm stringRule Id The ID of the alarm rule.
You can specify a new alarm rule ID or use an existing alarm rule ID from CloudMonitor. For information about how to query alarm rule IDs, see DescribeMetricRuleList.
NOTE: Specifying a new alarm rule ID creates a threshold-based alarm rule.
- Metric
Name string The name of the metric. For information about how to query metric names, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter specifies the metric store name. For information about how to obtain the metric store name, see DescribeHybridMonitorNamespaceList.
- Namespace string
The namespace of the cloud service metric data. For information about how to query the namespace of a cloud service, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter must be set to
acsPrometheus.- Resources string
- Resource information, for example:
[{"instanceId":"i-uf6j91r34rnwawoo****"}],[{"userId":"100931896542****"}]. For dimensions supported in resource information, see Cloud Service Metrics. - Rule
Name string Alert rule name.
You can enter a new alert rule name or use an existing alert rule name in CloudMonitor. For information about how to query alert rule names, see DescribeMetricRuleList.
NOTE: Entering a new alert rule name creates a threshold-based alert rule.
- Composite
Expression Pulumi.Ali Cloud. Cloud Monitor. Inputs. Service Metric Alarm Rule Composite Expression Alert condition for multiple metrics.
NOTE: Single-metric and multi-metric conditions are mutually exclusive and cannot be configured simultaneously. See
compositeExpressionbelow.- Effective
Interval string - The time range during which the alert rule is effective.
- Email
Subject string - Subject of alert emails.
- Escalations
Pulumi.
Ali Cloud. Cloud Monitor. Inputs. Service Metric Alarm Rule Escalations - The trigger conditions for alert levels. See
escalationsbelow. - Interval string
The trigger interval of the alarm rule. Unit: seconds.
NOTE: For information about how to query the statistical period of a metric, see Cloud Service Metrics.
NOTE: This parameter is immutable. Changing it after creation has no effect.
- Labels
List<Pulumi.
Ali Cloud. Cloud Monitor. Inputs. Service Metric Alarm Rule Label> When a metric meets the alert condition and an alert is triggered, the labels are written to the metric and displayed in the alert notification.
NOTE: This feature is equivalent to the Label in Prometheus alerts. See
labelsbelow.- No
Data stringPolicy - The policy to apply when no monitoring data is available. Valid values:
- KEEP_LAST_STATE (default): No action is taken.
- INSUFFICIENT_DATA: The alert status is set to "Insufficient Data."
- OK: The alert status is set to "OK."
- No
Effective stringInterval - The time range during which the alarm rule is inactive.
- Period string
The statistical period of the metric. Unit: seconds. By default, this is the original reporting period of the metric.
NOTE: For information about how to query the statistical period of a metric, see Cloud Service Metrics.
- Prometheus
Pulumi.
Ali Cloud. Cloud Monitor. Inputs. Service Metric Alarm Rule Prometheus Prometheus alert.
NOTE: You must specify this parameter only when you create a Prometheus alert rule for Enterprise Cloud Monitor. See
prometheusbelow.- Send
Ok bool - Specifies whether to send recovery notifications.
- Silence
Time string Channel silence period. Unit: seconds. Default value: 86400.
NOTE: The channel silence period specifies how long to wait before resending an alarm notification if the alarm condition has not returned to normal after the initial alarm.
- Status bool
- The enabled status of the alarm rule. Valid values:
- true: enabled.
- false: disabled.
- Webhook string
- The URL address specified for callback when an alert is triggered. A POST request is sent to this URL.
- Contact
Groups string Alarm contact groups. Alarm notifications are sent to the contacts in these groups.
NOTE: An alarm contact group is a collection of one or more alarm contacts. For information about how to create alarm contacts and alarm contact groups, see PutContact and PutContactGroup.
- Metric
Alarm stringRule Id The ID of the alarm rule.
You can specify a new alarm rule ID or use an existing alarm rule ID from CloudMonitor. For information about how to query alarm rule IDs, see DescribeMetricRuleList.
NOTE: Specifying a new alarm rule ID creates a threshold-based alarm rule.
- Metric
Name string The name of the metric. For information about how to query metric names, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter specifies the metric store name. For information about how to obtain the metric store name, see DescribeHybridMonitorNamespaceList.
- Namespace string
The namespace of the cloud service metric data. For information about how to query the namespace of a cloud service, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter must be set to
acsPrometheus.- Resources string
- Resource information, for example:
[{"instanceId":"i-uf6j91r34rnwawoo****"}],[{"userId":"100931896542****"}]. For dimensions supported in resource information, see Cloud Service Metrics. - Rule
Name string Alert rule name.
You can enter a new alert rule name or use an existing alert rule name in CloudMonitor. For information about how to query alert rule names, see DescribeMetricRuleList.
NOTE: Entering a new alert rule name creates a threshold-based alert rule.
- Composite
Expression ServiceMetric Alarm Rule Composite Expression Args Alert condition for multiple metrics.
NOTE: Single-metric and multi-metric conditions are mutually exclusive and cannot be configured simultaneously. See
compositeExpressionbelow.- Effective
Interval string - The time range during which the alert rule is effective.
- Email
Subject string - Subject of alert emails.
- Escalations
Service
Metric Alarm Rule Escalations Args - The trigger conditions for alert levels. See
escalationsbelow. - Interval string
The trigger interval of the alarm rule. Unit: seconds.
NOTE: For information about how to query the statistical period of a metric, see Cloud Service Metrics.
NOTE: This parameter is immutable. Changing it after creation has no effect.
- Labels
[]Service
Metric Alarm Rule Label Args When a metric meets the alert condition and an alert is triggered, the labels are written to the metric and displayed in the alert notification.
NOTE: This feature is equivalent to the Label in Prometheus alerts. See
labelsbelow.- No
Data stringPolicy - The policy to apply when no monitoring data is available. Valid values:
- KEEP_LAST_STATE (default): No action is taken.
- INSUFFICIENT_DATA: The alert status is set to "Insufficient Data."
- OK: The alert status is set to "OK."
- No
Effective stringInterval - The time range during which the alarm rule is inactive.
- Period string
The statistical period of the metric. Unit: seconds. By default, this is the original reporting period of the metric.
NOTE: For information about how to query the statistical period of a metric, see Cloud Service Metrics.
- Prometheus
Service
Metric Alarm Rule Prometheus Args Prometheus alert.
NOTE: You must specify this parameter only when you create a Prometheus alert rule for Enterprise Cloud Monitor. See
prometheusbelow.- Send
Ok bool - Specifies whether to send recovery notifications.
- Silence
Time string Channel silence period. Unit: seconds. Default value: 86400.
NOTE: The channel silence period specifies how long to wait before resending an alarm notification if the alarm condition has not returned to normal after the initial alarm.
- Status bool
- The enabled status of the alarm rule. Valid values:
- true: enabled.
- false: disabled.
- Webhook string
- The URL address specified for callback when an alert is triggered. A POST request is sent to this URL.
- contact_
groups string Alarm contact groups. Alarm notifications are sent to the contacts in these groups.
NOTE: An alarm contact group is a collection of one or more alarm contacts. For information about how to create alarm contacts and alarm contact groups, see PutContact and PutContactGroup.
- metric_
alarm_ stringrule_ id The ID of the alarm rule.
You can specify a new alarm rule ID or use an existing alarm rule ID from CloudMonitor. For information about how to query alarm rule IDs, see DescribeMetricRuleList.
NOTE: Specifying a new alarm rule ID creates a threshold-based alarm rule.
- metric_
name string The name of the metric. For information about how to query metric names, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter specifies the metric store name. For information about how to obtain the metric store name, see DescribeHybridMonitorNamespaceList.
- namespace string
The namespace of the cloud service metric data. For information about how to query the namespace of a cloud service, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter must be set to
acsPrometheus.- resources string
- Resource information, for example:
[{"instanceId":"i-uf6j91r34rnwawoo****"}],[{"userId":"100931896542****"}]. For dimensions supported in resource information, see Cloud Service Metrics. - rule_
name string Alert rule name.
You can enter a new alert rule name or use an existing alert rule name in CloudMonitor. For information about how to query alert rule names, see DescribeMetricRuleList.
NOTE: Entering a new alert rule name creates a threshold-based alert rule.
- composite_
expression object Alert condition for multiple metrics.
NOTE: Single-metric and multi-metric conditions are mutually exclusive and cannot be configured simultaneously. See
compositeExpressionbelow.- effective_
interval string - The time range during which the alert rule is effective.
- email_
subject string - Subject of alert emails.
- escalations object
- The trigger conditions for alert levels. See
escalationsbelow. - interval string
The trigger interval of the alarm rule. Unit: seconds.
NOTE: For information about how to query the statistical period of a metric, see Cloud Service Metrics.
NOTE: This parameter is immutable. Changing it after creation has no effect.
- labels list(object)
When a metric meets the alert condition and an alert is triggered, the labels are written to the metric and displayed in the alert notification.
NOTE: This feature is equivalent to the Label in Prometheus alerts. See
labelsbelow.- no_
data_ stringpolicy - The policy to apply when no monitoring data is available. Valid values:
- KEEP_LAST_STATE (default): No action is taken.
- INSUFFICIENT_DATA: The alert status is set to "Insufficient Data."
- OK: The alert status is set to "OK."
- no_
effective_ stringinterval - The time range during which the alarm rule is inactive.
- period string
The statistical period of the metric. Unit: seconds. By default, this is the original reporting period of the metric.
NOTE: For information about how to query the statistical period of a metric, see Cloud Service Metrics.
- prometheus object
Prometheus alert.
NOTE: You must specify this parameter only when you create a Prometheus alert rule for Enterprise Cloud Monitor. See
prometheusbelow.- send_
ok bool - Specifies whether to send recovery notifications.
- silence_
time string Channel silence period. Unit: seconds. Default value: 86400.
NOTE: The channel silence period specifies how long to wait before resending an alarm notification if the alarm condition has not returned to normal after the initial alarm.
- status bool
- The enabled status of the alarm rule. Valid values:
- true: enabled.
- false: disabled.
- webhook string
- The URL address specified for callback when an alert is triggered. A POST request is sent to this URL.
- contact
Groups String Alarm contact groups. Alarm notifications are sent to the contacts in these groups.
NOTE: An alarm contact group is a collection of one or more alarm contacts. For information about how to create alarm contacts and alarm contact groups, see PutContact and PutContactGroup.
- metric
Alarm StringRule Id The ID of the alarm rule.
You can specify a new alarm rule ID or use an existing alarm rule ID from CloudMonitor. For information about how to query alarm rule IDs, see DescribeMetricRuleList.
NOTE: Specifying a new alarm rule ID creates a threshold-based alarm rule.
- metric
Name String The name of the metric. For information about how to query metric names, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter specifies the metric store name. For information about how to obtain the metric store name, see DescribeHybridMonitorNamespaceList.
- namespace String
The namespace of the cloud service metric data. For information about how to query the namespace of a cloud service, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter must be set to
acsPrometheus.- resources String
- Resource information, for example:
[{"instanceId":"i-uf6j91r34rnwawoo****"}],[{"userId":"100931896542****"}]. For dimensions supported in resource information, see Cloud Service Metrics. - rule
Name String Alert rule name.
You can enter a new alert rule name or use an existing alert rule name in CloudMonitor. For information about how to query alert rule names, see DescribeMetricRuleList.
NOTE: Entering a new alert rule name creates a threshold-based alert rule.
- composite
Expression ServiceMetric Alarm Rule Composite Expression Alert condition for multiple metrics.
NOTE: Single-metric and multi-metric conditions are mutually exclusive and cannot be configured simultaneously. See
compositeExpressionbelow.- effective
Interval String - The time range during which the alert rule is effective.
- email
Subject String - Subject of alert emails.
- escalations
Service
Metric Alarm Rule Escalations - The trigger conditions for alert levels. See
escalationsbelow. - interval String
The trigger interval of the alarm rule. Unit: seconds.
NOTE: For information about how to query the statistical period of a metric, see Cloud Service Metrics.
NOTE: This parameter is immutable. Changing it after creation has no effect.
- labels
List<Service
Metric Alarm Rule Label> When a metric meets the alert condition and an alert is triggered, the labels are written to the metric and displayed in the alert notification.
NOTE: This feature is equivalent to the Label in Prometheus alerts. See
labelsbelow.- no
Data StringPolicy - The policy to apply when no monitoring data is available. Valid values:
- KEEP_LAST_STATE (default): No action is taken.
- INSUFFICIENT_DATA: The alert status is set to "Insufficient Data."
- OK: The alert status is set to "OK."
- no
Effective StringInterval - The time range during which the alarm rule is inactive.
- period String
The statistical period of the metric. Unit: seconds. By default, this is the original reporting period of the metric.
NOTE: For information about how to query the statistical period of a metric, see Cloud Service Metrics.
- prometheus
Service
Metric Alarm Rule Prometheus Prometheus alert.
NOTE: You must specify this parameter only when you create a Prometheus alert rule for Enterprise Cloud Monitor. See
prometheusbelow.- send
Ok Boolean - Specifies whether to send recovery notifications.
- silence
Time String Channel silence period. Unit: seconds. Default value: 86400.
NOTE: The channel silence period specifies how long to wait before resending an alarm notification if the alarm condition has not returned to normal after the initial alarm.
- status Boolean
- The enabled status of the alarm rule. Valid values:
- true: enabled.
- false: disabled.
- webhook String
- The URL address specified for callback when an alert is triggered. A POST request is sent to this URL.
- contact
Groups string Alarm contact groups. Alarm notifications are sent to the contacts in these groups.
NOTE: An alarm contact group is a collection of one or more alarm contacts. For information about how to create alarm contacts and alarm contact groups, see PutContact and PutContactGroup.
- metric
Alarm stringRule Id The ID of the alarm rule.
You can specify a new alarm rule ID or use an existing alarm rule ID from CloudMonitor. For information about how to query alarm rule IDs, see DescribeMetricRuleList.
NOTE: Specifying a new alarm rule ID creates a threshold-based alarm rule.
- metric
Name string The name of the metric. For information about how to query metric names, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter specifies the metric store name. For information about how to obtain the metric store name, see DescribeHybridMonitorNamespaceList.
- namespace string
The namespace of the cloud service metric data. For information about how to query the namespace of a cloud service, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter must be set to
acsPrometheus.- resources string
- Resource information, for example:
[{"instanceId":"i-uf6j91r34rnwawoo****"}],[{"userId":"100931896542****"}]. For dimensions supported in resource information, see Cloud Service Metrics. - rule
Name string Alert rule name.
You can enter a new alert rule name or use an existing alert rule name in CloudMonitor. For information about how to query alert rule names, see DescribeMetricRuleList.
NOTE: Entering a new alert rule name creates a threshold-based alert rule.
- composite
Expression ServiceMetric Alarm Rule Composite Expression Alert condition for multiple metrics.
NOTE: Single-metric and multi-metric conditions are mutually exclusive and cannot be configured simultaneously. See
compositeExpressionbelow.- effective
Interval string - The time range during which the alert rule is effective.
- email
Subject string - Subject of alert emails.
- escalations
Service
Metric Alarm Rule Escalations - The trigger conditions for alert levels. See
escalationsbelow. - interval string
The trigger interval of the alarm rule. Unit: seconds.
NOTE: For information about how to query the statistical period of a metric, see Cloud Service Metrics.
NOTE: This parameter is immutable. Changing it after creation has no effect.
- labels
Service
Metric Alarm Rule Label[] When a metric meets the alert condition and an alert is triggered, the labels are written to the metric and displayed in the alert notification.
NOTE: This feature is equivalent to the Label in Prometheus alerts. See
labelsbelow.- no
Data stringPolicy - The policy to apply when no monitoring data is available. Valid values:
- KEEP_LAST_STATE (default): No action is taken.
- INSUFFICIENT_DATA: The alert status is set to "Insufficient Data."
- OK: The alert status is set to "OK."
- no
Effective stringInterval - The time range during which the alarm rule is inactive.
- period string
The statistical period of the metric. Unit: seconds. By default, this is the original reporting period of the metric.
NOTE: For information about how to query the statistical period of a metric, see Cloud Service Metrics.
- prometheus
Service
Metric Alarm Rule Prometheus Prometheus alert.
NOTE: You must specify this parameter only when you create a Prometheus alert rule for Enterprise Cloud Monitor. See
prometheusbelow.- send
Ok boolean - Specifies whether to send recovery notifications.
- silence
Time string Channel silence period. Unit: seconds. Default value: 86400.
NOTE: The channel silence period specifies how long to wait before resending an alarm notification if the alarm condition has not returned to normal after the initial alarm.
- status boolean
- The enabled status of the alarm rule. Valid values:
- true: enabled.
- false: disabled.
- webhook string
- The URL address specified for callback when an alert is triggered. A POST request is sent to this URL.
- contact_
groups str Alarm contact groups. Alarm notifications are sent to the contacts in these groups.
NOTE: An alarm contact group is a collection of one or more alarm contacts. For information about how to create alarm contacts and alarm contact groups, see PutContact and PutContactGroup.
- metric_
alarm_ strrule_ id The ID of the alarm rule.
You can specify a new alarm rule ID or use an existing alarm rule ID from CloudMonitor. For information about how to query alarm rule IDs, see DescribeMetricRuleList.
NOTE: Specifying a new alarm rule ID creates a threshold-based alarm rule.
- metric_
name str The name of the metric. For information about how to query metric names, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter specifies the metric store name. For information about how to obtain the metric store name, see DescribeHybridMonitorNamespaceList.
- namespace str
The namespace of the cloud service metric data. For information about how to query the namespace of a cloud service, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter must be set to
acsPrometheus.- resources str
- Resource information, for example:
[{"instanceId":"i-uf6j91r34rnwawoo****"}],[{"userId":"100931896542****"}]. For dimensions supported in resource information, see Cloud Service Metrics. - rule_
name str Alert rule name.
You can enter a new alert rule name or use an existing alert rule name in CloudMonitor. For information about how to query alert rule names, see DescribeMetricRuleList.
NOTE: Entering a new alert rule name creates a threshold-based alert rule.
- composite_
expression ServiceMetric Alarm Rule Composite Expression Args Alert condition for multiple metrics.
NOTE: Single-metric and multi-metric conditions are mutually exclusive and cannot be configured simultaneously. See
compositeExpressionbelow.- effective_
interval str - The time range during which the alert rule is effective.
- email_
subject str - Subject of alert emails.
- escalations
Service
Metric Alarm Rule Escalations Args - The trigger conditions for alert levels. See
escalationsbelow. - interval str
The trigger interval of the alarm rule. Unit: seconds.
NOTE: For information about how to query the statistical period of a metric, see Cloud Service Metrics.
NOTE: This parameter is immutable. Changing it after creation has no effect.
- labels
Sequence[Service
Metric Alarm Rule Label Args] When a metric meets the alert condition and an alert is triggered, the labels are written to the metric and displayed in the alert notification.
NOTE: This feature is equivalent to the Label in Prometheus alerts. See
labelsbelow.- no_
data_ strpolicy - The policy to apply when no monitoring data is available. Valid values:
- KEEP_LAST_STATE (default): No action is taken.
- INSUFFICIENT_DATA: The alert status is set to "Insufficient Data."
- OK: The alert status is set to "OK."
- no_
effective_ strinterval - The time range during which the alarm rule is inactive.
- period str
The statistical period of the metric. Unit: seconds. By default, this is the original reporting period of the metric.
NOTE: For information about how to query the statistical period of a metric, see Cloud Service Metrics.
- prometheus
Service
Metric Alarm Rule Prometheus Args Prometheus alert.
NOTE: You must specify this parameter only when you create a Prometheus alert rule for Enterprise Cloud Monitor. See
prometheusbelow.- send_
ok bool - Specifies whether to send recovery notifications.
- silence_
time str Channel silence period. Unit: seconds. Default value: 86400.
NOTE: The channel silence period specifies how long to wait before resending an alarm notification if the alarm condition has not returned to normal after the initial alarm.
- status bool
- The enabled status of the alarm rule. Valid values:
- true: enabled.
- false: disabled.
- webhook str
- The URL address specified for callback when an alert is triggered. A POST request is sent to this URL.
- contact
Groups String Alarm contact groups. Alarm notifications are sent to the contacts in these groups.
NOTE: An alarm contact group is a collection of one or more alarm contacts. For information about how to create alarm contacts and alarm contact groups, see PutContact and PutContactGroup.
- metric
Alarm StringRule Id The ID of the alarm rule.
You can specify a new alarm rule ID or use an existing alarm rule ID from CloudMonitor. For information about how to query alarm rule IDs, see DescribeMetricRuleList.
NOTE: Specifying a new alarm rule ID creates a threshold-based alarm rule.
- metric
Name String The name of the metric. For information about how to query metric names, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter specifies the metric store name. For information about how to obtain the metric store name, see DescribeHybridMonitorNamespaceList.
- namespace String
The namespace of the cloud service metric data. For information about how to query the namespace of a cloud service, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter must be set to
acsPrometheus.- resources String
- Resource information, for example:
[{"instanceId":"i-uf6j91r34rnwawoo****"}],[{"userId":"100931896542****"}]. For dimensions supported in resource information, see Cloud Service Metrics. - rule
Name String Alert rule name.
You can enter a new alert rule name or use an existing alert rule name in CloudMonitor. For information about how to query alert rule names, see DescribeMetricRuleList.
NOTE: Entering a new alert rule name creates a threshold-based alert rule.
- composite
Expression Property Map Alert condition for multiple metrics.
NOTE: Single-metric and multi-metric conditions are mutually exclusive and cannot be configured simultaneously. See
compositeExpressionbelow.- effective
Interval String - The time range during which the alert rule is effective.
- email
Subject String - Subject of alert emails.
- escalations Property Map
- The trigger conditions for alert levels. See
escalationsbelow. - interval String
The trigger interval of the alarm rule. Unit: seconds.
NOTE: For information about how to query the statistical period of a metric, see Cloud Service Metrics.
NOTE: This parameter is immutable. Changing it after creation has no effect.
- labels List<Property Map>
When a metric meets the alert condition and an alert is triggered, the labels are written to the metric and displayed in the alert notification.
NOTE: This feature is equivalent to the Label in Prometheus alerts. See
labelsbelow.- no
Data StringPolicy - The policy to apply when no monitoring data is available. Valid values:
- KEEP_LAST_STATE (default): No action is taken.
- INSUFFICIENT_DATA: The alert status is set to "Insufficient Data."
- OK: The alert status is set to "OK."
- no
Effective StringInterval - The time range during which the alarm rule is inactive.
- period String
The statistical period of the metric. Unit: seconds. By default, this is the original reporting period of the metric.
NOTE: For information about how to query the statistical period of a metric, see Cloud Service Metrics.
- prometheus Property Map
Prometheus alert.
NOTE: You must specify this parameter only when you create a Prometheus alert rule for Enterprise Cloud Monitor. See
prometheusbelow.- send
Ok Boolean - Specifies whether to send recovery notifications.
- silence
Time String Channel silence period. Unit: seconds. Default value: 86400.
NOTE: The channel silence period specifies how long to wait before resending an alarm notification if the alarm condition has not returned to normal after the initial alarm.
- status Boolean
- The enabled status of the alarm rule. Valid values:
- true: enabled.
- false: disabled.
- webhook String
- The URL address specified for callback when an alert is triggered. A POST request is sent to this URL.
Outputs
All input properties are implicitly available as output properties. Additionally, the ServiceMetricAlarmRule resource produces the following output properties:
- Dimensions string
- The monitoring dimensions for the specified resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- Source
Type string - The type of the alarm rule.
- Dimensions string
- The monitoring dimensions for the specified resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- Source
Type string - The type of the alarm rule.
- dimensions string
- The monitoring dimensions for the specified resource.
- id string
- The provider-assigned unique ID for this managed resource.
- source_
type string - The type of the alarm rule.
- dimensions String
- The monitoring dimensions for the specified resource.
- id String
- The provider-assigned unique ID for this managed resource.
- source
Type String - The type of the alarm rule.
- dimensions string
- The monitoring dimensions for the specified resource.
- id string
- The provider-assigned unique ID for this managed resource.
- source
Type string - The type of the alarm rule.
- dimensions str
- The monitoring dimensions for the specified resource.
- id str
- The provider-assigned unique ID for this managed resource.
- source_
type str - The type of the alarm rule.
- dimensions String
- The monitoring dimensions for the specified resource.
- id String
- The provider-assigned unique ID for this managed resource.
- source
Type String - The type of the alarm rule.
Look up Existing ServiceMetricAlarmRule Resource
Get an existing ServiceMetricAlarmRule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ServiceMetricAlarmRuleState, opts?: CustomResourceOptions): ServiceMetricAlarmRule@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
composite_expression: Optional[ServiceMetricAlarmRuleCompositeExpressionArgs] = None,
contact_groups: Optional[str] = None,
dimensions: Optional[str] = None,
effective_interval: Optional[str] = None,
email_subject: Optional[str] = None,
escalations: Optional[ServiceMetricAlarmRuleEscalationsArgs] = None,
interval: Optional[str] = None,
labels: Optional[Sequence[ServiceMetricAlarmRuleLabelArgs]] = None,
metric_alarm_rule_id: Optional[str] = None,
metric_name: Optional[str] = None,
namespace: Optional[str] = None,
no_data_policy: Optional[str] = None,
no_effective_interval: Optional[str] = None,
period: Optional[str] = None,
prometheus: Optional[ServiceMetricAlarmRulePrometheusArgs] = None,
resources: Optional[str] = None,
rule_name: Optional[str] = None,
send_ok: Optional[bool] = None,
silence_time: Optional[str] = None,
source_type: Optional[str] = None,
status: Optional[bool] = None,
webhook: Optional[str] = None) -> ServiceMetricAlarmRulefunc GetServiceMetricAlarmRule(ctx *Context, name string, id IDInput, state *ServiceMetricAlarmRuleState, opts ...ResourceOption) (*ServiceMetricAlarmRule, error)public static ServiceMetricAlarmRule Get(string name, Input<string> id, ServiceMetricAlarmRuleState? state, CustomResourceOptions? opts = null)public static ServiceMetricAlarmRule get(String name, Output<String> id, ServiceMetricAlarmRuleState state, CustomResourceOptions options)resources: _: type: alicloud:cloudmonitor:ServiceMetricAlarmRule get: id: ${id}import {
to = alicloud_cloudmonitor_service_metric_alarm_rule.example
id = "${id}"
}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Composite
Expression Pulumi.Ali Cloud. Cloud Monitor. Inputs. Service Metric Alarm Rule Composite Expression Alert condition for multiple metrics.
NOTE: Single-metric and multi-metric conditions are mutually exclusive and cannot be configured simultaneously. See
compositeExpressionbelow.- Contact
Groups string Alarm contact groups. Alarm notifications are sent to the contacts in these groups.
NOTE: An alarm contact group is a collection of one or more alarm contacts. For information about how to create alarm contacts and alarm contact groups, see PutContact and PutContactGroup.
- Dimensions string
- The monitoring dimensions for the specified resource.
- Effective
Interval string - The time range during which the alert rule is effective.
- Email
Subject string - Subject of alert emails.
- Escalations
Pulumi.
Ali Cloud. Cloud Monitor. Inputs. Service Metric Alarm Rule Escalations - The trigger conditions for alert levels. See
escalationsbelow. - Interval string
The trigger interval of the alarm rule. Unit: seconds.
NOTE: For information about how to query the statistical period of a metric, see Cloud Service Metrics.
NOTE: This parameter is immutable. Changing it after creation has no effect.
- Labels
List<Pulumi.
Ali Cloud. Cloud Monitor. Inputs. Service Metric Alarm Rule Label> When a metric meets the alert condition and an alert is triggered, the labels are written to the metric and displayed in the alert notification.
NOTE: This feature is equivalent to the Label in Prometheus alerts. See
labelsbelow.- Metric
Alarm stringRule Id The ID of the alarm rule.
You can specify a new alarm rule ID or use an existing alarm rule ID from CloudMonitor. For information about how to query alarm rule IDs, see DescribeMetricRuleList.
NOTE: Specifying a new alarm rule ID creates a threshold-based alarm rule.
- Metric
Name string The name of the metric. For information about how to query metric names, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter specifies the metric store name. For information about how to obtain the metric store name, see DescribeHybridMonitorNamespaceList.
- Namespace string
The namespace of the cloud service metric data. For information about how to query the namespace of a cloud service, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter must be set to
acsPrometheus.- No
Data stringPolicy - The policy to apply when no monitoring data is available. Valid values:
- KEEP_LAST_STATE (default): No action is taken.
- INSUFFICIENT_DATA: The alert status is set to "Insufficient Data."
- OK: The alert status is set to "OK."
- No
Effective stringInterval - The time range during which the alarm rule is inactive.
- Period string
The statistical period of the metric. Unit: seconds. By default, this is the original reporting period of the metric.
NOTE: For information about how to query the statistical period of a metric, see Cloud Service Metrics.
- Prometheus
Pulumi.
Ali Cloud. Cloud Monitor. Inputs. Service Metric Alarm Rule Prometheus Prometheus alert.
NOTE: You must specify this parameter only when you create a Prometheus alert rule for Enterprise Cloud Monitor. See
prometheusbelow.- Resources string
- Resource information, for example:
[{"instanceId":"i-uf6j91r34rnwawoo****"}],[{"userId":"100931896542****"}]. For dimensions supported in resource information, see Cloud Service Metrics. - Rule
Name string Alert rule name.
You can enter a new alert rule name or use an existing alert rule name in CloudMonitor. For information about how to query alert rule names, see DescribeMetricRuleList.
NOTE: Entering a new alert rule name creates a threshold-based alert rule.
- Send
Ok bool - Specifies whether to send recovery notifications.
- Silence
Time string Channel silence period. Unit: seconds. Default value: 86400.
NOTE: The channel silence period specifies how long to wait before resending an alarm notification if the alarm condition has not returned to normal after the initial alarm.
- Source
Type string - The type of the alarm rule.
- Status bool
- The enabled status of the alarm rule. Valid values:
- true: enabled.
- false: disabled.
- Webhook string
- The URL address specified for callback when an alert is triggered. A POST request is sent to this URL.
- Composite
Expression ServiceMetric Alarm Rule Composite Expression Args Alert condition for multiple metrics.
NOTE: Single-metric and multi-metric conditions are mutually exclusive and cannot be configured simultaneously. See
compositeExpressionbelow.- Contact
Groups string Alarm contact groups. Alarm notifications are sent to the contacts in these groups.
NOTE: An alarm contact group is a collection of one or more alarm contacts. For information about how to create alarm contacts and alarm contact groups, see PutContact and PutContactGroup.
- Dimensions string
- The monitoring dimensions for the specified resource.
- Effective
Interval string - The time range during which the alert rule is effective.
- Email
Subject string - Subject of alert emails.
- Escalations
Service
Metric Alarm Rule Escalations Args - The trigger conditions for alert levels. See
escalationsbelow. - Interval string
The trigger interval of the alarm rule. Unit: seconds.
NOTE: For information about how to query the statistical period of a metric, see Cloud Service Metrics.
NOTE: This parameter is immutable. Changing it after creation has no effect.
- Labels
[]Service
Metric Alarm Rule Label Args When a metric meets the alert condition and an alert is triggered, the labels are written to the metric and displayed in the alert notification.
NOTE: This feature is equivalent to the Label in Prometheus alerts. See
labelsbelow.- Metric
Alarm stringRule Id The ID of the alarm rule.
You can specify a new alarm rule ID or use an existing alarm rule ID from CloudMonitor. For information about how to query alarm rule IDs, see DescribeMetricRuleList.
NOTE: Specifying a new alarm rule ID creates a threshold-based alarm rule.
- Metric
Name string The name of the metric. For information about how to query metric names, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter specifies the metric store name. For information about how to obtain the metric store name, see DescribeHybridMonitorNamespaceList.
- Namespace string
The namespace of the cloud service metric data. For information about how to query the namespace of a cloud service, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter must be set to
acsPrometheus.- No
Data stringPolicy - The policy to apply when no monitoring data is available. Valid values:
- KEEP_LAST_STATE (default): No action is taken.
- INSUFFICIENT_DATA: The alert status is set to "Insufficient Data."
- OK: The alert status is set to "OK."
- No
Effective stringInterval - The time range during which the alarm rule is inactive.
- Period string
The statistical period of the metric. Unit: seconds. By default, this is the original reporting period of the metric.
NOTE: For information about how to query the statistical period of a metric, see Cloud Service Metrics.
- Prometheus
Service
Metric Alarm Rule Prometheus Args Prometheus alert.
NOTE: You must specify this parameter only when you create a Prometheus alert rule for Enterprise Cloud Monitor. See
prometheusbelow.- Resources string
- Resource information, for example:
[{"instanceId":"i-uf6j91r34rnwawoo****"}],[{"userId":"100931896542****"}]. For dimensions supported in resource information, see Cloud Service Metrics. - Rule
Name string Alert rule name.
You can enter a new alert rule name or use an existing alert rule name in CloudMonitor. For information about how to query alert rule names, see DescribeMetricRuleList.
NOTE: Entering a new alert rule name creates a threshold-based alert rule.
- Send
Ok bool - Specifies whether to send recovery notifications.
- Silence
Time string Channel silence period. Unit: seconds. Default value: 86400.
NOTE: The channel silence period specifies how long to wait before resending an alarm notification if the alarm condition has not returned to normal after the initial alarm.
- Source
Type string - The type of the alarm rule.
- Status bool
- The enabled status of the alarm rule. Valid values:
- true: enabled.
- false: disabled.
- Webhook string
- The URL address specified for callback when an alert is triggered. A POST request is sent to this URL.
- composite_
expression object Alert condition for multiple metrics.
NOTE: Single-metric and multi-metric conditions are mutually exclusive and cannot be configured simultaneously. See
compositeExpressionbelow.- contact_
groups string Alarm contact groups. Alarm notifications are sent to the contacts in these groups.
NOTE: An alarm contact group is a collection of one or more alarm contacts. For information about how to create alarm contacts and alarm contact groups, see PutContact and PutContactGroup.
- dimensions string
- The monitoring dimensions for the specified resource.
- effective_
interval string - The time range during which the alert rule is effective.
- email_
subject string - Subject of alert emails.
- escalations object
- The trigger conditions for alert levels. See
escalationsbelow. - interval string
The trigger interval of the alarm rule. Unit: seconds.
NOTE: For information about how to query the statistical period of a metric, see Cloud Service Metrics.
NOTE: This parameter is immutable. Changing it after creation has no effect.
- labels list(object)
When a metric meets the alert condition and an alert is triggered, the labels are written to the metric and displayed in the alert notification.
NOTE: This feature is equivalent to the Label in Prometheus alerts. See
labelsbelow.- metric_
alarm_ stringrule_ id The ID of the alarm rule.
You can specify a new alarm rule ID or use an existing alarm rule ID from CloudMonitor. For information about how to query alarm rule IDs, see DescribeMetricRuleList.
NOTE: Specifying a new alarm rule ID creates a threshold-based alarm rule.
- metric_
name string The name of the metric. For information about how to query metric names, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter specifies the metric store name. For information about how to obtain the metric store name, see DescribeHybridMonitorNamespaceList.
- namespace string
The namespace of the cloud service metric data. For information about how to query the namespace of a cloud service, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter must be set to
acsPrometheus.- no_
data_ stringpolicy - The policy to apply when no monitoring data is available. Valid values:
- KEEP_LAST_STATE (default): No action is taken.
- INSUFFICIENT_DATA: The alert status is set to "Insufficient Data."
- OK: The alert status is set to "OK."
- no_
effective_ stringinterval - The time range during which the alarm rule is inactive.
- period string
The statistical period of the metric. Unit: seconds. By default, this is the original reporting period of the metric.
NOTE: For information about how to query the statistical period of a metric, see Cloud Service Metrics.
- prometheus object
Prometheus alert.
NOTE: You must specify this parameter only when you create a Prometheus alert rule for Enterprise Cloud Monitor. See
prometheusbelow.- resources string
- Resource information, for example:
[{"instanceId":"i-uf6j91r34rnwawoo****"}],[{"userId":"100931896542****"}]. For dimensions supported in resource information, see Cloud Service Metrics. - rule_
name string Alert rule name.
You can enter a new alert rule name or use an existing alert rule name in CloudMonitor. For information about how to query alert rule names, see DescribeMetricRuleList.
NOTE: Entering a new alert rule name creates a threshold-based alert rule.
- send_
ok bool - Specifies whether to send recovery notifications.
- silence_
time string Channel silence period. Unit: seconds. Default value: 86400.
NOTE: The channel silence period specifies how long to wait before resending an alarm notification if the alarm condition has not returned to normal after the initial alarm.
- source_
type string - The type of the alarm rule.
- status bool
- The enabled status of the alarm rule. Valid values:
- true: enabled.
- false: disabled.
- webhook string
- The URL address specified for callback when an alert is triggered. A POST request is sent to this URL.
- composite
Expression ServiceMetric Alarm Rule Composite Expression Alert condition for multiple metrics.
NOTE: Single-metric and multi-metric conditions are mutually exclusive and cannot be configured simultaneously. See
compositeExpressionbelow.- contact
Groups String Alarm contact groups. Alarm notifications are sent to the contacts in these groups.
NOTE: An alarm contact group is a collection of one or more alarm contacts. For information about how to create alarm contacts and alarm contact groups, see PutContact and PutContactGroup.
- dimensions String
- The monitoring dimensions for the specified resource.
- effective
Interval String - The time range during which the alert rule is effective.
- email
Subject String - Subject of alert emails.
- escalations
Service
Metric Alarm Rule Escalations - The trigger conditions for alert levels. See
escalationsbelow. - interval String
The trigger interval of the alarm rule. Unit: seconds.
NOTE: For information about how to query the statistical period of a metric, see Cloud Service Metrics.
NOTE: This parameter is immutable. Changing it after creation has no effect.
- labels
List<Service
Metric Alarm Rule Label> When a metric meets the alert condition and an alert is triggered, the labels are written to the metric and displayed in the alert notification.
NOTE: This feature is equivalent to the Label in Prometheus alerts. See
labelsbelow.- metric
Alarm StringRule Id The ID of the alarm rule.
You can specify a new alarm rule ID or use an existing alarm rule ID from CloudMonitor. For information about how to query alarm rule IDs, see DescribeMetricRuleList.
NOTE: Specifying a new alarm rule ID creates a threshold-based alarm rule.
- metric
Name String The name of the metric. For information about how to query metric names, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter specifies the metric store name. For information about how to obtain the metric store name, see DescribeHybridMonitorNamespaceList.
- namespace String
The namespace of the cloud service metric data. For information about how to query the namespace of a cloud service, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter must be set to
acsPrometheus.- no
Data StringPolicy - The policy to apply when no monitoring data is available. Valid values:
- KEEP_LAST_STATE (default): No action is taken.
- INSUFFICIENT_DATA: The alert status is set to "Insufficient Data."
- OK: The alert status is set to "OK."
- no
Effective StringInterval - The time range during which the alarm rule is inactive.
- period String
The statistical period of the metric. Unit: seconds. By default, this is the original reporting period of the metric.
NOTE: For information about how to query the statistical period of a metric, see Cloud Service Metrics.
- prometheus
Service
Metric Alarm Rule Prometheus Prometheus alert.
NOTE: You must specify this parameter only when you create a Prometheus alert rule for Enterprise Cloud Monitor. See
prometheusbelow.- resources String
- Resource information, for example:
[{"instanceId":"i-uf6j91r34rnwawoo****"}],[{"userId":"100931896542****"}]. For dimensions supported in resource information, see Cloud Service Metrics. - rule
Name String Alert rule name.
You can enter a new alert rule name or use an existing alert rule name in CloudMonitor. For information about how to query alert rule names, see DescribeMetricRuleList.
NOTE: Entering a new alert rule name creates a threshold-based alert rule.
- send
Ok Boolean - Specifies whether to send recovery notifications.
- silence
Time String Channel silence period. Unit: seconds. Default value: 86400.
NOTE: The channel silence period specifies how long to wait before resending an alarm notification if the alarm condition has not returned to normal after the initial alarm.
- source
Type String - The type of the alarm rule.
- status Boolean
- The enabled status of the alarm rule. Valid values:
- true: enabled.
- false: disabled.
- webhook String
- The URL address specified for callback when an alert is triggered. A POST request is sent to this URL.
- composite
Expression ServiceMetric Alarm Rule Composite Expression Alert condition for multiple metrics.
NOTE: Single-metric and multi-metric conditions are mutually exclusive and cannot be configured simultaneously. See
compositeExpressionbelow.- contact
Groups string Alarm contact groups. Alarm notifications are sent to the contacts in these groups.
NOTE: An alarm contact group is a collection of one or more alarm contacts. For information about how to create alarm contacts and alarm contact groups, see PutContact and PutContactGroup.
- dimensions string
- The monitoring dimensions for the specified resource.
- effective
Interval string - The time range during which the alert rule is effective.
- email
Subject string - Subject of alert emails.
- escalations
Service
Metric Alarm Rule Escalations - The trigger conditions for alert levels. See
escalationsbelow. - interval string
The trigger interval of the alarm rule. Unit: seconds.
NOTE: For information about how to query the statistical period of a metric, see Cloud Service Metrics.
NOTE: This parameter is immutable. Changing it after creation has no effect.
- labels
Service
Metric Alarm Rule Label[] When a metric meets the alert condition and an alert is triggered, the labels are written to the metric and displayed in the alert notification.
NOTE: This feature is equivalent to the Label in Prometheus alerts. See
labelsbelow.- metric
Alarm stringRule Id The ID of the alarm rule.
You can specify a new alarm rule ID or use an existing alarm rule ID from CloudMonitor. For information about how to query alarm rule IDs, see DescribeMetricRuleList.
NOTE: Specifying a new alarm rule ID creates a threshold-based alarm rule.
- metric
Name string The name of the metric. For information about how to query metric names, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter specifies the metric store name. For information about how to obtain the metric store name, see DescribeHybridMonitorNamespaceList.
- namespace string
The namespace of the cloud service metric data. For information about how to query the namespace of a cloud service, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter must be set to
acsPrometheus.- no
Data stringPolicy - The policy to apply when no monitoring data is available. Valid values:
- KEEP_LAST_STATE (default): No action is taken.
- INSUFFICIENT_DATA: The alert status is set to "Insufficient Data."
- OK: The alert status is set to "OK."
- no
Effective stringInterval - The time range during which the alarm rule is inactive.
- period string
The statistical period of the metric. Unit: seconds. By default, this is the original reporting period of the metric.
NOTE: For information about how to query the statistical period of a metric, see Cloud Service Metrics.
- prometheus
Service
Metric Alarm Rule Prometheus Prometheus alert.
NOTE: You must specify this parameter only when you create a Prometheus alert rule for Enterprise Cloud Monitor. See
prometheusbelow.- resources string
- Resource information, for example:
[{"instanceId":"i-uf6j91r34rnwawoo****"}],[{"userId":"100931896542****"}]. For dimensions supported in resource information, see Cloud Service Metrics. - rule
Name string Alert rule name.
You can enter a new alert rule name or use an existing alert rule name in CloudMonitor. For information about how to query alert rule names, see DescribeMetricRuleList.
NOTE: Entering a new alert rule name creates a threshold-based alert rule.
- send
Ok boolean - Specifies whether to send recovery notifications.
- silence
Time string Channel silence period. Unit: seconds. Default value: 86400.
NOTE: The channel silence period specifies how long to wait before resending an alarm notification if the alarm condition has not returned to normal after the initial alarm.
- source
Type string - The type of the alarm rule.
- status boolean
- The enabled status of the alarm rule. Valid values:
- true: enabled.
- false: disabled.
- webhook string
- The URL address specified for callback when an alert is triggered. A POST request is sent to this URL.
- composite_
expression ServiceMetric Alarm Rule Composite Expression Args Alert condition for multiple metrics.
NOTE: Single-metric and multi-metric conditions are mutually exclusive and cannot be configured simultaneously. See
compositeExpressionbelow.- contact_
groups str Alarm contact groups. Alarm notifications are sent to the contacts in these groups.
NOTE: An alarm contact group is a collection of one or more alarm contacts. For information about how to create alarm contacts and alarm contact groups, see PutContact and PutContactGroup.
- dimensions str
- The monitoring dimensions for the specified resource.
- effective_
interval str - The time range during which the alert rule is effective.
- email_
subject str - Subject of alert emails.
- escalations
Service
Metric Alarm Rule Escalations Args - The trigger conditions for alert levels. See
escalationsbelow. - interval str
The trigger interval of the alarm rule. Unit: seconds.
NOTE: For information about how to query the statistical period of a metric, see Cloud Service Metrics.
NOTE: This parameter is immutable. Changing it after creation has no effect.
- labels
Sequence[Service
Metric Alarm Rule Label Args] When a metric meets the alert condition and an alert is triggered, the labels are written to the metric and displayed in the alert notification.
NOTE: This feature is equivalent to the Label in Prometheus alerts. See
labelsbelow.- metric_
alarm_ strrule_ id The ID of the alarm rule.
You can specify a new alarm rule ID or use an existing alarm rule ID from CloudMonitor. For information about how to query alarm rule IDs, see DescribeMetricRuleList.
NOTE: Specifying a new alarm rule ID creates a threshold-based alarm rule.
- metric_
name str The name of the metric. For information about how to query metric names, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter specifies the metric store name. For information about how to obtain the metric store name, see DescribeHybridMonitorNamespaceList.
- namespace str
The namespace of the cloud service metric data. For information about how to query the namespace of a cloud service, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter must be set to
acsPrometheus.- no_
data_ strpolicy - The policy to apply when no monitoring data is available. Valid values:
- KEEP_LAST_STATE (default): No action is taken.
- INSUFFICIENT_DATA: The alert status is set to "Insufficient Data."
- OK: The alert status is set to "OK."
- no_
effective_ strinterval - The time range during which the alarm rule is inactive.
- period str
The statistical period of the metric. Unit: seconds. By default, this is the original reporting period of the metric.
NOTE: For information about how to query the statistical period of a metric, see Cloud Service Metrics.
- prometheus
Service
Metric Alarm Rule Prometheus Args Prometheus alert.
NOTE: You must specify this parameter only when you create a Prometheus alert rule for Enterprise Cloud Monitor. See
prometheusbelow.- resources str
- Resource information, for example:
[{"instanceId":"i-uf6j91r34rnwawoo****"}],[{"userId":"100931896542****"}]. For dimensions supported in resource information, see Cloud Service Metrics. - rule_
name str Alert rule name.
You can enter a new alert rule name or use an existing alert rule name in CloudMonitor. For information about how to query alert rule names, see DescribeMetricRuleList.
NOTE: Entering a new alert rule name creates a threshold-based alert rule.
- send_
ok bool - Specifies whether to send recovery notifications.
- silence_
time str Channel silence period. Unit: seconds. Default value: 86400.
NOTE: The channel silence period specifies how long to wait before resending an alarm notification if the alarm condition has not returned to normal after the initial alarm.
- source_
type str - The type of the alarm rule.
- status bool
- The enabled status of the alarm rule. Valid values:
- true: enabled.
- false: disabled.
- webhook str
- The URL address specified for callback when an alert is triggered. A POST request is sent to this URL.
- composite
Expression Property Map Alert condition for multiple metrics.
NOTE: Single-metric and multi-metric conditions are mutually exclusive and cannot be configured simultaneously. See
compositeExpressionbelow.- contact
Groups String Alarm contact groups. Alarm notifications are sent to the contacts in these groups.
NOTE: An alarm contact group is a collection of one or more alarm contacts. For information about how to create alarm contacts and alarm contact groups, see PutContact and PutContactGroup.
- dimensions String
- The monitoring dimensions for the specified resource.
- effective
Interval String - The time range during which the alert rule is effective.
- email
Subject String - Subject of alert emails.
- escalations Property Map
- The trigger conditions for alert levels. See
escalationsbelow. - interval String
The trigger interval of the alarm rule. Unit: seconds.
NOTE: For information about how to query the statistical period of a metric, see Cloud Service Metrics.
NOTE: This parameter is immutable. Changing it after creation has no effect.
- labels List<Property Map>
When a metric meets the alert condition and an alert is triggered, the labels are written to the metric and displayed in the alert notification.
NOTE: This feature is equivalent to the Label in Prometheus alerts. See
labelsbelow.- metric
Alarm StringRule Id The ID of the alarm rule.
You can specify a new alarm rule ID or use an existing alarm rule ID from CloudMonitor. For information about how to query alarm rule IDs, see DescribeMetricRuleList.
NOTE: Specifying a new alarm rule ID creates a threshold-based alarm rule.
- metric
Name String The name of the metric. For information about how to query metric names, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter specifies the metric store name. For information about how to obtain the metric store name, see DescribeHybridMonitorNamespaceList.
- namespace String
The namespace of the cloud service metric data. For information about how to query the namespace of a cloud service, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter must be set to
acsPrometheus.- no
Data StringPolicy - The policy to apply when no monitoring data is available. Valid values:
- KEEP_LAST_STATE (default): No action is taken.
- INSUFFICIENT_DATA: The alert status is set to "Insufficient Data."
- OK: The alert status is set to "OK."
- no
Effective StringInterval - The time range during which the alarm rule is inactive.
- period String
The statistical period of the metric. Unit: seconds. By default, this is the original reporting period of the metric.
NOTE: For information about how to query the statistical period of a metric, see Cloud Service Metrics.
- prometheus Property Map
Prometheus alert.
NOTE: You must specify this parameter only when you create a Prometheus alert rule for Enterprise Cloud Monitor. See
prometheusbelow.- resources String
- Resource information, for example:
[{"instanceId":"i-uf6j91r34rnwawoo****"}],[{"userId":"100931896542****"}]. For dimensions supported in resource information, see Cloud Service Metrics. - rule
Name String Alert rule name.
You can enter a new alert rule name or use an existing alert rule name in CloudMonitor. For information about how to query alert rule names, see DescribeMetricRuleList.
NOTE: Entering a new alert rule name creates a threshold-based alert rule.
- send
Ok Boolean - Specifies whether to send recovery notifications.
- silence
Time String Channel silence period. Unit: seconds. Default value: 86400.
NOTE: The channel silence period specifies how long to wait before resending an alarm notification if the alarm condition has not returned to normal after the initial alarm.
- source
Type String - The type of the alarm rule.
- status Boolean
- The enabled status of the alarm rule. Valid values:
- true: enabled.
- false: disabled.
- webhook String
- The URL address specified for callback when an alert is triggered. A POST request is sent to this URL.
Supporting Types
ServiceMetricAlarmRuleCompositeExpression, ServiceMetricAlarmRuleCompositeExpressionArgs
- Expression
List stringJoin - The logical relationship between multiple metric-based alert conditions. Valid values:
&&: An alert is triggered only when all metrics meet their respective alert conditions. That is, an alert is triggered only when every expression in ExpressionList evaluates totrue.||: An alert is triggered as soon as any one metric meets its alert condition.
- Expression
Lists List<Pulumi.Ali Cloud. Cloud Monitor. Inputs. Service Metric Alarm Rule Composite Expression Expression List> - A list of alert conditions created using standard expressions. See
expressionListbelow. - Expression
Raw string - The alert condition created by an expression. This includes, but is not limited to, the following scenarios:
- Configure an alert blacklist for specific resources. For example:
$instanceId != 'i-io8kfvcpp7x5****' && $Average > 50means that even if theAveragemetric of instancei-io8kfvcpp7x5****in the alert rule exceeds 50, no alert will be triggered. - Set a special alert threshold for a specified instance in the rule. For example:
$Average > ($instanceId == 'i-io8kfvcpp7x5****' ? 80 : 50)means that an alert is triggered only when theAveragemetric of instancei-io8kfvcpp7x5****exceeds 80, while for other instances, an alert is triggered when theirAverageexceeds 50. - Limit the number of instances exceeding the threshold in the rule. For example:
count($Average > 20) > 3means that an alert is triggered only when more than three instances in the alert rule have anAveragemetric greater than 20.
- Configure an alert blacklist for specific resources. For example:
- Level string
- The alert severity level. Valid values:
- CRITICAL: Critical.
- WARN: Warning.
- INFO: Information.
- Times int
- Number of consecutive times the alert condition must be met before an alert notification is sent.
- Expression
List stringJoin - The logical relationship between multiple metric-based alert conditions. Valid values:
&&: An alert is triggered only when all metrics meet their respective alert conditions. That is, an alert is triggered only when every expression in ExpressionList evaluates totrue.||: An alert is triggered as soon as any one metric meets its alert condition.
- Expression
Lists []ServiceMetric Alarm Rule Composite Expression Expression List - A list of alert conditions created using standard expressions. See
expressionListbelow. - Expression
Raw string - The alert condition created by an expression. This includes, but is not limited to, the following scenarios:
- Configure an alert blacklist for specific resources. For example:
$instanceId != 'i-io8kfvcpp7x5****' && $Average > 50means that even if theAveragemetric of instancei-io8kfvcpp7x5****in the alert rule exceeds 50, no alert will be triggered. - Set a special alert threshold for a specified instance in the rule. For example:
$Average > ($instanceId == 'i-io8kfvcpp7x5****' ? 80 : 50)means that an alert is triggered only when theAveragemetric of instancei-io8kfvcpp7x5****exceeds 80, while for other instances, an alert is triggered when theirAverageexceeds 50. - Limit the number of instances exceeding the threshold in the rule. For example:
count($Average > 20) > 3means that an alert is triggered only when more than three instances in the alert rule have anAveragemetric greater than 20.
- Configure an alert blacklist for specific resources. For example:
- Level string
- The alert severity level. Valid values:
- CRITICAL: Critical.
- WARN: Warning.
- INFO: Information.
- Times int
- Number of consecutive times the alert condition must be met before an alert notification is sent.
- expression_
list_ stringjoin - The logical relationship between multiple metric-based alert conditions. Valid values:
&&: An alert is triggered only when all metrics meet their respective alert conditions. That is, an alert is triggered only when every expression in ExpressionList evaluates totrue.||: An alert is triggered as soon as any one metric meets its alert condition.
- expression_
lists list(object) - A list of alert conditions created using standard expressions. See
expressionListbelow. - expression_
raw string - The alert condition created by an expression. This includes, but is not limited to, the following scenarios:
- Configure an alert blacklist for specific resources. For example:
$instanceId != 'i-io8kfvcpp7x5****' && $Average > 50means that even if theAveragemetric of instancei-io8kfvcpp7x5****in the alert rule exceeds 50, no alert will be triggered. - Set a special alert threshold for a specified instance in the rule. For example:
$Average > ($instanceId == 'i-io8kfvcpp7x5****' ? 80 : 50)means that an alert is triggered only when theAveragemetric of instancei-io8kfvcpp7x5****exceeds 80, while for other instances, an alert is triggered when theirAverageexceeds 50. - Limit the number of instances exceeding the threshold in the rule. For example:
count($Average > 20) > 3means that an alert is triggered only when more than three instances in the alert rule have anAveragemetric greater than 20.
- Configure an alert blacklist for specific resources. For example:
- level string
- The alert severity level. Valid values:
- CRITICAL: Critical.
- WARN: Warning.
- INFO: Information.
- times number
- Number of consecutive times the alert condition must be met before an alert notification is sent.
- expression
List StringJoin - The logical relationship between multiple metric-based alert conditions. Valid values:
&&: An alert is triggered only when all metrics meet their respective alert conditions. That is, an alert is triggered only when every expression in ExpressionList evaluates totrue.||: An alert is triggered as soon as any one metric meets its alert condition.
- expression
Lists List<ServiceMetric Alarm Rule Composite Expression Expression List> - A list of alert conditions created using standard expressions. See
expressionListbelow. - expression
Raw String - The alert condition created by an expression. This includes, but is not limited to, the following scenarios:
- Configure an alert blacklist for specific resources. For example:
$instanceId != 'i-io8kfvcpp7x5****' && $Average > 50means that even if theAveragemetric of instancei-io8kfvcpp7x5****in the alert rule exceeds 50, no alert will be triggered. - Set a special alert threshold for a specified instance in the rule. For example:
$Average > ($instanceId == 'i-io8kfvcpp7x5****' ? 80 : 50)means that an alert is triggered only when theAveragemetric of instancei-io8kfvcpp7x5****exceeds 80, while for other instances, an alert is triggered when theirAverageexceeds 50. - Limit the number of instances exceeding the threshold in the rule. For example:
count($Average > 20) > 3means that an alert is triggered only when more than three instances in the alert rule have anAveragemetric greater than 20.
- Configure an alert blacklist for specific resources. For example:
- level String
- The alert severity level. Valid values:
- CRITICAL: Critical.
- WARN: Warning.
- INFO: Information.
- times Integer
- Number of consecutive times the alert condition must be met before an alert notification is sent.
- expression
List stringJoin - The logical relationship between multiple metric-based alert conditions. Valid values:
&&: An alert is triggered only when all metrics meet their respective alert conditions. That is, an alert is triggered only when every expression in ExpressionList evaluates totrue.||: An alert is triggered as soon as any one metric meets its alert condition.
- expression
Lists ServiceMetric Alarm Rule Composite Expression Expression List[] - A list of alert conditions created using standard expressions. See
expressionListbelow. - expression
Raw string - The alert condition created by an expression. This includes, but is not limited to, the following scenarios:
- Configure an alert blacklist for specific resources. For example:
$instanceId != 'i-io8kfvcpp7x5****' && $Average > 50means that even if theAveragemetric of instancei-io8kfvcpp7x5****in the alert rule exceeds 50, no alert will be triggered. - Set a special alert threshold for a specified instance in the rule. For example:
$Average > ($instanceId == 'i-io8kfvcpp7x5****' ? 80 : 50)means that an alert is triggered only when theAveragemetric of instancei-io8kfvcpp7x5****exceeds 80, while for other instances, an alert is triggered when theirAverageexceeds 50. - Limit the number of instances exceeding the threshold in the rule. For example:
count($Average > 20) > 3means that an alert is triggered only when more than three instances in the alert rule have anAveragemetric greater than 20.
- Configure an alert blacklist for specific resources. For example:
- level string
- The alert severity level. Valid values:
- CRITICAL: Critical.
- WARN: Warning.
- INFO: Information.
- times number
- Number of consecutive times the alert condition must be met before an alert notification is sent.
- expression_
list_ strjoin - The logical relationship between multiple metric-based alert conditions. Valid values:
&&: An alert is triggered only when all metrics meet their respective alert conditions. That is, an alert is triggered only when every expression in ExpressionList evaluates totrue.||: An alert is triggered as soon as any one metric meets its alert condition.
- expression_
lists Sequence[ServiceMetric Alarm Rule Composite Expression Expression List] - A list of alert conditions created using standard expressions. See
expressionListbelow. - expression_
raw str - The alert condition created by an expression. This includes, but is not limited to, the following scenarios:
- Configure an alert blacklist for specific resources. For example:
$instanceId != 'i-io8kfvcpp7x5****' && $Average > 50means that even if theAveragemetric of instancei-io8kfvcpp7x5****in the alert rule exceeds 50, no alert will be triggered. - Set a special alert threshold for a specified instance in the rule. For example:
$Average > ($instanceId == 'i-io8kfvcpp7x5****' ? 80 : 50)means that an alert is triggered only when theAveragemetric of instancei-io8kfvcpp7x5****exceeds 80, while for other instances, an alert is triggered when theirAverageexceeds 50. - Limit the number of instances exceeding the threshold in the rule. For example:
count($Average > 20) > 3means that an alert is triggered only when more than three instances in the alert rule have anAveragemetric greater than 20.
- Configure an alert blacklist for specific resources. For example:
- level str
- The alert severity level. Valid values:
- CRITICAL: Critical.
- WARN: Warning.
- INFO: Information.
- times int
- Number of consecutive times the alert condition must be met before an alert notification is sent.
- expression
List StringJoin - The logical relationship between multiple metric-based alert conditions. Valid values:
&&: An alert is triggered only when all metrics meet their respective alert conditions. That is, an alert is triggered only when every expression in ExpressionList evaluates totrue.||: An alert is triggered as soon as any one metric meets its alert condition.
- expression
Lists List<Property Map> - A list of alert conditions created using standard expressions. See
expressionListbelow. - expression
Raw String - The alert condition created by an expression. This includes, but is not limited to, the following scenarios:
- Configure an alert blacklist for specific resources. For example:
$instanceId != 'i-io8kfvcpp7x5****' && $Average > 50means that even if theAveragemetric of instancei-io8kfvcpp7x5****in the alert rule exceeds 50, no alert will be triggered. - Set a special alert threshold for a specified instance in the rule. For example:
$Average > ($instanceId == 'i-io8kfvcpp7x5****' ? 80 : 50)means that an alert is triggered only when theAveragemetric of instancei-io8kfvcpp7x5****exceeds 80, while for other instances, an alert is triggered when theirAverageexceeds 50. - Limit the number of instances exceeding the threshold in the rule. For example:
count($Average > 20) > 3means that an alert is triggered only when more than three instances in the alert rule have anAveragemetric greater than 20.
- Configure an alert blacklist for specific resources. For example:
- level String
- The alert severity level. Valid values:
- CRITICAL: Critical.
- WARN: Warning.
- INFO: Information.
- times Number
- Number of consecutive times the alert condition must be met before an alert notification is sent.
ServiceMetricAlarmRuleCompositeExpressionExpressionList, ServiceMetricAlarmRuleCompositeExpressionExpressionListArgs
- Comparison
Operator string - Metric
Name string The name of the metric. For information about how to query metric names, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter specifies the metric store name. For information about how to obtain the metric store name, see DescribeHybridMonitorNamespaceList.
- Period int
The statistical period of the metric. Unit: seconds. By default, this is the original reporting period of the metric.
NOTE: For information about how to query the statistical period of a metric, see Cloud Service Metrics.
- Statistics string
- Threshold string
- Comparison
Operator string - Metric
Name string The name of the metric. For information about how to query metric names, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter specifies the metric store name. For information about how to obtain the metric store name, see DescribeHybridMonitorNamespaceList.
- Period int
The statistical period of the metric. Unit: seconds. By default, this is the original reporting period of the metric.
NOTE: For information about how to query the statistical period of a metric, see Cloud Service Metrics.
- Statistics string
- Threshold string
- comparison_
operator string - metric_
name string The name of the metric. For information about how to query metric names, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter specifies the metric store name. For information about how to obtain the metric store name, see DescribeHybridMonitorNamespaceList.
- period number
The statistical period of the metric. Unit: seconds. By default, this is the original reporting period of the metric.
NOTE: For information about how to query the statistical period of a metric, see Cloud Service Metrics.
- statistics string
- threshold string
- comparison
Operator String - metric
Name String The name of the metric. For information about how to query metric names, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter specifies the metric store name. For information about how to obtain the metric store name, see DescribeHybridMonitorNamespaceList.
- period Integer
The statistical period of the metric. Unit: seconds. By default, this is the original reporting period of the metric.
NOTE: For information about how to query the statistical period of a metric, see Cloud Service Metrics.
- statistics String
- threshold String
- comparison
Operator string - metric
Name string The name of the metric. For information about how to query metric names, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter specifies the metric store name. For information about how to obtain the metric store name, see DescribeHybridMonitorNamespaceList.
- period number
The statistical period of the metric. Unit: seconds. By default, this is the original reporting period of the metric.
NOTE: For information about how to query the statistical period of a metric, see Cloud Service Metrics.
- statistics string
- threshold string
- comparison_
operator str - metric_
name str The name of the metric. For information about how to query metric names, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter specifies the metric store name. For information about how to obtain the metric store name, see DescribeHybridMonitorNamespaceList.
- period int
The statistical period of the metric. Unit: seconds. By default, this is the original reporting period of the metric.
NOTE: For information about how to query the statistical period of a metric, see Cloud Service Metrics.
- statistics str
- threshold str
- comparison
Operator String - metric
Name String The name of the metric. For information about how to query metric names, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter specifies the metric store name. For information about how to obtain the metric store name, see DescribeHybridMonitorNamespaceList.
- period Number
The statistical period of the metric. Unit: seconds. By default, this is the original reporting period of the metric.
NOTE: For information about how to query the statistical period of a metric, see Cloud Service Metrics.
- statistics String
- threshold String
ServiceMetricAlarmRuleEscalations, ServiceMetricAlarmRuleEscalationsArgs
- Critical
Pulumi.
Ali Cloud. Cloud Monitor. Inputs. Service Metric Alarm Rule Escalations Critical - The trigger condition for Critical-level alerts. See
criticalbelow. - Info
Pulumi.
Ali Cloud. Cloud Monitor. Inputs. Service Metric Alarm Rule Escalations Info - Trigger conditions for Info-level alerts. See
infobelow. - Warn
Pulumi.
Ali Cloud. Cloud Monitor. Inputs. Service Metric Alarm Rule Escalations Warn - Trigger condition for Warn-level alerts. See
warnbelow.
- Critical
Service
Metric Alarm Rule Escalations Critical - The trigger condition for Critical-level alerts. See
criticalbelow. - Info
Service
Metric Alarm Rule Escalations Info - Trigger conditions for Info-level alerts. See
infobelow. - Warn
Service
Metric Alarm Rule Escalations Warn - Trigger condition for Warn-level alerts. See
warnbelow.
- critical
Service
Metric Alarm Rule Escalations Critical - The trigger condition for Critical-level alerts. See
criticalbelow. - info
Service
Metric Alarm Rule Escalations Info - Trigger conditions for Info-level alerts. See
infobelow. - warn
Service
Metric Alarm Rule Escalations Warn - Trigger condition for Warn-level alerts. See
warnbelow.
- critical
Service
Metric Alarm Rule Escalations Critical - The trigger condition for Critical-level alerts. See
criticalbelow. - info
Service
Metric Alarm Rule Escalations Info - Trigger conditions for Info-level alerts. See
infobelow. - warn
Service
Metric Alarm Rule Escalations Warn - Trigger condition for Warn-level alerts. See
warnbelow.
- critical
Service
Metric Alarm Rule Escalations Critical - The trigger condition for Critical-level alerts. See
criticalbelow. - info
Service
Metric Alarm Rule Escalations Info - Trigger conditions for Info-level alerts. See
infobelow. - warn
Service
Metric Alarm Rule Escalations Warn - Trigger condition for Warn-level alerts. See
warnbelow.
- critical Property Map
- The trigger condition for Critical-level alerts. See
criticalbelow. - info Property Map
- Trigger conditions for Info-level alerts. See
infobelow. - warn Property Map
- Trigger condition for Warn-level alerts. See
warnbelow.
ServiceMetricAlarmRuleEscalationsCritical, ServiceMetricAlarmRuleEscalationsCriticalArgs
- Comparison
Operator string - Pre
Condition string - Precondition for triggering a Warn-level alert.
- Statistics string
- Threshold string
- Times int
- Comparison
Operator string - Pre
Condition string - Precondition for triggering a Warn-level alert.
- Statistics string
- Threshold string
- Times int
- comparison_
operator string - pre_
condition string - Precondition for triggering a Warn-level alert.
- statistics string
- threshold string
- times number
- comparison
Operator String - pre
Condition String - Precondition for triggering a Warn-level alert.
- statistics String
- threshold String
- times Integer
- comparison
Operator string - pre
Condition string - Precondition for triggering a Warn-level alert.
- statistics string
- threshold string
- times number
- comparison_
operator str - pre_
condition str - Precondition for triggering a Warn-level alert.
- statistics str
- threshold str
- times int
- comparison
Operator String - pre
Condition String - Precondition for triggering a Warn-level alert.
- statistics String
- threshold String
- times Number
ServiceMetricAlarmRuleEscalationsInfo, ServiceMetricAlarmRuleEscalationsInfoArgs
- Comparison
Operator string - Pre
Condition string - Precondition for triggering a Warn-level alert.
- Statistics string
- Threshold string
- Times int
- Comparison
Operator string - Pre
Condition string - Precondition for triggering a Warn-level alert.
- Statistics string
- Threshold string
- Times int
- comparison_
operator string - pre_
condition string - Precondition for triggering a Warn-level alert.
- statistics string
- threshold string
- times number
- comparison
Operator String - pre
Condition String - Precondition for triggering a Warn-level alert.
- statistics String
- threshold String
- times Integer
- comparison
Operator string - pre
Condition string - Precondition for triggering a Warn-level alert.
- statistics string
- threshold string
- times number
- comparison_
operator str - pre_
condition str - Precondition for triggering a Warn-level alert.
- statistics str
- threshold str
- times int
- comparison
Operator String - pre
Condition String - Precondition for triggering a Warn-level alert.
- statistics String
- threshold String
- times Number
ServiceMetricAlarmRuleEscalationsWarn, ServiceMetricAlarmRuleEscalationsWarnArgs
- Comparison
Operator string - Pre
Condition string - Precondition for triggering a Warn-level alert.
- Statistics string
- Threshold string
- Times int
- Comparison
Operator string - Pre
Condition string - Precondition for triggering a Warn-level alert.
- Statistics string
- Threshold string
- Times int
- comparison_
operator string - pre_
condition string - Precondition for triggering a Warn-level alert.
- statistics string
- threshold string
- times number
- comparison
Operator String - pre
Condition String - Precondition for triggering a Warn-level alert.
- statistics String
- threshold String
- times Integer
- comparison
Operator string - pre
Condition string - Precondition for triggering a Warn-level alert.
- statistics string
- threshold string
- times number
- comparison_
operator str - pre_
condition str - Precondition for triggering a Warn-level alert.
- statistics str
- threshold str
- times int
- comparison
Operator String - pre
Condition String - Precondition for triggering a Warn-level alert.
- statistics String
- threshold String
- times Number
ServiceMetricAlarmRuleLabel, ServiceMetricAlarmRuleLabelArgs
ServiceMetricAlarmRulePrometheus, ServiceMetricAlarmRulePrometheusArgs
- Annotations
List<Pulumi.
Ali Cloud. Cloud Monitor. Inputs. Service Metric Alarm Rule Prometheus Annotation> When a Prometheus alert is triggered, the key-value pairs of annotations are rendered to help you better understand the metric or alert rule.
NOTE: This feature is equivalent to Annotations in Prometheus. See
annotationsbelow.- Level string
- Alert severity level. Valid values:
- CRITICAL: Critical
- WARN: Warning
- INFO: Information
- Prom
Ql string The PromQL query statement.
NOTE: The data retrieved by the PromQL query statement is used as alert data. Include the alert threshold in this statement.
- Times int
- The number of times the alert condition must be met before an alert notification is sent.
- Annotations
[]Service
Metric Alarm Rule Prometheus Annotation When a Prometheus alert is triggered, the key-value pairs of annotations are rendered to help you better understand the metric or alert rule.
NOTE: This feature is equivalent to Annotations in Prometheus. See
annotationsbelow.- Level string
- Alert severity level. Valid values:
- CRITICAL: Critical
- WARN: Warning
- INFO: Information
- Prom
Ql string The PromQL query statement.
NOTE: The data retrieved by the PromQL query statement is used as alert data. Include the alert threshold in this statement.
- Times int
- The number of times the alert condition must be met before an alert notification is sent.
- annotations list(object)
When a Prometheus alert is triggered, the key-value pairs of annotations are rendered to help you better understand the metric or alert rule.
NOTE: This feature is equivalent to Annotations in Prometheus. See
annotationsbelow.- level string
- Alert severity level. Valid values:
- CRITICAL: Critical
- WARN: Warning
- INFO: Information
- prom_
ql string The PromQL query statement.
NOTE: The data retrieved by the PromQL query statement is used as alert data. Include the alert threshold in this statement.
- times number
- The number of times the alert condition must be met before an alert notification is sent.
- annotations
List<Service
Metric Alarm Rule Prometheus Annotation> When a Prometheus alert is triggered, the key-value pairs of annotations are rendered to help you better understand the metric or alert rule.
NOTE: This feature is equivalent to Annotations in Prometheus. See
annotationsbelow.- level String
- Alert severity level. Valid values:
- CRITICAL: Critical
- WARN: Warning
- INFO: Information
- prom
Ql String The PromQL query statement.
NOTE: The data retrieved by the PromQL query statement is used as alert data. Include the alert threshold in this statement.
- times Integer
- The number of times the alert condition must be met before an alert notification is sent.
- annotations
Service
Metric Alarm Rule Prometheus Annotation[] When a Prometheus alert is triggered, the key-value pairs of annotations are rendered to help you better understand the metric or alert rule.
NOTE: This feature is equivalent to Annotations in Prometheus. See
annotationsbelow.- level string
- Alert severity level. Valid values:
- CRITICAL: Critical
- WARN: Warning
- INFO: Information
- prom
Ql string The PromQL query statement.
NOTE: The data retrieved by the PromQL query statement is used as alert data. Include the alert threshold in this statement.
- times number
- The number of times the alert condition must be met before an alert notification is sent.
- annotations
Sequence[Service
Metric Alarm Rule Prometheus Annotation] When a Prometheus alert is triggered, the key-value pairs of annotations are rendered to help you better understand the metric or alert rule.
NOTE: This feature is equivalent to Annotations in Prometheus. See
annotationsbelow.- level str
- Alert severity level. Valid values:
- CRITICAL: Critical
- WARN: Warning
- INFO: Information
- prom_
ql str The PromQL query statement.
NOTE: The data retrieved by the PromQL query statement is used as alert data. Include the alert threshold in this statement.
- times int
- The number of times the alert condition must be met before an alert notification is sent.
- annotations List<Property Map>
When a Prometheus alert is triggered, the key-value pairs of annotations are rendered to help you better understand the metric or alert rule.
NOTE: This feature is equivalent to Annotations in Prometheus. See
annotationsbelow.- level String
- Alert severity level. Valid values:
- CRITICAL: Critical
- WARN: Warning
- INFO: Information
- prom
Ql String The PromQL query statement.
NOTE: The data retrieved by the PromQL query statement is used as alert data. Include the alert threshold in this statement.
- times Number
- The number of times the alert condition must be met before an alert notification is sent.
ServiceMetricAlarmRulePrometheusAnnotation, ServiceMetricAlarmRulePrometheusAnnotationArgs
Import
Cloud Monitor Service Metric Alarm Rule can be imported using the id, e.g.
$ pulumi import alicloud:cloudmonitor/serviceMetricAlarmRule:ServiceMetricAlarmRule example <metric_alarm_rule_id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.
published on Thursday, Jul 16, 2026 by Pulumi