Alibaba Cloud v3.86.1 published on Saturday, Sep 27, 2025 by Pulumi
alicloud.cloudmonitor.getServiceMetricAlarmRules
This data source provides the Cloud Monitor Service Metric Alarm Rules of the current Alibaba Cloud user.
NOTE: Available since v1.256.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 = alicloud.ecs.getInstances({
status: "Running",
});
const defaultAlarmContactGroup = new alicloud.cms.AlarmContactGroup("default", {alarmContactGroupName: name});
const defaultAlarm = new alicloud.cms.Alarm("default", {
name: name,
project: "acs_ecs_dashboard",
metric: "disk_writebytes",
period: 900,
silenceTime: 300,
webhook: "https://www.aliyun.com",
enabled: true,
contactGroups: [defaultAlarmContactGroup.alarmContactGroupName],
effectiveInterval: "06:00-20:00",
metricDimensions: _default.then(_default => ` [
{
\"instanceId\": \"${_default.ids?.[0]}\",
\"device\": \"/dev/vda1\"
}
]
`),
escalationsCritical: {
statistics: "Average",
comparisonOperator: "<=",
threshold: "90",
times: 1,
},
escalationsInfo: {
statistics: "Minimum",
comparisonOperator: "!=",
threshold: "20",
times: 3,
},
escalationsWarn: {
statistics: "Average",
comparisonOperator: "==",
threshold: "30",
times: 5,
},
});
const ids = alicloud.cloudmonitor.getServiceMetricAlarmRulesOutput({
ids: [defaultAlarm.id],
});
export const cloudMonitorServiceMetricAlarmRulesId0 = ids.apply(ids => ids.rules?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
default = alicloud.ecs.get_instances(status="Running")
default_alarm_contact_group = alicloud.cms.AlarmContactGroup("default", alarm_contact_group_name=name)
default_alarm = alicloud.cms.Alarm("default",
name=name,
project="acs_ecs_dashboard",
metric="disk_writebytes",
period=900,
silence_time=300,
webhook="https://www.aliyun.com",
enabled=True,
contact_groups=[default_alarm_contact_group.alarm_contact_group_name],
effective_interval="06:00-20:00",
metric_dimensions=f""" [
{{
\"instanceId\": \"{default.ids[0]}\",
\"device\": \"/dev/vda1\"
}}
]
""",
escalations_critical={
"statistics": "Average",
"comparison_operator": "<=",
"threshold": "90",
"times": 1,
},
escalations_info={
"statistics": "Minimum",
"comparison_operator": "!=",
"threshold": "20",
"times": 3,
},
escalations_warn={
"statistics": "Average",
"comparison_operator": "==",
"threshold": "30",
"times": 5,
})
ids = alicloud.cloudmonitor.get_service_metric_alarm_rules_output(ids=[default_alarm.id])
pulumi.export("cloudMonitorServiceMetricAlarmRulesId0", ids.rules[0].id)
package main
import (
"fmt"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cloudmonitor"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cms"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
"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
}
_default, err := ecs.GetInstances(ctx, &ecs.GetInstancesArgs{
Status: pulumi.StringRef("Running"),
}, nil)
if err != nil {
return err
}
defaultAlarmContactGroup, err := cms.NewAlarmContactGroup(ctx, "default", &cms.AlarmContactGroupArgs{
AlarmContactGroupName: pulumi.String(name),
})
if err != nil {
return err
}
defaultAlarm, err := cms.NewAlarm(ctx, "default", &cms.AlarmArgs{
Name: pulumi.String(name),
Project: pulumi.String("acs_ecs_dashboard"),
Metric: pulumi.String("disk_writebytes"),
Period: pulumi.Int(900),
SilenceTime: pulumi.Int(300),
Webhook: pulumi.String("https://www.aliyun.com"),
Enabled: pulumi.Bool(true),
ContactGroups: pulumi.StringArray{
defaultAlarmContactGroup.AlarmContactGroupName,
},
EffectiveInterval: pulumi.String("06:00-20:00"),
MetricDimensions: pulumi.Sprintf(` [
{
\"instanceId\": \"%v\",
\"device\": \"/dev/vda1\"
}
]
`, _default.Ids[0]),
EscalationsCritical: &cms.AlarmEscalationsCriticalArgs{
Statistics: pulumi.String("Average"),
ComparisonOperator: pulumi.String("<="),
Threshold: pulumi.String("90"),
Times: pulumi.Int(1),
},
EscalationsInfo: &cms.AlarmEscalationsInfoArgs{
Statistics: pulumi.String("Minimum"),
ComparisonOperator: pulumi.String("!="),
Threshold: pulumi.String("20"),
Times: pulumi.Int(3),
},
EscalationsWarn: &cms.AlarmEscalationsWarnArgs{
Statistics: pulumi.String("Average"),
ComparisonOperator: pulumi.String("=="),
Threshold: pulumi.String("30"),
Times: pulumi.Int(5),
},
})
if err != nil {
return err
}
ids := cloudmonitor.GetServiceMetricAlarmRulesOutput(ctx, cloudmonitor.GetServiceMetricAlarmRulesOutputArgs{
Ids: pulumi.StringArray{
defaultAlarm.ID(),
},
}, nil)
ctx.Export("cloudMonitorServiceMetricAlarmRulesId0", ids.ApplyT(func(ids cloudmonitor.GetServiceMetricAlarmRulesResult) (*string, error) {
return &ids.Rules[0].Id, nil
}).(pulumi.StringPtrOutput))
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-example";
var @default = AliCloud.Ecs.GetInstances.Invoke(new()
{
Status = "Running",
});
var defaultAlarmContactGroup = new AliCloud.Cms.AlarmContactGroup("default", new()
{
AlarmContactGroupName = name,
});
var defaultAlarm = new AliCloud.Cms.Alarm("default", new()
{
Name = name,
Project = "acs_ecs_dashboard",
Metric = "disk_writebytes",
Period = 900,
SilenceTime = 300,
Webhook = "https://www.aliyun.com",
Enabled = true,
ContactGroups = new[]
{
defaultAlarmContactGroup.AlarmContactGroupName,
},
EffectiveInterval = "06:00-20:00",
MetricDimensions = @default.Apply(@default => @$" [
{{
\""instanceId\"": \""{@default.Apply(getInstancesResult => getInstancesResult.Ids[0])}\"",
\""device\"": \""/dev/vda1\""
}}
]
"),
EscalationsCritical = new AliCloud.Cms.Inputs.AlarmEscalationsCriticalArgs
{
Statistics = "Average",
ComparisonOperator = "<=",
Threshold = "90",
Times = 1,
},
EscalationsInfo = new AliCloud.Cms.Inputs.AlarmEscalationsInfoArgs
{
Statistics = "Minimum",
ComparisonOperator = "!=",
Threshold = "20",
Times = 3,
},
EscalationsWarn = new AliCloud.Cms.Inputs.AlarmEscalationsWarnArgs
{
Statistics = "Average",
ComparisonOperator = "==",
Threshold = "30",
Times = 5,
},
});
var ids = AliCloud.CloudMonitor.GetServiceMetricAlarmRules.Invoke(new()
{
Ids = new[]
{
defaultAlarm.Id,
},
});
return new Dictionary<string, object?>
{
["cloudMonitorServiceMetricAlarmRulesId0"] = ids.Apply(getServiceMetricAlarmRulesResult => getServiceMetricAlarmRulesResult.Rules[0]?.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ecs.EcsFunctions;
import com.pulumi.alicloud.ecs.inputs.GetInstancesArgs;
import com.pulumi.alicloud.cms.AlarmContactGroup;
import com.pulumi.alicloud.cms.AlarmContactGroupArgs;
import com.pulumi.alicloud.cms.Alarm;
import com.pulumi.alicloud.cms.AlarmArgs;
import com.pulumi.alicloud.cms.inputs.AlarmEscalationsCriticalArgs;
import com.pulumi.alicloud.cms.inputs.AlarmEscalationsInfoArgs;
import com.pulumi.alicloud.cms.inputs.AlarmEscalationsWarnArgs;
import com.pulumi.alicloud.cloudmonitor.CloudmonitorFunctions;
import com.pulumi.alicloud.cloudmonitor.inputs.GetServiceMetricAlarmRulesArgs;
import java.util.List;
import java.util.ArrayList;
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");
final var default = EcsFunctions.getInstances(GetInstancesArgs.builder()
.status("Running")
.build());
var defaultAlarmContactGroup = new AlarmContactGroup("defaultAlarmContactGroup", AlarmContactGroupArgs.builder()
.alarmContactGroupName(name)
.build());
var defaultAlarm = new Alarm("defaultAlarm", AlarmArgs.builder()
.name(name)
.project("acs_ecs_dashboard")
.metric("disk_writebytes")
.period(900)
.silenceTime(300)
.webhook("https://www.aliyun.com")
.enabled(true)
.contactGroups(defaultAlarmContactGroup.alarmContactGroupName())
.effectiveInterval("06:00-20:00")
.metricDimensions("""
[
{
\"instanceId\": \"%s\",
\"device\": \"/dev/vda1\"
}
]
", default_.ids()[0]))
.escalationsCritical(AlarmEscalationsCriticalArgs.builder()
.statistics("Average")
.comparisonOperator("<=")
.threshold("90")
.times(1)
.build())
.escalationsInfo(AlarmEscalationsInfoArgs.builder()
.statistics("Minimum")
.comparisonOperator("!=")
.threshold("20")
.times(3)
.build())
.escalationsWarn(AlarmEscalationsWarnArgs.builder()
.statistics("Average")
.comparisonOperator("==")
.threshold("30")
.times(5)
.build())
.build());
final var ids = CloudmonitorFunctions.getServiceMetricAlarmRules(GetServiceMetricAlarmRulesArgs.builder()
.ids(defaultAlarm.id())
.build());
ctx.export("cloudMonitorServiceMetricAlarmRulesId0", ids.applyValue(_ids -> _ids.rules()[0].id()));
}
}
configuration:
name:
type: string
default: terraform-example
resources:
defaultAlarmContactGroup:
type: alicloud:cms:AlarmContactGroup
name: default
properties:
alarmContactGroupName: ${name}
defaultAlarm:
type: alicloud:cms:Alarm
name: default
properties:
name: ${name}
project: acs_ecs_dashboard
metric: disk_writebytes
period: 900
silenceTime: 300
webhook: https://www.aliyun.com
enabled: true
contactGroups:
- ${defaultAlarmContactGroup.alarmContactGroupName}
effectiveInterval: 06:00-20:00
metricDimensions: |2
[
{
\"instanceId\": \"${default.ids[0]}\",
\"device\": \"/dev/vda1\"
}
]
escalationsCritical:
statistics: Average
comparisonOperator: <=
threshold: 90
times: 1
escalationsInfo:
statistics: Minimum
comparisonOperator: '!='
threshold: 20
times: 3
escalationsWarn:
statistics: Average
comparisonOperator: ==
threshold: 30
times: 5
variables:
default:
fn::invoke:
function: alicloud:ecs:getInstances
arguments:
status: Running
ids:
fn::invoke:
function: alicloud:cloudmonitor:getServiceMetricAlarmRules
arguments:
ids:
- ${defaultAlarm.id}
outputs:
cloudMonitorServiceMetricAlarmRulesId0: ${ids.rules[0].id}
Using getServiceMetricAlarmRules
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getServiceMetricAlarmRules(args: GetServiceMetricAlarmRulesArgs, opts?: InvokeOptions): Promise<GetServiceMetricAlarmRulesResult>
function getServiceMetricAlarmRulesOutput(args: GetServiceMetricAlarmRulesOutputArgs, opts?: InvokeOptions): Output<GetServiceMetricAlarmRulesResult>def get_service_metric_alarm_rules(dimensions: Optional[str] = None,
ids: Optional[Sequence[str]] = None,
metric_name: Optional[str] = None,
namespace: Optional[str] = None,
output_file: Optional[str] = None,
rule_name: Optional[str] = None,
status: Optional[bool] = None,
opts: Optional[InvokeOptions] = None) -> GetServiceMetricAlarmRulesResult
def get_service_metric_alarm_rules_output(dimensions: Optional[pulumi.Input[str]] = None,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
metric_name: Optional[pulumi.Input[str]] = None,
namespace: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
rule_name: Optional[pulumi.Input[str]] = None,
status: Optional[pulumi.Input[bool]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetServiceMetricAlarmRulesResult]func GetServiceMetricAlarmRules(ctx *Context, args *GetServiceMetricAlarmRulesArgs, opts ...InvokeOption) (*GetServiceMetricAlarmRulesResult, error)
func GetServiceMetricAlarmRulesOutput(ctx *Context, args *GetServiceMetricAlarmRulesOutputArgs, opts ...InvokeOption) GetServiceMetricAlarmRulesResultOutput> Note: This function is named GetServiceMetricAlarmRules in the Go SDK.
public static class GetServiceMetricAlarmRules
{
public static Task<GetServiceMetricAlarmRulesResult> InvokeAsync(GetServiceMetricAlarmRulesArgs args, InvokeOptions? opts = null)
public static Output<GetServiceMetricAlarmRulesResult> Invoke(GetServiceMetricAlarmRulesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetServiceMetricAlarmRulesResult> getServiceMetricAlarmRules(GetServiceMetricAlarmRulesArgs args, InvokeOptions options)
public static Output<GetServiceMetricAlarmRulesResult> getServiceMetricAlarmRules(GetServiceMetricAlarmRulesArgs args, InvokeOptions options)
fn::invoke:
function: alicloud:cloudmonitor/getServiceMetricAlarmRules:getServiceMetricAlarmRules
arguments:
# arguments dictionaryThe following arguments are supported:
- Dimensions string
- The monitoring dimensions of the specified resource.
- Ids List<string>
- A list of Metric Alarm Rule IDs.
- Metric
Name string - The name of the metric.
- Namespace string
- The namespace of the cloud service.
- Output
File string - File name where to save data source results (after running
pulumi preview). - Rule
Name string - The name of the alert rule.
- Status bool
- Specifies whether to query enabled or disabled alert rules. Valid values:
true,false.
- Dimensions string
- The monitoring dimensions of the specified resource.
- Ids []string
- A list of Metric Alarm Rule IDs.
- Metric
Name string - The name of the metric.
- Namespace string
- The namespace of the cloud service.
- Output
File string - File name where to save data source results (after running
pulumi preview). - Rule
Name string - The name of the alert rule.
- Status bool
- Specifies whether to query enabled or disabled alert rules. Valid values:
true,false.
- dimensions String
- The monitoring dimensions of the specified resource.
- ids List<String>
- A list of Metric Alarm Rule IDs.
- metric
Name String - The name of the metric.
- namespace String
- The namespace of the cloud service.
- output
File String - File name where to save data source results (after running
pulumi preview). - rule
Name String - The name of the alert rule.
- status Boolean
- Specifies whether to query enabled or disabled alert rules. Valid values:
true,false.
- dimensions string
- The monitoring dimensions of the specified resource.
- ids string[]
- A list of Metric Alarm Rule IDs.
- metric
Name string - The name of the metric.
- namespace string
- The namespace of the cloud service.
- output
File string - File name where to save data source results (after running
pulumi preview). - rule
Name string - The name of the alert rule.
- status boolean
- Specifies whether to query enabled or disabled alert rules. Valid values:
true,false.
- dimensions str
- The monitoring dimensions of the specified resource.
- ids Sequence[str]
- A list of Metric Alarm Rule IDs.
- metric_
name str - The name of the metric.
- namespace str
- The namespace of the cloud service.
- output_
file str - File name where to save data source results (after running
pulumi preview). - rule_
name str - The name of the alert rule.
- status bool
- Specifies whether to query enabled or disabled alert rules. Valid values:
true,false.
- dimensions String
- The monitoring dimensions of the specified resource.
- ids List<String>
- A list of Metric Alarm Rule IDs.
- metric
Name String - The name of the metric.
- namespace String
- The namespace of the cloud service.
- output
File String - File name where to save data source results (after running
pulumi preview). - rule
Name String - The name of the alert rule.
- status Boolean
- Specifies whether to query enabled or disabled alert rules. Valid values:
true,false.
getServiceMetricAlarmRules Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Rules
List<Pulumi.
Ali Cloud. Cloud Monitor. Outputs. Get Service Metric Alarm Rules Rule> - A list of Hybrid Double Writes. Each element contains the following attributes:
- Dimensions string
- The dimensions of the alert rule.
- Metric
Name string - The metric that is used to monitor the cloud service.
- Namespace string
- The namespace of the cloud service.
- Output
File string - Rule
Name string - The name of the alert rule.
- Status bool
- Indicates whether the alert rule is enabled.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Rules
[]Get
Service Metric Alarm Rules Rule - A list of Hybrid Double Writes. Each element contains the following attributes:
- Dimensions string
- The dimensions of the alert rule.
- Metric
Name string - The metric that is used to monitor the cloud service.
- Namespace string
- The namespace of the cloud service.
- Output
File string - Rule
Name string - The name of the alert rule.
- Status bool
- Indicates whether the alert rule is enabled.
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- rules
List<Get
Service Metric Alarm Rules Rule> - A list of Hybrid Double Writes. Each element contains the following attributes:
- dimensions String
- The dimensions of the alert rule.
- metric
Name String - The metric that is used to monitor the cloud service.
- namespace String
- The namespace of the cloud service.
- output
File String - rule
Name String - The name of the alert rule.
- status Boolean
- Indicates whether the alert rule is enabled.
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- rules
Get
Service Metric Alarm Rules Rule[] - A list of Hybrid Double Writes. Each element contains the following attributes:
- dimensions string
- The dimensions of the alert rule.
- metric
Name string - The metric that is used to monitor the cloud service.
- namespace string
- The namespace of the cloud service.
- output
File string - rule
Name string - The name of the alert rule.
- status boolean
- Indicates whether the alert rule is enabled.
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- rules
Sequence[Get
Service Metric Alarm Rules Rule] - A list of Hybrid Double Writes. Each element contains the following attributes:
- dimensions str
- The dimensions of the alert rule.
- metric_
name str - The metric that is used to monitor the cloud service.
- namespace str
- The namespace of the cloud service.
- output_
file str - rule_
name str - The name of the alert rule.
- status bool
- Indicates whether the alert rule is enabled.
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- rules List<Property Map>
- A list of Hybrid Double Writes. Each element contains the following attributes:
- dimensions String
- The dimensions of the alert rule.
- metric
Name String - The metric that is used to monitor the cloud service.
- namespace String
- The namespace of the cloud service.
- output
File String - rule
Name String - The name of the alert rule.
- status Boolean
- Indicates whether the alert rule is enabled.
Supporting Types
GetServiceMetricAlarmRulesRule
- Composite
Expression Pulumi.Ali Cloud. Cloud Monitor. Inputs. Get Service Metric Alarm Rules Rule Composite Expression - The trigger conditions for multiple metrics.
- Contact
Groups string - The alert contact group.
- Dimensions string
- The monitoring dimensions of the specified resource.
- Effective
Interval string - The time period during which the alert rule is effective.
- Email
Subject string - The subject of the alert notification email.
- Escalations
Pulumi.
Ali Cloud. Cloud Monitor. Inputs. Get Service Metric Alarm Rules Rule Escalations - The conditions for triggering different levels of alerts.
- Id string
- The ID of the alert rule.
- Labels
List<Pulumi.
Ali Cloud. Cloud Monitor. Inputs. Get Service Metric Alarm Rules Rule Label> - The tags of the alert rule.
- Metric
Name string - The name of the metric.
- Namespace string
- The namespace of the cloud service.
- No
Data stringPolicy - The method that is used to handle alerts when no monitoring data is found.
- No
Effective stringInterval - The time period during which the alert rule is ineffective.
- Period string
- The aggregation period of the metric.
- Prometheus
Pulumi.
Ali Cloud. Cloud Monitor. Inputs. Get Service Metric Alarm Rules Rule Prometheus - The Prometheus alerts.
- Resources string
- The resources that are associated with the alert rule.
- Rule
Name string - The name of the alert rule.
- Silence
Time string - The mute period during which new alert notifications are not sent even if the trigger conditions are met.
- Source
Type string - The type of the alert rule.
- Status bool
- Specifies whether to query enabled or disabled alert rules. Valid values:
true,false. - Webhook string
- The callback URL.
- Composite
Expression GetService Metric Alarm Rules Rule Composite Expression - The trigger conditions for multiple metrics.
- Contact
Groups string - The alert contact group.
- Dimensions string
- The monitoring dimensions of the specified resource.
- Effective
Interval string - The time period during which the alert rule is effective.
- Email
Subject string - The subject of the alert notification email.
- Escalations
Get
Service Metric Alarm Rules Rule Escalations - The conditions for triggering different levels of alerts.
- Id string
- The ID of the alert rule.
- Labels
[]Get
Service Metric Alarm Rules Rule Label - The tags of the alert rule.
- Metric
Name string - The name of the metric.
- Namespace string
- The namespace of the cloud service.
- No
Data stringPolicy - The method that is used to handle alerts when no monitoring data is found.
- No
Effective stringInterval - The time period during which the alert rule is ineffective.
- Period string
- The aggregation period of the metric.
- Prometheus
Get
Service Metric Alarm Rules Rule Prometheus - The Prometheus alerts.
- Resources string
- The resources that are associated with the alert rule.
- Rule
Name string - The name of the alert rule.
- Silence
Time string - The mute period during which new alert notifications are not sent even if the trigger conditions are met.
- Source
Type string - The type of the alert rule.
- Status bool
- Specifies whether to query enabled or disabled alert rules. Valid values:
true,false. - Webhook string
- The callback URL.
- composite
Expression GetService Metric Alarm Rules Rule Composite Expression - The trigger conditions for multiple metrics.
- contact
Groups String - The alert contact group.
- dimensions String
- The monitoring dimensions of the specified resource.
- effective
Interval String - The time period during which the alert rule is effective.
- email
Subject String - The subject of the alert notification email.
- escalations
Get
Service Metric Alarm Rules Rule Escalations - The conditions for triggering different levels of alerts.
- id String
- The ID of the alert rule.
- labels
List<Get
Service Metric Alarm Rules Rule Label> - The tags of the alert rule.
- metric
Name String - The name of the metric.
- namespace String
- The namespace of the cloud service.
- no
Data StringPolicy - The method that is used to handle alerts when no monitoring data is found.
- no
Effective StringInterval - The time period during which the alert rule is ineffective.
- period String
- The aggregation period of the metric.
- prometheus
Get
Service Metric Alarm Rules Rule Prometheus - The Prometheus alerts.
- resources String
- The resources that are associated with the alert rule.
- rule
Name String - The name of the alert rule.
- silence
Time String - The mute period during which new alert notifications are not sent even if the trigger conditions are met.
- source
Type String - The type of the alert rule.
- status Boolean
- Specifies whether to query enabled or disabled alert rules. Valid values:
true,false. - webhook String
- The callback URL.
- composite
Expression GetService Metric Alarm Rules Rule Composite Expression - The trigger conditions for multiple metrics.
- contact
Groups string - The alert contact group.
- dimensions string
- The monitoring dimensions of the specified resource.
- effective
Interval string - The time period during which the alert rule is effective.
- email
Subject string - The subject of the alert notification email.
- escalations
Get
Service Metric Alarm Rules Rule Escalations - The conditions for triggering different levels of alerts.
- id string
- The ID of the alert rule.
- labels
Get
Service Metric Alarm Rules Rule Label[] - The tags of the alert rule.
- metric
Name string - The name of the metric.
- namespace string
- The namespace of the cloud service.
- no
Data stringPolicy - The method that is used to handle alerts when no monitoring data is found.
- no
Effective stringInterval - The time period during which the alert rule is ineffective.
- period string
- The aggregation period of the metric.
- prometheus
Get
Service Metric Alarm Rules Rule Prometheus - The Prometheus alerts.
- resources string
- The resources that are associated with the alert rule.
- rule
Name string - The name of the alert rule.
- silence
Time string - The mute period during which new alert notifications are not sent even if the trigger conditions are met.
- source
Type string - The type of the alert rule.
- status boolean
- Specifies whether to query enabled or disabled alert rules. Valid values:
true,false. - webhook string
- The callback URL.
- composite_
expression GetService Metric Alarm Rules Rule Composite Expression - The trigger conditions for multiple metrics.
- contact_
groups str - The alert contact group.
- dimensions str
- The monitoring dimensions of the specified resource.
- effective_
interval str - The time period during which the alert rule is effective.
- email_
subject str - The subject of the alert notification email.
- escalations
Get
Service Metric Alarm Rules Rule Escalations - The conditions for triggering different levels of alerts.
- id str
- The ID of the alert rule.
- labels
Sequence[Get
Service Metric Alarm Rules Rule Label] - The tags of the alert rule.
- metric_
name str - The name of the metric.
- namespace str
- The namespace of the cloud service.
- no_
data_ strpolicy - The method that is used to handle alerts when no monitoring data is found.
- no_
effective_ strinterval - The time period during which the alert rule is ineffective.
- period str
- The aggregation period of the metric.
- prometheus
Get
Service Metric Alarm Rules Rule Prometheus - The Prometheus alerts.
- resources str
- The resources that are associated with the alert rule.
- rule_
name str - The name of the alert rule.
- silence_
time str - The mute period during which new alert notifications are not sent even if the trigger conditions are met.
- source_
type str - The type of the alert rule.
- status bool
- Specifies whether to query enabled or disabled alert rules. Valid values:
true,false. - webhook str
- The callback URL.
- composite
Expression Property Map - The trigger conditions for multiple metrics.
- contact
Groups String - The alert contact group.
- dimensions String
- The monitoring dimensions of the specified resource.
- effective
Interval String - The time period during which the alert rule is effective.
- email
Subject String - The subject of the alert notification email.
- escalations Property Map
- The conditions for triggering different levels of alerts.
- id String
- The ID of the alert rule.
- labels List<Property Map>
- The tags of the alert rule.
- metric
Name String - The name of the metric.
- namespace String
- The namespace of the cloud service.
- no
Data StringPolicy - The method that is used to handle alerts when no monitoring data is found.
- no
Effective StringInterval - The time period during which the alert rule is ineffective.
- period String
- The aggregation period of the metric.
- prometheus Property Map
- The Prometheus alerts.
- resources String
- The resources that are associated with the alert rule.
- rule
Name String - The name of the alert rule.
- silence
Time String - The mute period during which new alert notifications are not sent even if the trigger conditions are met.
- source
Type String - The type of the alert rule.
- status Boolean
- Specifies whether to query enabled or disabled alert rules. Valid values:
true,false. - webhook String
- The callback URL.
GetServiceMetricAlarmRulesRuleCompositeExpression
- Expression
List stringJoin - The relationship between the trigger conditions for multiple metrics.
- Expression
Lists List<Pulumi.Ali Cloud. Cloud Monitor. Inputs. Get Service Metric Alarm Rules Rule Composite Expression Expression List> - The trigger conditions that are created in standard mode.
- Expression
Raw string - The trigger conditions that are created by using expressions.
- Level string
- The alert level.
- Times int
- The number of consecutive triggers.
- Expression
List stringJoin - The relationship between the trigger conditions for multiple metrics.
- Expression
Lists []GetService Metric Alarm Rules Rule Composite Expression Expression List - The trigger conditions that are created in standard mode.
- Expression
Raw string - The trigger conditions that are created by using expressions.
- Level string
- The alert level.
- Times int
- The number of consecutive triggers.
- expression
List StringJoin - The relationship between the trigger conditions for multiple metrics.
- expression
Lists List<GetService Metric Alarm Rules Rule Composite Expression Expression List> - The trigger conditions that are created in standard mode.
- expression
Raw String - The trigger conditions that are created by using expressions.
- level String
- The alert level.
- times Integer
- The number of consecutive triggers.
- expression
List stringJoin - The relationship between the trigger conditions for multiple metrics.
- expression
Lists GetService Metric Alarm Rules Rule Composite Expression Expression List[] - The trigger conditions that are created in standard mode.
- expression
Raw string - The trigger conditions that are created by using expressions.
- level string
- The alert level.
- times number
- The number of consecutive triggers.
- expression_
list_ strjoin - The relationship between the trigger conditions for multiple metrics.
- expression_
lists Sequence[GetService Metric Alarm Rules Rule Composite Expression Expression List] - The trigger conditions that are created in standard mode.
- expression_
raw str - The trigger conditions that are created by using expressions.
- level str
- The alert level.
- times int
- The number of consecutive triggers.
- expression
List StringJoin - The relationship between the trigger conditions for multiple metrics.
- expression
Lists List<Property Map> - The trigger conditions that are created in standard mode.
- expression
Raw String - The trigger conditions that are created by using expressions.
- level String
- The alert level.
- times Number
- The number of consecutive triggers.
GetServiceMetricAlarmRulesRuleCompositeExpressionExpressionList
- Comparison
Operator string - The comparison operator that is used to compare the metric value with the threshold.
- Metric
Name string - The name of the metric.
- Period int
- The aggregation period of the metric.
- Statistics string
- The statistical methods for Warn-level alerts.
- Threshold string
- The threshold for Warn-level alerts.
- Comparison
Operator string - The comparison operator that is used to compare the metric value with the threshold.
- Metric
Name string - The name of the metric.
- Period int
- The aggregation period of the metric.
- Statistics string
- The statistical methods for Warn-level alerts.
- Threshold string
- The threshold for Warn-level alerts.
- comparison
Operator String - The comparison operator that is used to compare the metric value with the threshold.
- metric
Name String - The name of the metric.
- period Integer
- The aggregation period of the metric.
- statistics String
- The statistical methods for Warn-level alerts.
- threshold String
- The threshold for Warn-level alerts.
- comparison
Operator string - The comparison operator that is used to compare the metric value with the threshold.
- metric
Name string - The name of the metric.
- period number
- The aggregation period of the metric.
- statistics string
- The statistical methods for Warn-level alerts.
- threshold string
- The threshold for Warn-level alerts.
- comparison_
operator str - The comparison operator that is used to compare the metric value with the threshold.
- metric_
name str - The name of the metric.
- period int
- The aggregation period of the metric.
- statistics str
- The statistical methods for Warn-level alerts.
- threshold str
- The threshold for Warn-level alerts.
- comparison
Operator String - The comparison operator that is used to compare the metric value with the threshold.
- metric
Name String - The name of the metric.
- period Number
- The aggregation period of the metric.
- statistics String
- The statistical methods for Warn-level alerts.
- threshold String
- The threshold for Warn-level alerts.
GetServiceMetricAlarmRulesRuleEscalations
- Critical
Pulumi.
Ali Cloud. Cloud Monitor. Inputs. Get Service Metric Alarm Rules Rule Escalations Critical - The conditions for triggering Critical-level alerts.
- Info
Pulumi.
Ali Cloud. Cloud Monitor. Inputs. Get Service Metric Alarm Rules Rule Escalations Info - The conditions for triggering Info-level alerts.
- Warn
Pulumi.
Ali Cloud. Cloud Monitor. Inputs. Get Service Metric Alarm Rules Rule Escalations Warn - The conditions for triggering Warn-level alerts.
- Critical
Get
Service Metric Alarm Rules Rule Escalations Critical - The conditions for triggering Critical-level alerts.
- Info
Get
Service Metric Alarm Rules Rule Escalations Info - The conditions for triggering Info-level alerts.
- Warn
Get
Service Metric Alarm Rules Rule Escalations Warn - The conditions for triggering Warn-level alerts.
- critical
Get
Service Metric Alarm Rules Rule Escalations Critical - The conditions for triggering Critical-level alerts.
- info
Get
Service Metric Alarm Rules Rule Escalations Info - The conditions for triggering Info-level alerts.
- warn
Get
Service Metric Alarm Rules Rule Escalations Warn - The conditions for triggering Warn-level alerts.
- critical
Get
Service Metric Alarm Rules Rule Escalations Critical - The conditions for triggering Critical-level alerts.
- info
Get
Service Metric Alarm Rules Rule Escalations Info - The conditions for triggering Info-level alerts.
- warn
Get
Service Metric Alarm Rules Rule Escalations Warn - The conditions for triggering Warn-level alerts.
- critical
Get
Service Metric Alarm Rules Rule Escalations Critical - The conditions for triggering Critical-level alerts.
- info
Get
Service Metric Alarm Rules Rule Escalations Info - The conditions for triggering Info-level alerts.
- warn
Get
Service Metric Alarm Rules Rule Escalations Warn - The conditions for triggering Warn-level alerts.
- critical Property Map
- The conditions for triggering Critical-level alerts.
- info Property Map
- The conditions for triggering Info-level alerts.
- warn Property Map
- The conditions for triggering Warn-level alerts.
GetServiceMetricAlarmRulesRuleEscalationsCritical
- Comparison
Operator string - The comparison operator that is used to compare the metric value with the threshold.
- Pre
Condition string - The additional conditions for triggering Warn-level alerts.
- Statistics string
- The statistical methods for Warn-level alerts.
- Threshold string
- The threshold for Warn-level alerts.
- Times int
- The number of consecutive triggers.
- Comparison
Operator string - The comparison operator that is used to compare the metric value with the threshold.
- Pre
Condition string - The additional conditions for triggering Warn-level alerts.
- Statistics string
- The statistical methods for Warn-level alerts.
- Threshold string
- The threshold for Warn-level alerts.
- Times int
- The number of consecutive triggers.
- comparison
Operator String - The comparison operator that is used to compare the metric value with the threshold.
- pre
Condition String - The additional conditions for triggering Warn-level alerts.
- statistics String
- The statistical methods for Warn-level alerts.
- threshold String
- The threshold for Warn-level alerts.
- times Integer
- The number of consecutive triggers.
- comparison
Operator string - The comparison operator that is used to compare the metric value with the threshold.
- pre
Condition string - The additional conditions for triggering Warn-level alerts.
- statistics string
- The statistical methods for Warn-level alerts.
- threshold string
- The threshold for Warn-level alerts.
- times number
- The number of consecutive triggers.
- comparison_
operator str - The comparison operator that is used to compare the metric value with the threshold.
- pre_
condition str - The additional conditions for triggering Warn-level alerts.
- statistics str
- The statistical methods for Warn-level alerts.
- threshold str
- The threshold for Warn-level alerts.
- times int
- The number of consecutive triggers.
- comparison
Operator String - The comparison operator that is used to compare the metric value with the threshold.
- pre
Condition String - The additional conditions for triggering Warn-level alerts.
- statistics String
- The statistical methods for Warn-level alerts.
- threshold String
- The threshold for Warn-level alerts.
- times Number
- The number of consecutive triggers.
GetServiceMetricAlarmRulesRuleEscalationsInfo
- Comparison
Operator string - The comparison operator that is used to compare the metric value with the threshold.
- Pre
Condition string - The additional conditions for triggering Warn-level alerts.
- Statistics string
- The statistical methods for Warn-level alerts.
- Threshold string
- The threshold for Warn-level alerts.
- Times int
- The number of consecutive triggers.
- Comparison
Operator string - The comparison operator that is used to compare the metric value with the threshold.
- Pre
Condition string - The additional conditions for triggering Warn-level alerts.
- Statistics string
- The statistical methods for Warn-level alerts.
- Threshold string
- The threshold for Warn-level alerts.
- Times int
- The number of consecutive triggers.
- comparison
Operator String - The comparison operator that is used to compare the metric value with the threshold.
- pre
Condition String - The additional conditions for triggering Warn-level alerts.
- statistics String
- The statistical methods for Warn-level alerts.
- threshold String
- The threshold for Warn-level alerts.
- times Integer
- The number of consecutive triggers.
- comparison
Operator string - The comparison operator that is used to compare the metric value with the threshold.
- pre
Condition string - The additional conditions for triggering Warn-level alerts.
- statistics string
- The statistical methods for Warn-level alerts.
- threshold string
- The threshold for Warn-level alerts.
- times number
- The number of consecutive triggers.
- comparison_
operator str - The comparison operator that is used to compare the metric value with the threshold.
- pre_
condition str - The additional conditions for triggering Warn-level alerts.
- statistics str
- The statistical methods for Warn-level alerts.
- threshold str
- The threshold for Warn-level alerts.
- times int
- The number of consecutive triggers.
- comparison
Operator String - The comparison operator that is used to compare the metric value with the threshold.
- pre
Condition String - The additional conditions for triggering Warn-level alerts.
- statistics String
- The statistical methods for Warn-level alerts.
- threshold String
- The threshold for Warn-level alerts.
- times Number
- The number of consecutive triggers.
GetServiceMetricAlarmRulesRuleEscalationsWarn
- Comparison
Operator string - The comparison operator that is used to compare the metric value with the threshold.
- Pre
Condition string - The additional conditions for triggering Warn-level alerts.
- Statistics string
- The statistical methods for Warn-level alerts.
- Threshold string
- The threshold for Warn-level alerts.
- Times int
- The number of consecutive triggers.
- Comparison
Operator string - The comparison operator that is used to compare the metric value with the threshold.
- Pre
Condition string - The additional conditions for triggering Warn-level alerts.
- Statistics string
- The statistical methods for Warn-level alerts.
- Threshold string
- The threshold for Warn-level alerts.
- Times int
- The number of consecutive triggers.
- comparison
Operator String - The comparison operator that is used to compare the metric value with the threshold.
- pre
Condition String - The additional conditions for triggering Warn-level alerts.
- statistics String
- The statistical methods for Warn-level alerts.
- threshold String
- The threshold for Warn-level alerts.
- times Integer
- The number of consecutive triggers.
- comparison
Operator string - The comparison operator that is used to compare the metric value with the threshold.
- pre
Condition string - The additional conditions for triggering Warn-level alerts.
- statistics string
- The statistical methods for Warn-level alerts.
- threshold string
- The threshold for Warn-level alerts.
- times number
- The number of consecutive triggers.
- comparison_
operator str - The comparison operator that is used to compare the metric value with the threshold.
- pre_
condition str - The additional conditions for triggering Warn-level alerts.
- statistics str
- The statistical methods for Warn-level alerts.
- threshold str
- The threshold for Warn-level alerts.
- times int
- The number of consecutive triggers.
- comparison
Operator String - The comparison operator that is used to compare the metric value with the threshold.
- pre
Condition String - The additional conditions for triggering Warn-level alerts.
- statistics String
- The statistical methods for Warn-level alerts.
- threshold String
- The threshold for Warn-level alerts.
- times Number
- The number of consecutive triggers.
GetServiceMetricAlarmRulesRuleLabel
GetServiceMetricAlarmRulesRulePrometheus
- Annotations
List<Pulumi.
Ali Cloud. Cloud Monitor. Inputs. Get Service Metric Alarm Rules Rule Prometheus Annotation> - The annotations of the Prometheus alert rule.
- Level string
- The alert level.
- Prom
Ql string - The PromQL query statement.
- Times int
- The number of consecutive triggers.
- Annotations
[]Get
Service Metric Alarm Rules Rule Prometheus Annotation - The annotations of the Prometheus alert rule.
- Level string
- The alert level.
- Prom
Ql string - The PromQL query statement.
- Times int
- The number of consecutive triggers.
- annotations
List<Get
Service Metric Alarm Rules Rule Prometheus Annotation> - The annotations of the Prometheus alert rule.
- level String
- The alert level.
- prom
Ql String - The PromQL query statement.
- times Integer
- The number of consecutive triggers.
- annotations
Get
Service Metric Alarm Rules Rule Prometheus Annotation[] - The annotations of the Prometheus alert rule.
- level string
- The alert level.
- prom
Ql string - The PromQL query statement.
- times number
- The number of consecutive triggers.
- annotations
Sequence[Get
Service Metric Alarm Rules Rule Prometheus Annotation] - The annotations of the Prometheus alert rule.
- level str
- The alert level.
- prom_
ql str - The PromQL query statement.
- times int
- The number of consecutive triggers.
- annotations List<Property Map>
- The annotations of the Prometheus alert rule.
- level String
- The alert level.
- prom
Ql String - The PromQL query statement.
- times Number
- The number of consecutive triggers.
GetServiceMetricAlarmRulesRulePrometheusAnnotation
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.
