alicloud.log.Alert
Explore with Pulumi AI
Log alert is a unit of log service, which is used to monitor and alert the user’s logstore status information. Log Service enables you to configure alerts based on the charts in a dashboard to monitor the service status in real time.
For information about SLS Alert and how to use it, see SLS Alert Overview
NOTE: Available in 1.78.0
Example Usage
Basic Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
using Random = Pulumi.Random;
return await Deployment.RunAsync(() =>
{
var @default = new Random.RandomInteger("default", new()
{
Max = 99999,
Min = 10000,
});
var exampleProject = new AliCloud.Log.Project("exampleProject", new()
{
Description = "terraform-example",
});
var exampleStore = new AliCloud.Log.Store("exampleStore", new()
{
Project = exampleProject.Name,
RetentionPeriod = 3650,
ShardCount = 3,
AutoSplit = true,
MaxSplitShardCount = 60,
AppendMeta = true,
});
var exampleAlert = new AliCloud.Log.Alert("exampleAlert", new()
{
ProjectName = exampleProject.Name,
AlertName = "example-alert",
AlertDisplayname = "example-alert",
Condition = "count> 100",
Dashboard = "example-dashboard",
Schedule = new AliCloud.Log.Inputs.AlertScheduleArgs
{
Type = "FixedRate",
Interval = "5m",
Hour = 0,
DayOfWeek = 0,
Delay = 0,
RunImmediately = false,
},
QueryLists = new[]
{
new AliCloud.Log.Inputs.AlertQueryListArgs
{
Logstore = exampleStore.Name,
ChartTitle = "chart_title",
Start = "-60s",
End = "20s",
Query = "* AND aliyun",
},
},
NotificationLists = new[]
{
new AliCloud.Log.Inputs.AlertNotificationListArgs
{
Type = "SMS",
MobileLists = new[]
{
"12345678",
"87654321",
},
Content = "alert content",
},
new AliCloud.Log.Inputs.AlertNotificationListArgs
{
Type = "Email",
EmailLists = new[]
{
"aliyun@alibaba-inc.com",
"tf-example@123.com",
},
Content = "alert content",
},
new AliCloud.Log.Inputs.AlertNotificationListArgs
{
Type = "DingTalk",
ServiceUri = "www.aliyun.com",
Content = "alert content",
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/log"
"github.com/pulumi/pulumi-random/sdk/v4/go/random"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := random.NewRandomInteger(ctx, "default", &random.RandomIntegerArgs{
Max: pulumi.Int(99999),
Min: pulumi.Int(10000),
})
if err != nil {
return err
}
exampleProject, err := log.NewProject(ctx, "exampleProject", &log.ProjectArgs{
Description: pulumi.String("terraform-example"),
})
if err != nil {
return err
}
exampleStore, err := log.NewStore(ctx, "exampleStore", &log.StoreArgs{
Project: exampleProject.Name,
RetentionPeriod: pulumi.Int(3650),
ShardCount: pulumi.Int(3),
AutoSplit: pulumi.Bool(true),
MaxSplitShardCount: pulumi.Int(60),
AppendMeta: pulumi.Bool(true),
})
if err != nil {
return err
}
_, err = log.NewAlert(ctx, "exampleAlert", &log.AlertArgs{
ProjectName: exampleProject.Name,
AlertName: pulumi.String("example-alert"),
AlertDisplayname: pulumi.String("example-alert"),
Condition: pulumi.String("count> 100"),
Dashboard: pulumi.String("example-dashboard"),
Schedule: &log.AlertScheduleArgs{
Type: pulumi.String("FixedRate"),
Interval: pulumi.String("5m"),
Hour: pulumi.Int(0),
DayOfWeek: pulumi.Int(0),
Delay: pulumi.Int(0),
RunImmediately: pulumi.Bool(false),
},
QueryLists: log.AlertQueryListArray{
&log.AlertQueryListArgs{
Logstore: exampleStore.Name,
ChartTitle: pulumi.String("chart_title"),
Start: pulumi.String("-60s"),
End: pulumi.String("20s"),
Query: pulumi.String("* AND aliyun"),
},
},
NotificationLists: log.AlertNotificationListArray{
&log.AlertNotificationListArgs{
Type: pulumi.String("SMS"),
MobileLists: pulumi.StringArray{
pulumi.String("12345678"),
pulumi.String("87654321"),
},
Content: pulumi.String("alert content"),
},
&log.AlertNotificationListArgs{
Type: pulumi.String("Email"),
EmailLists: pulumi.StringArray{
pulumi.String("aliyun@alibaba-inc.com"),
pulumi.String("tf-example@123.com"),
},
Content: pulumi.String("alert content"),
},
&log.AlertNotificationListArgs{
Type: pulumi.String("DingTalk"),
ServiceUri: pulumi.String("www.aliyun.com"),
Content: pulumi.String("alert content"),
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.random.RandomInteger;
import com.pulumi.random.RandomIntegerArgs;
import com.pulumi.alicloud.log.Project;
import com.pulumi.alicloud.log.ProjectArgs;
import com.pulumi.alicloud.log.Store;
import com.pulumi.alicloud.log.StoreArgs;
import com.pulumi.alicloud.log.Alert;
import com.pulumi.alicloud.log.AlertArgs;
import com.pulumi.alicloud.log.inputs.AlertScheduleArgs;
import com.pulumi.alicloud.log.inputs.AlertQueryListArgs;
import com.pulumi.alicloud.log.inputs.AlertNotificationListArgs;
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) {
var default_ = new RandomInteger("default", RandomIntegerArgs.builder()
.max(99999)
.min(10000)
.build());
var exampleProject = new Project("exampleProject", ProjectArgs.builder()
.description("terraform-example")
.build());
var exampleStore = new Store("exampleStore", StoreArgs.builder()
.project(exampleProject.name())
.retentionPeriod(3650)
.shardCount(3)
.autoSplit(true)
.maxSplitShardCount(60)
.appendMeta(true)
.build());
var exampleAlert = new Alert("exampleAlert", AlertArgs.builder()
.projectName(exampleProject.name())
.alertName("example-alert")
.alertDisplayname("example-alert")
.condition("count> 100")
.dashboard("example-dashboard")
.schedule(AlertScheduleArgs.builder()
.type("FixedRate")
.interval("5m")
.hour(0)
.dayOfWeek(0)
.delay(0)
.runImmediately(false)
.build())
.queryLists(AlertQueryListArgs.builder()
.logstore(exampleStore.name())
.chartTitle("chart_title")
.start("-60s")
.end("20s")
.query("* AND aliyun")
.build())
.notificationLists(
AlertNotificationListArgs.builder()
.type("SMS")
.mobileLists(
"12345678",
"87654321")
.content("alert content")
.build(),
AlertNotificationListArgs.builder()
.type("Email")
.emailLists(
"aliyun@alibaba-inc.com",
"tf-example@123.com")
.content("alert content")
.build(),
AlertNotificationListArgs.builder()
.type("DingTalk")
.serviceUri("www.aliyun.com")
.content("alert content")
.build())
.build());
}
}
import pulumi
import pulumi_alicloud as alicloud
import pulumi_random as random
default = random.RandomInteger("default",
max=99999,
min=10000)
example_project = alicloud.log.Project("exampleProject", description="terraform-example")
example_store = alicloud.log.Store("exampleStore",
project=example_project.name,
retention_period=3650,
shard_count=3,
auto_split=True,
max_split_shard_count=60,
append_meta=True)
example_alert = alicloud.log.Alert("exampleAlert",
project_name=example_project.name,
alert_name="example-alert",
alert_displayname="example-alert",
condition="count> 100",
dashboard="example-dashboard",
schedule=alicloud.log.AlertScheduleArgs(
type="FixedRate",
interval="5m",
hour=0,
day_of_week=0,
delay=0,
run_immediately=False,
),
query_lists=[alicloud.log.AlertQueryListArgs(
logstore=example_store.name,
chart_title="chart_title",
start="-60s",
end="20s",
query="* AND aliyun",
)],
notification_lists=[
alicloud.log.AlertNotificationListArgs(
type="SMS",
mobile_lists=[
"12345678",
"87654321",
],
content="alert content",
),
alicloud.log.AlertNotificationListArgs(
type="Email",
email_lists=[
"aliyun@alibaba-inc.com",
"tf-example@123.com",
],
content="alert content",
),
alicloud.log.AlertNotificationListArgs(
type="DingTalk",
service_uri="www.aliyun.com",
content="alert content",
),
])
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
import * as random from "@pulumi/random";
const _default = new random.RandomInteger("default", {
max: 99999,
min: 10000,
});
const exampleProject = new alicloud.log.Project("exampleProject", {description: "terraform-example"});
const exampleStore = new alicloud.log.Store("exampleStore", {
project: exampleProject.name,
retentionPeriod: 3650,
shardCount: 3,
autoSplit: true,
maxSplitShardCount: 60,
appendMeta: true,
});
const exampleAlert = new alicloud.log.Alert("exampleAlert", {
projectName: exampleProject.name,
alertName: "example-alert",
alertDisplayname: "example-alert",
condition: "count> 100",
dashboard: "example-dashboard",
schedule: {
type: "FixedRate",
interval: "5m",
hour: 0,
dayOfWeek: 0,
delay: 0,
runImmediately: false,
},
queryLists: [{
logstore: exampleStore.name,
chartTitle: "chart_title",
start: "-60s",
end: "20s",
query: "* AND aliyun",
}],
notificationLists: [
{
type: "SMS",
mobileLists: [
"12345678",
"87654321",
],
content: "alert content",
},
{
type: "Email",
emailLists: [
"aliyun@alibaba-inc.com",
"tf-example@123.com",
],
content: "alert content",
},
{
type: "DingTalk",
serviceUri: "www.aliyun.com",
content: "alert content",
},
],
});
resources:
default:
type: random:RandomInteger
properties:
max: 99999
min: 10000
exampleProject:
type: alicloud:log:Project
properties:
description: terraform-example
exampleStore:
type: alicloud:log:Store
properties:
project: ${exampleProject.name}
retentionPeriod: 3650
shardCount: 3
autoSplit: true
maxSplitShardCount: 60
appendMeta: true
exampleAlert:
type: alicloud:log:Alert
properties:
projectName: ${exampleProject.name}
alertName: example-alert
alertDisplayname: example-alert
condition: count> 100
dashboard: example-dashboard
schedule:
type: FixedRate
interval: 5m
hour: 0
dayOfWeek: 0
delay: 0
runImmediately: false
queryLists:
- logstore: ${exampleStore.name}
chartTitle: chart_title
start: -60s
end: 20s
query: '* AND aliyun'
notificationLists:
- type: SMS
mobileLists:
- '12345678'
- '87654321'
content: alert content
- type: Email
emailLists:
- aliyun@alibaba-inc.com
- tf-example@123.com
content: alert content
- type: DingTalk
serviceUri: www.aliyun.com
content: alert content
Basic Usage for new alert
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
using Random = Pulumi.Random;
return await Deployment.RunAsync(() =>
{
var @default = new Random.RandomInteger("default", new()
{
Max = 99999,
Min = 10000,
});
var exampleProject = new AliCloud.Log.Project("exampleProject", new()
{
Description = "terraform-example",
});
var exampleStore = new AliCloud.Log.Store("exampleStore", new()
{
Project = exampleProject.Name,
RetentionPeriod = 3650,
ShardCount = 3,
AutoSplit = true,
MaxSplitShardCount = 60,
AppendMeta = true,
});
var example_2 = new AliCloud.Log.Alert("example-2", new()
{
Version = "2.0",
Type = "default",
ProjectName = exampleProject.Name,
AlertName = "example-alert",
AlertDisplayname = "example-alert",
MuteUntil = 1632486684,
NoDataFire = false,
NoDataSeverity = 8,
SendResolved = true,
AutoAnnotation = true,
Dashboard = "example-dashboard",
Schedule = new AliCloud.Log.Inputs.AlertScheduleArgs
{
Type = "FixedRate",
Interval = "5m",
Hour = 0,
DayOfWeek = 0,
Delay = 0,
RunImmediately = false,
},
QueryLists = new[]
{
new AliCloud.Log.Inputs.AlertQueryListArgs
{
Store = exampleStore.Name,
StoreType = "log",
Project = exampleProject.Name,
Region = "cn-heyuan",
ChartTitle = "chart_title",
Start = "-60s",
End = "20s",
Query = "* AND aliyun | select count(1) as cnt",
PowerSqlMode = "auto",
},
new AliCloud.Log.Inputs.AlertQueryListArgs
{
Store = exampleStore.Name,
StoreType = "log",
Project = exampleProject.Name,
Region = "cn-heyuan",
ChartTitle = "chart_title",
Start = "-60s",
End = "20s",
Query = "error | select count(1) as error_cnt",
PowerSqlMode = "enable",
},
},
Labels = new[]
{
new AliCloud.Log.Inputs.AlertLabelArgs
{
Key = "env",
Value = "test",
},
},
Annotations = new[]
{
new AliCloud.Log.Inputs.AlertAnnotationArgs
{
Key = "title",
Value = "alert title",
},
new AliCloud.Log.Inputs.AlertAnnotationArgs
{
Key = "desc",
Value = "alert desc",
},
new AliCloud.Log.Inputs.AlertAnnotationArgs
{
Key = "test_key",
Value = "test value",
},
},
GroupConfiguration = new AliCloud.Log.Inputs.AlertGroupConfigurationArgs
{
Type = "custom",
Fields = new[]
{
"cnt",
},
},
PolicyConfiguration = new AliCloud.Log.Inputs.AlertPolicyConfigurationArgs
{
AlertPolicyId = "sls.bultin",
ActionPolicyId = "sls_test_action",
RepeatInterval = "4h",
},
SeverityConfigurations = new[]
{
new AliCloud.Log.Inputs.AlertSeverityConfigurationArgs
{
Severity = 8,
EvalCondition =
{
{ "condition", "cnt > 3" },
{ "count_condition", "__count__ > 3" },
},
},
new AliCloud.Log.Inputs.AlertSeverityConfigurationArgs
{
Severity = 6,
EvalCondition =
{
{ "condition", "" },
{ "count_condition", "__count__ > 0" },
},
},
new AliCloud.Log.Inputs.AlertSeverityConfigurationArgs
{
Severity = 2,
EvalCondition =
{
{ "condition", "" },
{ "count_condition", "" },
},
},
},
JoinConfigurations = new[]
{
new AliCloud.Log.Inputs.AlertJoinConfigurationArgs
{
Type = "cross_join",
Condition = "",
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/log"
"github.com/pulumi/pulumi-random/sdk/v4/go/random"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := random.NewRandomInteger(ctx, "default", &random.RandomIntegerArgs{
Max: pulumi.Int(99999),
Min: pulumi.Int(10000),
})
if err != nil {
return err
}
exampleProject, err := log.NewProject(ctx, "exampleProject", &log.ProjectArgs{
Description: pulumi.String("terraform-example"),
})
if err != nil {
return err
}
exampleStore, err := log.NewStore(ctx, "exampleStore", &log.StoreArgs{
Project: exampleProject.Name,
RetentionPeriod: pulumi.Int(3650),
ShardCount: pulumi.Int(3),
AutoSplit: pulumi.Bool(true),
MaxSplitShardCount: pulumi.Int(60),
AppendMeta: pulumi.Bool(true),
})
if err != nil {
return err
}
_, err = log.NewAlert(ctx, "example-2", &log.AlertArgs{
Version: pulumi.String("2.0"),
Type: pulumi.String("default"),
ProjectName: exampleProject.Name,
AlertName: pulumi.String("example-alert"),
AlertDisplayname: pulumi.String("example-alert"),
MuteUntil: pulumi.Int(1632486684),
NoDataFire: pulumi.Bool(false),
NoDataSeverity: pulumi.Int(8),
SendResolved: pulumi.Bool(true),
AutoAnnotation: pulumi.Bool(true),
Dashboard: pulumi.String("example-dashboard"),
Schedule: &log.AlertScheduleArgs{
Type: pulumi.String("FixedRate"),
Interval: pulumi.String("5m"),
Hour: pulumi.Int(0),
DayOfWeek: pulumi.Int(0),
Delay: pulumi.Int(0),
RunImmediately: pulumi.Bool(false),
},
QueryLists: log.AlertQueryListArray{
&log.AlertQueryListArgs{
Store: exampleStore.Name,
StoreType: pulumi.String("log"),
Project: exampleProject.Name,
Region: pulumi.String("cn-heyuan"),
ChartTitle: pulumi.String("chart_title"),
Start: pulumi.String("-60s"),
End: pulumi.String("20s"),
Query: pulumi.String("* AND aliyun | select count(1) as cnt"),
PowerSqlMode: pulumi.String("auto"),
},
&log.AlertQueryListArgs{
Store: exampleStore.Name,
StoreType: pulumi.String("log"),
Project: exampleProject.Name,
Region: pulumi.String("cn-heyuan"),
ChartTitle: pulumi.String("chart_title"),
Start: pulumi.String("-60s"),
End: pulumi.String("20s"),
Query: pulumi.String("error | select count(1) as error_cnt"),
PowerSqlMode: pulumi.String("enable"),
},
},
Labels: log.AlertLabelArray{
&log.AlertLabelArgs{
Key: pulumi.String("env"),
Value: pulumi.String("test"),
},
},
Annotations: log.AlertAnnotationArray{
&log.AlertAnnotationArgs{
Key: pulumi.String("title"),
Value: pulumi.String("alert title"),
},
&log.AlertAnnotationArgs{
Key: pulumi.String("desc"),
Value: pulumi.String("alert desc"),
},
&log.AlertAnnotationArgs{
Key: pulumi.String("test_key"),
Value: pulumi.String("test value"),
},
},
GroupConfiguration: &log.AlertGroupConfigurationArgs{
Type: pulumi.String("custom"),
Fields: pulumi.StringArray{
pulumi.String("cnt"),
},
},
PolicyConfiguration: &log.AlertPolicyConfigurationArgs{
AlertPolicyId: pulumi.String("sls.bultin"),
ActionPolicyId: pulumi.String("sls_test_action"),
RepeatInterval: pulumi.String("4h"),
},
SeverityConfigurations: log.AlertSeverityConfigurationArray{
&log.AlertSeverityConfigurationArgs{
Severity: pulumi.Int(8),
EvalCondition: pulumi.StringMap{
"condition": pulumi.String("cnt > 3"),
"count_condition": pulumi.String("__count__ > 3"),
},
},
&log.AlertSeverityConfigurationArgs{
Severity: pulumi.Int(6),
EvalCondition: pulumi.StringMap{
"condition": pulumi.String(""),
"count_condition": pulumi.String("__count__ > 0"),
},
},
&log.AlertSeverityConfigurationArgs{
Severity: pulumi.Int(2),
EvalCondition: pulumi.StringMap{
"condition": pulumi.String(""),
"count_condition": pulumi.String(""),
},
},
},
JoinConfigurations: log.AlertJoinConfigurationArray{
&log.AlertJoinConfigurationArgs{
Type: pulumi.String("cross_join"),
Condition: pulumi.String(""),
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.random.RandomInteger;
import com.pulumi.random.RandomIntegerArgs;
import com.pulumi.alicloud.log.Project;
import com.pulumi.alicloud.log.ProjectArgs;
import com.pulumi.alicloud.log.Store;
import com.pulumi.alicloud.log.StoreArgs;
import com.pulumi.alicloud.log.Alert;
import com.pulumi.alicloud.log.AlertArgs;
import com.pulumi.alicloud.log.inputs.AlertScheduleArgs;
import com.pulumi.alicloud.log.inputs.AlertQueryListArgs;
import com.pulumi.alicloud.log.inputs.AlertLabelArgs;
import com.pulumi.alicloud.log.inputs.AlertAnnotationArgs;
import com.pulumi.alicloud.log.inputs.AlertGroupConfigurationArgs;
import com.pulumi.alicloud.log.inputs.AlertPolicyConfigurationArgs;
import com.pulumi.alicloud.log.inputs.AlertSeverityConfigurationArgs;
import com.pulumi.alicloud.log.inputs.AlertJoinConfigurationArgs;
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) {
var default_ = new RandomInteger("default", RandomIntegerArgs.builder()
.max(99999)
.min(10000)
.build());
var exampleProject = new Project("exampleProject", ProjectArgs.builder()
.description("terraform-example")
.build());
var exampleStore = new Store("exampleStore", StoreArgs.builder()
.project(exampleProject.name())
.retentionPeriod(3650)
.shardCount(3)
.autoSplit(true)
.maxSplitShardCount(60)
.appendMeta(true)
.build());
var example_2 = new Alert("example-2", AlertArgs.builder()
.version("2.0")
.type("default")
.projectName(exampleProject.name())
.alertName("example-alert")
.alertDisplayname("example-alert")
.muteUntil("1632486684")
.noDataFire("false")
.noDataSeverity(8)
.sendResolved(true)
.autoAnnotation(true)
.dashboard("example-dashboard")
.schedule(AlertScheduleArgs.builder()
.type("FixedRate")
.interval("5m")
.hour(0)
.dayOfWeek(0)
.delay(0)
.runImmediately(false)
.build())
.queryLists(
AlertQueryListArgs.builder()
.store(exampleStore.name())
.storeType("log")
.project(exampleProject.name())
.region("cn-heyuan")
.chartTitle("chart_title")
.start("-60s")
.end("20s")
.query("* AND aliyun | select count(1) as cnt")
.powerSqlMode("auto")
.build(),
AlertQueryListArgs.builder()
.store(exampleStore.name())
.storeType("log")
.project(exampleProject.name())
.region("cn-heyuan")
.chartTitle("chart_title")
.start("-60s")
.end("20s")
.query("error | select count(1) as error_cnt")
.powerSqlMode("enable")
.build())
.labels(AlertLabelArgs.builder()
.key("env")
.value("test")
.build())
.annotations(
AlertAnnotationArgs.builder()
.key("title")
.value("alert title")
.build(),
AlertAnnotationArgs.builder()
.key("desc")
.value("alert desc")
.build(),
AlertAnnotationArgs.builder()
.key("test_key")
.value("test value")
.build())
.groupConfiguration(AlertGroupConfigurationArgs.builder()
.type("custom")
.fields("cnt")
.build())
.policyConfiguration(AlertPolicyConfigurationArgs.builder()
.alertPolicyId("sls.bultin")
.actionPolicyId("sls_test_action")
.repeatInterval("4h")
.build())
.severityConfigurations(
AlertSeverityConfigurationArgs.builder()
.severity(8)
.evalCondition(Map.ofEntries(
Map.entry("condition", "cnt > 3"),
Map.entry("count_condition", "__count__ > 3")
))
.build(),
AlertSeverityConfigurationArgs.builder()
.severity(6)
.evalCondition(Map.ofEntries(
Map.entry("condition", ""),
Map.entry("count_condition", "__count__ > 0")
))
.build(),
AlertSeverityConfigurationArgs.builder()
.severity(2)
.evalCondition(Map.ofEntries(
Map.entry("condition", ""),
Map.entry("count_condition", "")
))
.build())
.joinConfigurations(AlertJoinConfigurationArgs.builder()
.type("cross_join")
.condition("")
.build())
.build());
}
}
import pulumi
import pulumi_alicloud as alicloud
import pulumi_random as random
default = random.RandomInteger("default",
max=99999,
min=10000)
example_project = alicloud.log.Project("exampleProject", description="terraform-example")
example_store = alicloud.log.Store("exampleStore",
project=example_project.name,
retention_period=3650,
shard_count=3,
auto_split=True,
max_split_shard_count=60,
append_meta=True)
example_2 = alicloud.log.Alert("example-2",
version="2.0",
type="default",
project_name=example_project.name,
alert_name="example-alert",
alert_displayname="example-alert",
mute_until=1632486684,
no_data_fire=False,
no_data_severity=8,
send_resolved=True,
auto_annotation=True,
dashboard="example-dashboard",
schedule=alicloud.log.AlertScheduleArgs(
type="FixedRate",
interval="5m",
hour=0,
day_of_week=0,
delay=0,
run_immediately=False,
),
query_lists=[
alicloud.log.AlertQueryListArgs(
store=example_store.name,
store_type="log",
project=example_project.name,
region="cn-heyuan",
chart_title="chart_title",
start="-60s",
end="20s",
query="* AND aliyun | select count(1) as cnt",
power_sql_mode="auto",
),
alicloud.log.AlertQueryListArgs(
store=example_store.name,
store_type="log",
project=example_project.name,
region="cn-heyuan",
chart_title="chart_title",
start="-60s",
end="20s",
query="error | select count(1) as error_cnt",
power_sql_mode="enable",
),
],
labels=[alicloud.log.AlertLabelArgs(
key="env",
value="test",
)],
annotations=[
alicloud.log.AlertAnnotationArgs(
key="title",
value="alert title",
),
alicloud.log.AlertAnnotationArgs(
key="desc",
value="alert desc",
),
alicloud.log.AlertAnnotationArgs(
key="test_key",
value="test value",
),
],
group_configuration=alicloud.log.AlertGroupConfigurationArgs(
type="custom",
fields=["cnt"],
),
policy_configuration=alicloud.log.AlertPolicyConfigurationArgs(
alert_policy_id="sls.bultin",
action_policy_id="sls_test_action",
repeat_interval="4h",
),
severity_configurations=[
alicloud.log.AlertSeverityConfigurationArgs(
severity=8,
eval_condition={
"condition": "cnt > 3",
"count_condition": "__count__ > 3",
},
),
alicloud.log.AlertSeverityConfigurationArgs(
severity=6,
eval_condition={
"condition": "",
"count_condition": "__count__ > 0",
},
),
alicloud.log.AlertSeverityConfigurationArgs(
severity=2,
eval_condition={
"condition": "",
"count_condition": "",
},
),
],
join_configurations=[alicloud.log.AlertJoinConfigurationArgs(
type="cross_join",
condition="",
)])
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
import * as random from "@pulumi/random";
const _default = new random.RandomInteger("default", {
max: 99999,
min: 10000,
});
const exampleProject = new alicloud.log.Project("exampleProject", {description: "terraform-example"});
const exampleStore = new alicloud.log.Store("exampleStore", {
project: exampleProject.name,
retentionPeriod: 3650,
shardCount: 3,
autoSplit: true,
maxSplitShardCount: 60,
appendMeta: true,
});
const example_2 = new alicloud.log.Alert("example-2", {
version: "2.0",
type: "default",
projectName: exampleProject.name,
alertName: "example-alert",
alertDisplayname: "example-alert",
muteUntil: 1632486684,
noDataFire: false,
noDataSeverity: 8,
sendResolved: true,
autoAnnotation: true,
dashboard: "example-dashboard",
schedule: {
type: "FixedRate",
interval: "5m",
hour: 0,
dayOfWeek: 0,
delay: 0,
runImmediately: false,
},
queryLists: [
{
store: exampleStore.name,
storeType: "log",
project: exampleProject.name,
region: "cn-heyuan",
chartTitle: "chart_title",
start: "-60s",
end: "20s",
query: "* AND aliyun | select count(1) as cnt",
powerSqlMode: "auto",
},
{
store: exampleStore.name,
storeType: "log",
project: exampleProject.name,
region: "cn-heyuan",
chartTitle: "chart_title",
start: "-60s",
end: "20s",
query: "error | select count(1) as error_cnt",
powerSqlMode: "enable",
},
],
labels: [{
key: "env",
value: "test",
}],
annotations: [
{
key: "title",
value: "alert title",
},
{
key: "desc",
value: "alert desc",
},
{
key: "test_key",
value: "test value",
},
],
groupConfiguration: {
type: "custom",
fields: ["cnt"],
},
policyConfiguration: {
alertPolicyId: "sls.bultin",
actionPolicyId: "sls_test_action",
repeatInterval: "4h",
},
severityConfigurations: [
{
severity: 8,
evalCondition: {
condition: "cnt > 3",
count_condition: "__count__ > 3",
},
},
{
severity: 6,
evalCondition: {
condition: "",
count_condition: "__count__ > 0",
},
},
{
severity: 2,
evalCondition: {
condition: "",
count_condition: "",
},
},
],
joinConfigurations: [{
type: "cross_join",
condition: "",
}],
});
resources:
default:
type: random:RandomInteger
properties:
max: 99999
min: 10000
exampleProject:
type: alicloud:log:Project
properties:
description: terraform-example
exampleStore:
type: alicloud:log:Store
properties:
project: ${exampleProject.name}
retentionPeriod: 3650
shardCount: 3
autoSplit: true
maxSplitShardCount: 60
appendMeta: true
example-2:
type: alicloud:log:Alert
properties:
version: '2.0'
type: default
projectName: ${exampleProject.name}
alertName: example-alert
alertDisplayname: example-alert
muteUntil: '1632486684'
noDataFire: 'false'
noDataSeverity: 8
sendResolved: true
autoAnnotation: true
dashboard: example-dashboard
schedule:
type: FixedRate
interval: 5m
hour: 0
dayOfWeek: 0
delay: 0
runImmediately: false
queryLists:
- store: ${exampleStore.name}
storeType: log
project: ${exampleProject.name}
region: cn-heyuan
chartTitle: chart_title
start: -60s
end: 20s
query: '* AND aliyun | select count(1) as cnt'
powerSqlMode: auto
- store: ${exampleStore.name}
storeType: log
project: ${exampleProject.name}
region: cn-heyuan
chartTitle: chart_title
start: -60s
end: 20s
query: error | select count(1) as error_cnt
powerSqlMode: enable
labels:
- key: env
value: test
annotations:
- key: title
value: alert title
- key: desc
value: alert desc
- key: test_key
value: test value
groupConfiguration:
type: custom
fields:
- cnt
policyConfiguration:
alertPolicyId: sls.bultin
actionPolicyId: sls_test_action
repeatInterval: 4h
severityConfigurations:
- severity: 8
evalCondition:
condition: cnt > 3
count_condition: __count__ > 3
- severity: 6
evalCondition:
condition:
count_condition: __count__ > 0
- severity: 2
evalCondition:
condition:
count_condition:
joinConfigurations:
- type: cross_join
condition:
Basic Usage for alert template
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
using Random = Pulumi.Random;
return await Deployment.RunAsync(() =>
{
var @default = new Random.RandomInteger("default", new()
{
Max = 99999,
Min = 10000,
});
var exampleProject = new AliCloud.Log.Project("exampleProject", new()
{
Description = "terraform-example",
});
var exampleStore = new AliCloud.Log.Store("exampleStore", new()
{
Project = exampleProject.Name,
RetentionPeriod = 3650,
ShardCount = 3,
AutoSplit = true,
MaxSplitShardCount = 60,
AppendMeta = true,
});
var example_3 = new AliCloud.Log.Alert("example-3", new()
{
Version = "2.0",
Type = "tpl",
ProjectName = exampleProject.Name,
AlertName = "example-alert",
AlertDisplayname = "example-alert",
MuteUntil = 1632486684,
Schedule = new AliCloud.Log.Inputs.AlertScheduleArgs
{
Type = "FixedRate",
Interval = "5m",
Hour = 0,
DayOfWeek = 0,
Delay = 0,
RunImmediately = false,
},
TemplateConfiguration = new AliCloud.Log.Inputs.AlertTemplateConfigurationArgs
{
Id = "sls.app.sls_ack.node.down",
Type = "sys",
Lang = "cn",
Annotations = null,
Tokens =
{
{ "interval_minute", "5" },
{ "default.action_policy", "sls.app.ack.builtin" },
{ "default.severity", "6" },
{ "sendResolved", "false" },
{ "default.project", exampleProject.Name },
{ "default.logstore", "k8s-event" },
{ "default.repeatInterval", "4h" },
{ "trigger_threshold", "1" },
{ "default.clusterId", "example-cluster-id" },
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/log"
"github.com/pulumi/pulumi-random/sdk/v4/go/random"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := random.NewRandomInteger(ctx, "default", &random.RandomIntegerArgs{
Max: pulumi.Int(99999),
Min: pulumi.Int(10000),
})
if err != nil {
return err
}
exampleProject, err := log.NewProject(ctx, "exampleProject", &log.ProjectArgs{
Description: pulumi.String("terraform-example"),
})
if err != nil {
return err
}
_, err = log.NewStore(ctx, "exampleStore", &log.StoreArgs{
Project: exampleProject.Name,
RetentionPeriod: pulumi.Int(3650),
ShardCount: pulumi.Int(3),
AutoSplit: pulumi.Bool(true),
MaxSplitShardCount: pulumi.Int(60),
AppendMeta: pulumi.Bool(true),
})
if err != nil {
return err
}
_, err = log.NewAlert(ctx, "example-3", &log.AlertArgs{
Version: pulumi.String("2.0"),
Type: pulumi.String("tpl"),
ProjectName: exampleProject.Name,
AlertName: pulumi.String("example-alert"),
AlertDisplayname: pulumi.String("example-alert"),
MuteUntil: pulumi.Int(1632486684),
Schedule: &log.AlertScheduleArgs{
Type: pulumi.String("FixedRate"),
Interval: pulumi.String("5m"),
Hour: pulumi.Int(0),
DayOfWeek: pulumi.Int(0),
Delay: pulumi.Int(0),
RunImmediately: pulumi.Bool(false),
},
TemplateConfiguration: &log.AlertTemplateConfigurationArgs{
Id: pulumi.String("sls.app.sls_ack.node.down"),
Type: pulumi.String("sys"),
Lang: pulumi.String("cn"),
Annotations: nil,
Tokens: pulumi.StringMap{
"interval_minute": pulumi.String("5"),
"default.action_policy": pulumi.String("sls.app.ack.builtin"),
"default.severity": pulumi.String("6"),
"sendResolved": pulumi.String("false"),
"default.project": exampleProject.Name,
"default.logstore": pulumi.String("k8s-event"),
"default.repeatInterval": pulumi.String("4h"),
"trigger_threshold": pulumi.String("1"),
"default.clusterId": pulumi.String("example-cluster-id"),
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.random.RandomInteger;
import com.pulumi.random.RandomIntegerArgs;
import com.pulumi.alicloud.log.Project;
import com.pulumi.alicloud.log.ProjectArgs;
import com.pulumi.alicloud.log.Store;
import com.pulumi.alicloud.log.StoreArgs;
import com.pulumi.alicloud.log.Alert;
import com.pulumi.alicloud.log.AlertArgs;
import com.pulumi.alicloud.log.inputs.AlertScheduleArgs;
import com.pulumi.alicloud.log.inputs.AlertTemplateConfigurationArgs;
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) {
var default_ = new RandomInteger("default", RandomIntegerArgs.builder()
.max(99999)
.min(10000)
.build());
var exampleProject = new Project("exampleProject", ProjectArgs.builder()
.description("terraform-example")
.build());
var exampleStore = new Store("exampleStore", StoreArgs.builder()
.project(exampleProject.name())
.retentionPeriod(3650)
.shardCount(3)
.autoSplit(true)
.maxSplitShardCount(60)
.appendMeta(true)
.build());
var example_3 = new Alert("example-3", AlertArgs.builder()
.version("2.0")
.type("tpl")
.projectName(exampleProject.name())
.alertName("example-alert")
.alertDisplayname("example-alert")
.muteUntil("1632486684")
.schedule(AlertScheduleArgs.builder()
.type("FixedRate")
.interval("5m")
.hour(0)
.dayOfWeek(0)
.delay(0)
.runImmediately(false)
.build())
.templateConfiguration(AlertTemplateConfigurationArgs.builder()
.id("sls.app.sls_ack.node.down")
.type("sys")
.lang("cn")
.annotations()
.tokens(Map.ofEntries(
Map.entry("interval_minute", "5"),
Map.entry("default.action_policy", "sls.app.ack.builtin"),
Map.entry("default.severity", "6"),
Map.entry("sendResolved", "false"),
Map.entry("default.project", exampleProject.name()),
Map.entry("default.logstore", "k8s-event"),
Map.entry("default.repeatInterval", "4h"),
Map.entry("trigger_threshold", "1"),
Map.entry("default.clusterId", "example-cluster-id")
))
.build())
.build());
}
}
import pulumi
import pulumi_alicloud as alicloud
import pulumi_random as random
default = random.RandomInteger("default",
max=99999,
min=10000)
example_project = alicloud.log.Project("exampleProject", description="terraform-example")
example_store = alicloud.log.Store("exampleStore",
project=example_project.name,
retention_period=3650,
shard_count=3,
auto_split=True,
max_split_shard_count=60,
append_meta=True)
example_3 = alicloud.log.Alert("example-3",
version="2.0",
type="tpl",
project_name=example_project.name,
alert_name="example-alert",
alert_displayname="example-alert",
mute_until=1632486684,
schedule=alicloud.log.AlertScheduleArgs(
type="FixedRate",
interval="5m",
hour=0,
day_of_week=0,
delay=0,
run_immediately=False,
),
template_configuration=alicloud.log.AlertTemplateConfigurationArgs(
id="sls.app.sls_ack.node.down",
type="sys",
lang="cn",
annotations={},
tokens={
"interval_minute": "5",
"default.action_policy": "sls.app.ack.builtin",
"default.severity": "6",
"sendResolved": "false",
"default.project": example_project.name,
"default.logstore": "k8s-event",
"default.repeatInterval": "4h",
"trigger_threshold": "1",
"default.clusterId": "example-cluster-id",
},
))
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
import * as random from "@pulumi/random";
const _default = new random.RandomInteger("default", {
max: 99999,
min: 10000,
});
const exampleProject = new alicloud.log.Project("exampleProject", {description: "terraform-example"});
const exampleStore = new alicloud.log.Store("exampleStore", {
project: exampleProject.name,
retentionPeriod: 3650,
shardCount: 3,
autoSplit: true,
maxSplitShardCount: 60,
appendMeta: true,
});
const example_3 = new alicloud.log.Alert("example-3", {
version: "2.0",
type: "tpl",
projectName: exampleProject.name,
alertName: "example-alert",
alertDisplayname: "example-alert",
muteUntil: 1632486684,
schedule: {
type: "FixedRate",
interval: "5m",
hour: 0,
dayOfWeek: 0,
delay: 0,
runImmediately: false,
},
templateConfiguration: {
id: "sls.app.sls_ack.node.down",
type: "sys",
lang: "cn",
annotations: {},
tokens: {
interval_minute: "5",
"default.action_policy": "sls.app.ack.builtin",
"default.severity": "6",
sendResolved: "false",
"default.project": exampleProject.name,
"default.logstore": "k8s-event",
"default.repeatInterval": "4h",
trigger_threshold: "1",
"default.clusterId": "example-cluster-id",
},
},
});
resources:
default:
type: random:RandomInteger
properties:
max: 99999
min: 10000
exampleProject:
type: alicloud:log:Project
properties:
description: terraform-example
exampleStore:
type: alicloud:log:Store
properties:
project: ${exampleProject.name}
retentionPeriod: 3650
shardCount: 3
autoSplit: true
maxSplitShardCount: 60
appendMeta: true
example-3:
type: alicloud:log:Alert
properties:
version: '2.0'
type: tpl
projectName: ${exampleProject.name}
alertName: example-alert
alertDisplayname: example-alert
muteUntil: '1632486684'
schedule:
type: FixedRate
interval: 5m
hour: 0
dayOfWeek: 0
delay: 0
runImmediately: false
templateConfiguration:
id: sls.app.sls_ack.node.down
type: sys
lang: cn
annotations: {}
tokens:
interval_minute: '5'
default.action_policy: sls.app.ack.builtin
default.severity: '6'
sendResolved: 'false'
default.project: ${exampleProject.name}
default.logstore: k8s-event
default.repeatInterval: 4h
trigger_threshold: '1'
default.clusterId: example-cluster-id
Create Alert Resource
new Alert(name: string, args: AlertArgs, opts?: CustomResourceOptions);
@overload
def Alert(resource_name: str,
opts: Optional[ResourceOptions] = None,
alert_description: Optional[str] = None,
alert_displayname: Optional[str] = None,
alert_name: Optional[str] = None,
annotations: Optional[Sequence[AlertAnnotationArgs]] = None,
auto_annotation: Optional[bool] = None,
condition: Optional[str] = None,
dashboard: Optional[str] = None,
group_configuration: Optional[AlertGroupConfigurationArgs] = None,
join_configurations: Optional[Sequence[AlertJoinConfigurationArgs]] = None,
labels: Optional[Sequence[AlertLabelArgs]] = None,
mute_until: Optional[int] = None,
no_data_fire: Optional[bool] = None,
no_data_severity: Optional[int] = None,
notification_lists: Optional[Sequence[AlertNotificationListArgs]] = None,
notify_threshold: Optional[int] = None,
policy_configuration: Optional[AlertPolicyConfigurationArgs] = None,
project_name: Optional[str] = None,
query_lists: Optional[Sequence[AlertQueryListArgs]] = None,
schedule: Optional[AlertScheduleArgs] = None,
schedule_interval: Optional[str] = None,
schedule_type: Optional[str] = None,
send_resolved: Optional[bool] = None,
severity_configurations: Optional[Sequence[AlertSeverityConfigurationArgs]] = None,
template_configuration: Optional[AlertTemplateConfigurationArgs] = None,
threshold: Optional[int] = None,
throttling: Optional[str] = None,
type: Optional[str] = None,
version: Optional[str] = None)
@overload
def Alert(resource_name: str,
args: AlertArgs,
opts: Optional[ResourceOptions] = None)
func NewAlert(ctx *Context, name string, args AlertArgs, opts ...ResourceOption) (*Alert, error)
public Alert(string name, AlertArgs args, CustomResourceOptions? opts = null)
type: alicloud:log:Alert
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AlertArgs
- 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 AlertArgs
- 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 AlertArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AlertArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AlertArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Alert Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Alert resource accepts the following input properties:
- Alert
Displayname string Alert displayname.
- Alert
Name string Name of logstore for configuring alarm service.
- Project
Name string The project name.
- Alert
Description string Alert description.
- Annotations
List<Pulumi.
Ali Cloud. Log. Inputs. Alert Annotation> Alert template annotations.
- Auto
Annotation bool whether to add automatic annotation, default is false.
- Condition string
Join condition.
Deprecated from 1.161.0+, use eval_condition in severity_configurations
- Dashboard string
Deprecated from 1.161.0+, use dashboardId in query_list
- Group
Configuration Pulumi.Ali Cloud. Log. Inputs. Alert Group Configuration Group configuration for new alert.
- Join
Configurations List<Pulumi.Ali Cloud. Log. Inputs. Alert Join Configuration> Join configuration for different queries.
- Labels
List<Pulumi.
Ali Cloud. Log. Inputs. Alert Label> Labels for new alert.
- Mute
Until int Timestamp, notifications before closing again.
- No
Data boolFire Switch for whether new alert fires when no data happens, default is false.
- No
Data intSeverity when no data happens, the severity of new alert.
- Notification
Lists List<Pulumi.Ali Cloud. Log. Inputs. Alert Notification List> Alarm information notification list, Deprecated from 1.161.0+.
Deprecated from 1.161.0+, use policy_configuration for notification
- Notify
Threshold int Notification threshold, which is not notified until the number of triggers is reached. The default is 1, Deprecated from 1.161.0+.
Deprecated from 1.161.0+, use threshold
- Policy
Configuration Pulumi.Ali Cloud. Log. Inputs. Alert Policy Configuration Policy configuration for new alert.
- Query
Lists List<Pulumi.Ali Cloud. Log. Inputs. Alert Query List> Multiple conditions for configured alarm query.
- Schedule
Pulumi.
Ali Cloud. Log. Inputs. Alert Schedule schedule for alert.
- Schedule
Interval string Execution interval. 60 seconds minimum, such as 60s, 1h. Deprecated from 1.176.0+. use interval in schedule.
Field 'schedule_interval' has been deprecated from provider version 1.176.0. New field 'schedule' instead.
- Schedule
Type string Default FixedRate. No need to configure this parameter. Deprecated from 1.176.0+. use type in schedule.
Field 'schedule_type' has been deprecated from provider version 1.176.0. New field 'schedule' instead.
- Send
Resolved bool when new alert is resolved, whether to notify, default is false.
- Severity
Configurations List<Pulumi.Ali Cloud. Log. Inputs. Alert Severity Configuration> Severity configuration for new alert.
- Template
Configuration Pulumi.Ali Cloud. Log. Inputs. Alert Template Configuration Template configuration for alert, when
type
istpl
.- Threshold int
Evaluation threshold, alert will not fire until the number of triggers is reached. The default is 1.
- Throttling string
Notification interval, default is no interval. Support number + unit type, for example 60s, 1h, Deprecated from 1.161.0+.
Deprecated from 1.161.0+, use repeat_interval in policy_configuration
- Type string
including FixedRate,Hourly,Daily,Weekly,Cron.
- Version string
The version of alert, new alert is 2.0.
- Alert
Displayname string Alert displayname.
- Alert
Name string Name of logstore for configuring alarm service.
- Project
Name string The project name.
- Alert
Description string Alert description.
- Annotations
[]Alert
Annotation Args Alert template annotations.
- Auto
Annotation bool whether to add automatic annotation, default is false.
- Condition string
Join condition.
Deprecated from 1.161.0+, use eval_condition in severity_configurations
- Dashboard string
Deprecated from 1.161.0+, use dashboardId in query_list
- Group
Configuration AlertGroup Configuration Args Group configuration for new alert.
- Join
Configurations []AlertJoin Configuration Args Join configuration for different queries.
- Labels
[]Alert
Label Args Labels for new alert.
- Mute
Until int Timestamp, notifications before closing again.
- No
Data boolFire Switch for whether new alert fires when no data happens, default is false.
- No
Data intSeverity when no data happens, the severity of new alert.
- Notification
Lists []AlertNotification List Args Alarm information notification list, Deprecated from 1.161.0+.
Deprecated from 1.161.0+, use policy_configuration for notification
- Notify
Threshold int Notification threshold, which is not notified until the number of triggers is reached. The default is 1, Deprecated from 1.161.0+.
Deprecated from 1.161.0+, use threshold
- Policy
Configuration AlertPolicy Configuration Args Policy configuration for new alert.
- Query
Lists []AlertQuery List Args Multiple conditions for configured alarm query.
- Schedule
Alert
Schedule Args schedule for alert.
- Schedule
Interval string Execution interval. 60 seconds minimum, such as 60s, 1h. Deprecated from 1.176.0+. use interval in schedule.
Field 'schedule_interval' has been deprecated from provider version 1.176.0. New field 'schedule' instead.
- Schedule
Type string Default FixedRate. No need to configure this parameter. Deprecated from 1.176.0+. use type in schedule.
Field 'schedule_type' has been deprecated from provider version 1.176.0. New field 'schedule' instead.
- Send
Resolved bool when new alert is resolved, whether to notify, default is false.
- Severity
Configurations []AlertSeverity Configuration Args Severity configuration for new alert.
- Template
Configuration AlertTemplate Configuration Args Template configuration for alert, when
type
istpl
.- Threshold int
Evaluation threshold, alert will not fire until the number of triggers is reached. The default is 1.
- Throttling string
Notification interval, default is no interval. Support number + unit type, for example 60s, 1h, Deprecated from 1.161.0+.
Deprecated from 1.161.0+, use repeat_interval in policy_configuration
- Type string
including FixedRate,Hourly,Daily,Weekly,Cron.
- Version string
The version of alert, new alert is 2.0.
- alert
Displayname String Alert displayname.
- alert
Name String Name of logstore for configuring alarm service.
- project
Name String The project name.
- alert
Description String Alert description.
- annotations
List<Alert
Annotation> Alert template annotations.
- auto
Annotation Boolean whether to add automatic annotation, default is false.
- condition String
Join condition.
Deprecated from 1.161.0+, use eval_condition in severity_configurations
- dashboard String
Deprecated from 1.161.0+, use dashboardId in query_list
- group
Configuration AlertGroup Configuration Group configuration for new alert.
- join
Configurations List<AlertJoin Configuration> Join configuration for different queries.
- labels
List<Alert
Label> Labels for new alert.
- mute
Until Integer Timestamp, notifications before closing again.
- no
Data BooleanFire Switch for whether new alert fires when no data happens, default is false.
- no
Data IntegerSeverity when no data happens, the severity of new alert.
- notification
Lists List<AlertNotification List> Alarm information notification list, Deprecated from 1.161.0+.
Deprecated from 1.161.0+, use policy_configuration for notification
- notify
Threshold Integer Notification threshold, which is not notified until the number of triggers is reached. The default is 1, Deprecated from 1.161.0+.
Deprecated from 1.161.0+, use threshold
- policy
Configuration AlertPolicy Configuration Policy configuration for new alert.
- query
Lists List<AlertQuery List> Multiple conditions for configured alarm query.
- schedule
Alert
Schedule schedule for alert.
- schedule
Interval String Execution interval. 60 seconds minimum, such as 60s, 1h. Deprecated from 1.176.0+. use interval in schedule.
Field 'schedule_interval' has been deprecated from provider version 1.176.0. New field 'schedule' instead.
- schedule
Type String Default FixedRate. No need to configure this parameter. Deprecated from 1.176.0+. use type in schedule.
Field 'schedule_type' has been deprecated from provider version 1.176.0. New field 'schedule' instead.
- send
Resolved Boolean when new alert is resolved, whether to notify, default is false.
- severity
Configurations List<AlertSeverity Configuration> Severity configuration for new alert.
- template
Configuration AlertTemplate Configuration Template configuration for alert, when
type
istpl
.- threshold Integer
Evaluation threshold, alert will not fire until the number of triggers is reached. The default is 1.
- throttling String
Notification interval, default is no interval. Support number + unit type, for example 60s, 1h, Deprecated from 1.161.0+.
Deprecated from 1.161.0+, use repeat_interval in policy_configuration
- type String
including FixedRate,Hourly,Daily,Weekly,Cron.
- version String
The version of alert, new alert is 2.0.
- alert
Displayname string Alert displayname.
- alert
Name string Name of logstore for configuring alarm service.
- project
Name string The project name.
- alert
Description string Alert description.
- annotations
Alert
Annotation[] Alert template annotations.
- auto
Annotation boolean whether to add automatic annotation, default is false.
- condition string
Join condition.
Deprecated from 1.161.0+, use eval_condition in severity_configurations
- dashboard string
Deprecated from 1.161.0+, use dashboardId in query_list
- group
Configuration AlertGroup Configuration Group configuration for new alert.
- join
Configurations AlertJoin Configuration[] Join configuration for different queries.
- labels
Alert
Label[] Labels for new alert.
- mute
Until number Timestamp, notifications before closing again.
- no
Data booleanFire Switch for whether new alert fires when no data happens, default is false.
- no
Data numberSeverity when no data happens, the severity of new alert.
- notification
Lists AlertNotification List[] Alarm information notification list, Deprecated from 1.161.0+.
Deprecated from 1.161.0+, use policy_configuration for notification
- notify
Threshold number Notification threshold, which is not notified until the number of triggers is reached. The default is 1, Deprecated from 1.161.0+.
Deprecated from 1.161.0+, use threshold
- policy
Configuration AlertPolicy Configuration Policy configuration for new alert.
- query
Lists AlertQuery List[] Multiple conditions for configured alarm query.
- schedule
Alert
Schedule schedule for alert.
- schedule
Interval string Execution interval. 60 seconds minimum, such as 60s, 1h. Deprecated from 1.176.0+. use interval in schedule.
Field 'schedule_interval' has been deprecated from provider version 1.176.0. New field 'schedule' instead.
- schedule
Type string Default FixedRate. No need to configure this parameter. Deprecated from 1.176.0+. use type in schedule.
Field 'schedule_type' has been deprecated from provider version 1.176.0. New field 'schedule' instead.
- send
Resolved boolean when new alert is resolved, whether to notify, default is false.
- severity
Configurations AlertSeverity Configuration[] Severity configuration for new alert.
- template
Configuration AlertTemplate Configuration Template configuration for alert, when
type
istpl
.- threshold number
Evaluation threshold, alert will not fire until the number of triggers is reached. The default is 1.
- throttling string
Notification interval, default is no interval. Support number + unit type, for example 60s, 1h, Deprecated from 1.161.0+.
Deprecated from 1.161.0+, use repeat_interval in policy_configuration
- type string
including FixedRate,Hourly,Daily,Weekly,Cron.
- version string
The version of alert, new alert is 2.0.
- alert_
displayname str Alert displayname.
- alert_
name str Name of logstore for configuring alarm service.
- project_
name str The project name.
- alert_
description str Alert description.
- annotations
Sequence[Alert
Annotation Args] Alert template annotations.
- auto_
annotation bool whether to add automatic annotation, default is false.
- condition str
Join condition.
Deprecated from 1.161.0+, use eval_condition in severity_configurations
- dashboard str
Deprecated from 1.161.0+, use dashboardId in query_list
- group_
configuration AlertGroup Configuration Args Group configuration for new alert.
- join_
configurations Sequence[AlertJoin Configuration Args] Join configuration for different queries.
- labels
Sequence[Alert
Label Args] Labels for new alert.
- mute_
until int Timestamp, notifications before closing again.
- no_
data_ boolfire Switch for whether new alert fires when no data happens, default is false.
- no_
data_ intseverity when no data happens, the severity of new alert.
- notification_
lists Sequence[AlertNotification List Args] Alarm information notification list, Deprecated from 1.161.0+.
Deprecated from 1.161.0+, use policy_configuration for notification
- notify_
threshold int Notification threshold, which is not notified until the number of triggers is reached. The default is 1, Deprecated from 1.161.0+.
Deprecated from 1.161.0+, use threshold
- policy_
configuration AlertPolicy Configuration Args Policy configuration for new alert.
- query_
lists Sequence[AlertQuery List Args] Multiple conditions for configured alarm query.
- schedule
Alert
Schedule Args schedule for alert.
- schedule_
interval str Execution interval. 60 seconds minimum, such as 60s, 1h. Deprecated from 1.176.0+. use interval in schedule.
Field 'schedule_interval' has been deprecated from provider version 1.176.0. New field 'schedule' instead.
- schedule_
type str Default FixedRate. No need to configure this parameter. Deprecated from 1.176.0+. use type in schedule.
Field 'schedule_type' has been deprecated from provider version 1.176.0. New field 'schedule' instead.
- send_
resolved bool when new alert is resolved, whether to notify, default is false.
- severity_
configurations Sequence[AlertSeverity Configuration Args] Severity configuration for new alert.
- template_
configuration AlertTemplate Configuration Args Template configuration for alert, when
type
istpl
.- threshold int
Evaluation threshold, alert will not fire until the number of triggers is reached. The default is 1.
- throttling str
Notification interval, default is no interval. Support number + unit type, for example 60s, 1h, Deprecated from 1.161.0+.
Deprecated from 1.161.0+, use repeat_interval in policy_configuration
- type str
including FixedRate,Hourly,Daily,Weekly,Cron.
- version str
The version of alert, new alert is 2.0.
- alert
Displayname String Alert displayname.
- alert
Name String Name of logstore for configuring alarm service.
- project
Name String The project name.
- alert
Description String Alert description.
- annotations List<Property Map>
Alert template annotations.
- auto
Annotation Boolean whether to add automatic annotation, default is false.
- condition String
Join condition.
Deprecated from 1.161.0+, use eval_condition in severity_configurations
- dashboard String
Deprecated from 1.161.0+, use dashboardId in query_list
- group
Configuration Property Map Group configuration for new alert.
- join
Configurations List<Property Map> Join configuration for different queries.
- labels List<Property Map>
Labels for new alert.
- mute
Until Number Timestamp, notifications before closing again.
- no
Data BooleanFire Switch for whether new alert fires when no data happens, default is false.
- no
Data NumberSeverity when no data happens, the severity of new alert.
- notification
Lists List<Property Map> Alarm information notification list, Deprecated from 1.161.0+.
Deprecated from 1.161.0+, use policy_configuration for notification
- notify
Threshold Number Notification threshold, which is not notified until the number of triggers is reached. The default is 1, Deprecated from 1.161.0+.
Deprecated from 1.161.0+, use threshold
- policy
Configuration Property Map Policy configuration for new alert.
- query
Lists List<Property Map> Multiple conditions for configured alarm query.
- schedule Property Map
schedule for alert.
- schedule
Interval String Execution interval. 60 seconds minimum, such as 60s, 1h. Deprecated from 1.176.0+. use interval in schedule.
Field 'schedule_interval' has been deprecated from provider version 1.176.0. New field 'schedule' instead.
- schedule
Type String Default FixedRate. No need to configure this parameter. Deprecated from 1.176.0+. use type in schedule.
Field 'schedule_type' has been deprecated from provider version 1.176.0. New field 'schedule' instead.
- send
Resolved Boolean when new alert is resolved, whether to notify, default is false.
- severity
Configurations List<Property Map> Severity configuration for new alert.
- template
Configuration Property Map Template configuration for alert, when
type
istpl
.- threshold Number
Evaluation threshold, alert will not fire until the number of triggers is reached. The default is 1.
- throttling String
Notification interval, default is no interval. Support number + unit type, for example 60s, 1h, Deprecated from 1.161.0+.
Deprecated from 1.161.0+, use repeat_interval in policy_configuration
- type String
including FixedRate,Hourly,Daily,Weekly,Cron.
- version String
The version of alert, new alert is 2.0.
Outputs
All input properties are implicitly available as output properties. Additionally, the Alert resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Id string
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
- id string
The provider-assigned unique ID for this managed resource.
- id str
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
Look up Existing Alert Resource
Get an existing Alert 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?: AlertState, opts?: CustomResourceOptions): Alert
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
alert_description: Optional[str] = None,
alert_displayname: Optional[str] = None,
alert_name: Optional[str] = None,
annotations: Optional[Sequence[AlertAnnotationArgs]] = None,
auto_annotation: Optional[bool] = None,
condition: Optional[str] = None,
dashboard: Optional[str] = None,
group_configuration: Optional[AlertGroupConfigurationArgs] = None,
join_configurations: Optional[Sequence[AlertJoinConfigurationArgs]] = None,
labels: Optional[Sequence[AlertLabelArgs]] = None,
mute_until: Optional[int] = None,
no_data_fire: Optional[bool] = None,
no_data_severity: Optional[int] = None,
notification_lists: Optional[Sequence[AlertNotificationListArgs]] = None,
notify_threshold: Optional[int] = None,
policy_configuration: Optional[AlertPolicyConfigurationArgs] = None,
project_name: Optional[str] = None,
query_lists: Optional[Sequence[AlertQueryListArgs]] = None,
schedule: Optional[AlertScheduleArgs] = None,
schedule_interval: Optional[str] = None,
schedule_type: Optional[str] = None,
send_resolved: Optional[bool] = None,
severity_configurations: Optional[Sequence[AlertSeverityConfigurationArgs]] = None,
template_configuration: Optional[AlertTemplateConfigurationArgs] = None,
threshold: Optional[int] = None,
throttling: Optional[str] = None,
type: Optional[str] = None,
version: Optional[str] = None) -> Alert
func GetAlert(ctx *Context, name string, id IDInput, state *AlertState, opts ...ResourceOption) (*Alert, error)
public static Alert Get(string name, Input<string> id, AlertState? state, CustomResourceOptions? opts = null)
public static Alert get(String name, Output<String> id, AlertState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Alert
Description string Alert description.
- Alert
Displayname string Alert displayname.
- Alert
Name string Name of logstore for configuring alarm service.
- Annotations
List<Pulumi.
Ali Cloud. Log. Inputs. Alert Annotation> Alert template annotations.
- Auto
Annotation bool whether to add automatic annotation, default is false.
- Condition string
Join condition.
Deprecated from 1.161.0+, use eval_condition in severity_configurations
- Dashboard string
Deprecated from 1.161.0+, use dashboardId in query_list
- Group
Configuration Pulumi.Ali Cloud. Log. Inputs. Alert Group Configuration Group configuration for new alert.
- Join
Configurations List<Pulumi.Ali Cloud. Log. Inputs. Alert Join Configuration> Join configuration for different queries.
- Labels
List<Pulumi.
Ali Cloud. Log. Inputs. Alert Label> Labels for new alert.
- Mute
Until int Timestamp, notifications before closing again.
- No
Data boolFire Switch for whether new alert fires when no data happens, default is false.
- No
Data intSeverity when no data happens, the severity of new alert.
- Notification
Lists List<Pulumi.Ali Cloud. Log. Inputs. Alert Notification List> Alarm information notification list, Deprecated from 1.161.0+.
Deprecated from 1.161.0+, use policy_configuration for notification
- Notify
Threshold int Notification threshold, which is not notified until the number of triggers is reached. The default is 1, Deprecated from 1.161.0+.
Deprecated from 1.161.0+, use threshold
- Policy
Configuration Pulumi.Ali Cloud. Log. Inputs. Alert Policy Configuration Policy configuration for new alert.
- Project
Name string The project name.
- Query
Lists List<Pulumi.Ali Cloud. Log. Inputs. Alert Query List> Multiple conditions for configured alarm query.
- Schedule
Pulumi.
Ali Cloud. Log. Inputs. Alert Schedule schedule for alert.
- Schedule
Interval string Execution interval. 60 seconds minimum, such as 60s, 1h. Deprecated from 1.176.0+. use interval in schedule.
Field 'schedule_interval' has been deprecated from provider version 1.176.0. New field 'schedule' instead.
- Schedule
Type string Default FixedRate. No need to configure this parameter. Deprecated from 1.176.0+. use type in schedule.
Field 'schedule_type' has been deprecated from provider version 1.176.0. New field 'schedule' instead.
- Send
Resolved bool when new alert is resolved, whether to notify, default is false.
- Severity
Configurations List<Pulumi.Ali Cloud. Log. Inputs. Alert Severity Configuration> Severity configuration for new alert.
- Template
Configuration Pulumi.Ali Cloud. Log. Inputs. Alert Template Configuration Template configuration for alert, when
type
istpl
.- Threshold int
Evaluation threshold, alert will not fire until the number of triggers is reached. The default is 1.
- Throttling string
Notification interval, default is no interval. Support number + unit type, for example 60s, 1h, Deprecated from 1.161.0+.
Deprecated from 1.161.0+, use repeat_interval in policy_configuration
- Type string
including FixedRate,Hourly,Daily,Weekly,Cron.
- Version string
The version of alert, new alert is 2.0.
- Alert
Description string Alert description.
- Alert
Displayname string Alert displayname.
- Alert
Name string Name of logstore for configuring alarm service.
- Annotations
[]Alert
Annotation Args Alert template annotations.
- Auto
Annotation bool whether to add automatic annotation, default is false.
- Condition string
Join condition.
Deprecated from 1.161.0+, use eval_condition in severity_configurations
- Dashboard string
Deprecated from 1.161.0+, use dashboardId in query_list
- Group
Configuration AlertGroup Configuration Args Group configuration for new alert.
- Join
Configurations []AlertJoin Configuration Args Join configuration for different queries.
- Labels
[]Alert
Label Args Labels for new alert.
- Mute
Until int Timestamp, notifications before closing again.
- No
Data boolFire Switch for whether new alert fires when no data happens, default is false.
- No
Data intSeverity when no data happens, the severity of new alert.
- Notification
Lists []AlertNotification List Args Alarm information notification list, Deprecated from 1.161.0+.
Deprecated from 1.161.0+, use policy_configuration for notification
- Notify
Threshold int Notification threshold, which is not notified until the number of triggers is reached. The default is 1, Deprecated from 1.161.0+.
Deprecated from 1.161.0+, use threshold
- Policy
Configuration AlertPolicy Configuration Args Policy configuration for new alert.
- Project
Name string The project name.
- Query
Lists []AlertQuery List Args Multiple conditions for configured alarm query.
- Schedule
Alert
Schedule Args schedule for alert.
- Schedule
Interval string Execution interval. 60 seconds minimum, such as 60s, 1h. Deprecated from 1.176.0+. use interval in schedule.
Field 'schedule_interval' has been deprecated from provider version 1.176.0. New field 'schedule' instead.
- Schedule
Type string Default FixedRate. No need to configure this parameter. Deprecated from 1.176.0+. use type in schedule.
Field 'schedule_type' has been deprecated from provider version 1.176.0. New field 'schedule' instead.
- Send
Resolved bool when new alert is resolved, whether to notify, default is false.
- Severity
Configurations []AlertSeverity Configuration Args Severity configuration for new alert.
- Template
Configuration AlertTemplate Configuration Args Template configuration for alert, when
type
istpl
.- Threshold int
Evaluation threshold, alert will not fire until the number of triggers is reached. The default is 1.
- Throttling string
Notification interval, default is no interval. Support number + unit type, for example 60s, 1h, Deprecated from 1.161.0+.
Deprecated from 1.161.0+, use repeat_interval in policy_configuration
- Type string
including FixedRate,Hourly,Daily,Weekly,Cron.
- Version string
The version of alert, new alert is 2.0.
- alert
Description String Alert description.
- alert
Displayname String Alert displayname.
- alert
Name String Name of logstore for configuring alarm service.
- annotations
List<Alert
Annotation> Alert template annotations.
- auto
Annotation Boolean whether to add automatic annotation, default is false.
- condition String
Join condition.
Deprecated from 1.161.0+, use eval_condition in severity_configurations
- dashboard String
Deprecated from 1.161.0+, use dashboardId in query_list
- group
Configuration AlertGroup Configuration Group configuration for new alert.
- join
Configurations List<AlertJoin Configuration> Join configuration for different queries.
- labels
List<Alert
Label> Labels for new alert.
- mute
Until Integer Timestamp, notifications before closing again.
- no
Data BooleanFire Switch for whether new alert fires when no data happens, default is false.
- no
Data IntegerSeverity when no data happens, the severity of new alert.
- notification
Lists List<AlertNotification List> Alarm information notification list, Deprecated from 1.161.0+.
Deprecated from 1.161.0+, use policy_configuration for notification
- notify
Threshold Integer Notification threshold, which is not notified until the number of triggers is reached. The default is 1, Deprecated from 1.161.0+.
Deprecated from 1.161.0+, use threshold
- policy
Configuration AlertPolicy Configuration Policy configuration for new alert.
- project
Name String The project name.
- query
Lists List<AlertQuery List> Multiple conditions for configured alarm query.
- schedule
Alert
Schedule schedule for alert.
- schedule
Interval String Execution interval. 60 seconds minimum, such as 60s, 1h. Deprecated from 1.176.0+. use interval in schedule.
Field 'schedule_interval' has been deprecated from provider version 1.176.0. New field 'schedule' instead.
- schedule
Type String Default FixedRate. No need to configure this parameter. Deprecated from 1.176.0+. use type in schedule.
Field 'schedule_type' has been deprecated from provider version 1.176.0. New field 'schedule' instead.
- send
Resolved Boolean when new alert is resolved, whether to notify, default is false.
- severity
Configurations List<AlertSeverity Configuration> Severity configuration for new alert.
- template
Configuration AlertTemplate Configuration Template configuration for alert, when
type
istpl
.- threshold Integer
Evaluation threshold, alert will not fire until the number of triggers is reached. The default is 1.
- throttling String
Notification interval, default is no interval. Support number + unit type, for example 60s, 1h, Deprecated from 1.161.0+.
Deprecated from 1.161.0+, use repeat_interval in policy_configuration
- type String
including FixedRate,Hourly,Daily,Weekly,Cron.
- version String
The version of alert, new alert is 2.0.
- alert
Description string Alert description.
- alert
Displayname string Alert displayname.
- alert
Name string Name of logstore for configuring alarm service.
- annotations
Alert
Annotation[] Alert template annotations.
- auto
Annotation boolean whether to add automatic annotation, default is false.
- condition string
Join condition.
Deprecated from 1.161.0+, use eval_condition in severity_configurations
- dashboard string
Deprecated from 1.161.0+, use dashboardId in query_list
- group
Configuration AlertGroup Configuration Group configuration for new alert.
- join
Configurations AlertJoin Configuration[] Join configuration for different queries.
- labels
Alert
Label[] Labels for new alert.
- mute
Until number Timestamp, notifications before closing again.
- no
Data booleanFire Switch for whether new alert fires when no data happens, default is false.
- no
Data numberSeverity when no data happens, the severity of new alert.
- notification
Lists AlertNotification List[] Alarm information notification list, Deprecated from 1.161.0+.
Deprecated from 1.161.0+, use policy_configuration for notification
- notify
Threshold number Notification threshold, which is not notified until the number of triggers is reached. The default is 1, Deprecated from 1.161.0+.
Deprecated from 1.161.0+, use threshold
- policy
Configuration AlertPolicy Configuration Policy configuration for new alert.
- project
Name string The project name.
- query
Lists AlertQuery List[] Multiple conditions for configured alarm query.
- schedule
Alert
Schedule schedule for alert.
- schedule
Interval string Execution interval. 60 seconds minimum, such as 60s, 1h. Deprecated from 1.176.0+. use interval in schedule.
Field 'schedule_interval' has been deprecated from provider version 1.176.0. New field 'schedule' instead.
- schedule
Type string Default FixedRate. No need to configure this parameter. Deprecated from 1.176.0+. use type in schedule.
Field 'schedule_type' has been deprecated from provider version 1.176.0. New field 'schedule' instead.
- send
Resolved boolean when new alert is resolved, whether to notify, default is false.
- severity
Configurations AlertSeverity Configuration[] Severity configuration for new alert.
- template
Configuration AlertTemplate Configuration Template configuration for alert, when
type
istpl
.- threshold number
Evaluation threshold, alert will not fire until the number of triggers is reached. The default is 1.
- throttling string
Notification interval, default is no interval. Support number + unit type, for example 60s, 1h, Deprecated from 1.161.0+.
Deprecated from 1.161.0+, use repeat_interval in policy_configuration
- type string
including FixedRate,Hourly,Daily,Weekly,Cron.
- version string
The version of alert, new alert is 2.0.
- alert_
description str Alert description.
- alert_
displayname str Alert displayname.
- alert_
name str Name of logstore for configuring alarm service.
- annotations
Sequence[Alert
Annotation Args] Alert template annotations.
- auto_
annotation bool whether to add automatic annotation, default is false.
- condition str
Join condition.
Deprecated from 1.161.0+, use eval_condition in severity_configurations
- dashboard str
Deprecated from 1.161.0+, use dashboardId in query_list
- group_
configuration AlertGroup Configuration Args Group configuration for new alert.
- join_
configurations Sequence[AlertJoin Configuration Args] Join configuration for different queries.
- labels
Sequence[Alert
Label Args] Labels for new alert.
- mute_
until int Timestamp, notifications before closing again.
- no_
data_ boolfire Switch for whether new alert fires when no data happens, default is false.
- no_
data_ intseverity when no data happens, the severity of new alert.
- notification_
lists Sequence[AlertNotification List Args] Alarm information notification list, Deprecated from 1.161.0+.
Deprecated from 1.161.0+, use policy_configuration for notification
- notify_
threshold int Notification threshold, which is not notified until the number of triggers is reached. The default is 1, Deprecated from 1.161.0+.
Deprecated from 1.161.0+, use threshold
- policy_
configuration AlertPolicy Configuration Args Policy configuration for new alert.
- project_
name str The project name.
- query_
lists Sequence[AlertQuery List Args] Multiple conditions for configured alarm query.
- schedule
Alert
Schedule Args schedule for alert.
- schedule_
interval str Execution interval. 60 seconds minimum, such as 60s, 1h. Deprecated from 1.176.0+. use interval in schedule.
Field 'schedule_interval' has been deprecated from provider version 1.176.0. New field 'schedule' instead.
- schedule_
type str Default FixedRate. No need to configure this parameter. Deprecated from 1.176.0+. use type in schedule.
Field 'schedule_type' has been deprecated from provider version 1.176.0. New field 'schedule' instead.
- send_
resolved bool when new alert is resolved, whether to notify, default is false.
- severity_
configurations Sequence[AlertSeverity Configuration Args] Severity configuration for new alert.
- template_
configuration AlertTemplate Configuration Args Template configuration for alert, when
type
istpl
.- threshold int
Evaluation threshold, alert will not fire until the number of triggers is reached. The default is 1.
- throttling str
Notification interval, default is no interval. Support number + unit type, for example 60s, 1h, Deprecated from 1.161.0+.
Deprecated from 1.161.0+, use repeat_interval in policy_configuration
- type str
including FixedRate,Hourly,Daily,Weekly,Cron.
- version str
The version of alert, new alert is 2.0.
- alert
Description String Alert description.
- alert
Displayname String Alert displayname.
- alert
Name String Name of logstore for configuring alarm service.
- annotations List<Property Map>
Alert template annotations.
- auto
Annotation Boolean whether to add automatic annotation, default is false.
- condition String
Join condition.
Deprecated from 1.161.0+, use eval_condition in severity_configurations
- dashboard String
Deprecated from 1.161.0+, use dashboardId in query_list
- group
Configuration Property Map Group configuration for new alert.
- join
Configurations List<Property Map> Join configuration for different queries.
- labels List<Property Map>
Labels for new alert.
- mute
Until Number Timestamp, notifications before closing again.
- no
Data BooleanFire Switch for whether new alert fires when no data happens, default is false.
- no
Data NumberSeverity when no data happens, the severity of new alert.
- notification
Lists List<Property Map> Alarm information notification list, Deprecated from 1.161.0+.
Deprecated from 1.161.0+, use policy_configuration for notification
- notify
Threshold Number Notification threshold, which is not notified until the number of triggers is reached. The default is 1, Deprecated from 1.161.0+.
Deprecated from 1.161.0+, use threshold
- policy
Configuration Property Map Policy configuration for new alert.
- project
Name String The project name.
- query
Lists List<Property Map> Multiple conditions for configured alarm query.
- schedule Property Map
schedule for alert.
- schedule
Interval String Execution interval. 60 seconds minimum, such as 60s, 1h. Deprecated from 1.176.0+. use interval in schedule.
Field 'schedule_interval' has been deprecated from provider version 1.176.0. New field 'schedule' instead.
- schedule
Type String Default FixedRate. No need to configure this parameter. Deprecated from 1.176.0+. use type in schedule.
Field 'schedule_type' has been deprecated from provider version 1.176.0. New field 'schedule' instead.
- send
Resolved Boolean when new alert is resolved, whether to notify, default is false.
- severity
Configurations List<Property Map> Severity configuration for new alert.
- template
Configuration Property Map Template configuration for alert, when
type
istpl
.- threshold Number
Evaluation threshold, alert will not fire until the number of triggers is reached. The default is 1.
- throttling String
Notification interval, default is no interval. Support number + unit type, for example 60s, 1h, Deprecated from 1.161.0+.
Deprecated from 1.161.0+, use repeat_interval in policy_configuration
- type String
including FixedRate,Hourly,Daily,Weekly,Cron.
- version String
The version of alert, new alert is 2.0.
Supporting Types
AlertAnnotation, AlertAnnotationArgs
AlertGroupConfiguration, AlertGroupConfigurationArgs
AlertJoinConfiguration, AlertJoinConfigurationArgs
AlertLabel, AlertLabelArgs
AlertNotificationList, AlertNotificationListArgs
- Content string
Notice content of alarm.
- Type string
including FixedRate,Hourly,Daily,Weekly,Cron.
- Email
Lists List<string> Email address list.
- Mobile
Lists List<string> SMS sending mobile number.
- Service
Uri string Request address.
- Content string
Notice content of alarm.
- Type string
including FixedRate,Hourly,Daily,Weekly,Cron.
- Email
Lists []string Email address list.
- Mobile
Lists []string SMS sending mobile number.
- Service
Uri string Request address.
- content String
Notice content of alarm.
- type String
including FixedRate,Hourly,Daily,Weekly,Cron.
- email
Lists List<String> Email address list.
- mobile
Lists List<String> SMS sending mobile number.
- service
Uri String Request address.
- content string
Notice content of alarm.
- type string
including FixedRate,Hourly,Daily,Weekly,Cron.
- email
Lists string[] Email address list.
- mobile
Lists string[] SMS sending mobile number.
- service
Uri string Request address.
- content str
Notice content of alarm.
- type str
including FixedRate,Hourly,Daily,Weekly,Cron.
- email_
lists Sequence[str] Email address list.
- mobile_
lists Sequence[str] SMS sending mobile number.
- service_
uri str Request address.
- content String
Notice content of alarm.
- type String
including FixedRate,Hourly,Daily,Weekly,Cron.
- email
Lists List<String> Email address list.
- mobile
Lists List<String> SMS sending mobile number.
- service
Uri String Request address.
AlertPolicyConfiguration, AlertPolicyConfigurationArgs
- Alert
Policy stringId Alert Policy Id.
- Repeat
Interval string Repeat interval used by alert policy, 1h, 1m.e.g.
- Action
Policy stringId Action Policy Id.
- Alert
Policy stringId Alert Policy Id.
- Repeat
Interval string Repeat interval used by alert policy, 1h, 1m.e.g.
- Action
Policy stringId Action Policy Id.
- alert
Policy StringId Alert Policy Id.
- repeat
Interval String Repeat interval used by alert policy, 1h, 1m.e.g.
- action
Policy StringId Action Policy Id.
- alert
Policy stringId Alert Policy Id.
- repeat
Interval string Repeat interval used by alert policy, 1h, 1m.e.g.
- action
Policy stringId Action Policy Id.
- alert_
policy_ strid Alert Policy Id.
- repeat_
interval str Repeat interval used by alert policy, 1h, 1m.e.g.
- action_
policy_ strid Action Policy Id.
- alert
Policy StringId Alert Policy Id.
- repeat
Interval String Repeat interval used by alert policy, 1h, 1m.e.g.
- action
Policy StringId Action Policy Id.
AlertQueryList, AlertQueryListArgs
- End string
End time. example: 20s.
- Query string
Query corresponding to chart. example: * AND aliyun.
- Start string
Begin time. example: -60s.
- Chart
Title string Chart title, optional from 1.161.0+.
- Dashboard
Id string Query dashboard id.
- Logstore string
Query logstore, use store for new alert, Deprecated from 1.161.0+.
Deprecated from 1.161.0+, use store
- Power
Sql stringMode default disable, whether to use power sql. support auto, enable, disable.
- Project string
Query project.
- Region string
Query project region.
- Role
Arn string Query project store's ARN.
- Store string
Query store for new alert.
- Store
Type string Query store type for new alert, including log,metric,meta.
- Time
Span stringType default Custom. No need to configure this parameter.
- End string
End time. example: 20s.
- Query string
Query corresponding to chart. example: * AND aliyun.
- Start string
Begin time. example: -60s.
- Chart
Title string Chart title, optional from 1.161.0+.
- Dashboard
Id string Query dashboard id.
- Logstore string
Query logstore, use store for new alert, Deprecated from 1.161.0+.
Deprecated from 1.161.0+, use store
- Power
Sql stringMode default disable, whether to use power sql. support auto, enable, disable.
- Project string
Query project.
- Region string
Query project region.
- Role
Arn string Query project store's ARN.
- Store string
Query store for new alert.
- Store
Type string Query store type for new alert, including log,metric,meta.
- Time
Span stringType default Custom. No need to configure this parameter.
- end String
End time. example: 20s.
- query String
Query corresponding to chart. example: * AND aliyun.
- start String
Begin time. example: -60s.
- chart
Title String Chart title, optional from 1.161.0+.
- dashboard
Id String Query dashboard id.
- logstore String
Query logstore, use store for new alert, Deprecated from 1.161.0+.
Deprecated from 1.161.0+, use store
- power
Sql StringMode default disable, whether to use power sql. support auto, enable, disable.
- project String
Query project.
- region String
Query project region.
- role
Arn String Query project store's ARN.
- store String
Query store for new alert.
- store
Type String Query store type for new alert, including log,metric,meta.
- time
Span StringType default Custom. No need to configure this parameter.
- end string
End time. example: 20s.
- query string
Query corresponding to chart. example: * AND aliyun.
- start string
Begin time. example: -60s.
- chart
Title string Chart title, optional from 1.161.0+.
- dashboard
Id string Query dashboard id.
- logstore string
Query logstore, use store for new alert, Deprecated from 1.161.0+.
Deprecated from 1.161.0+, use store
- power
Sql stringMode default disable, whether to use power sql. support auto, enable, disable.
- project string
Query project.
- region string
Query project region.
- role
Arn string Query project store's ARN.
- store string
Query store for new alert.
- store
Type string Query store type for new alert, including log,metric,meta.
- time
Span stringType default Custom. No need to configure this parameter.
- end str
End time. example: 20s.
- query str
Query corresponding to chart. example: * AND aliyun.
- start str
Begin time. example: -60s.
- chart_
title str Chart title, optional from 1.161.0+.
- dashboard_
id str Query dashboard id.
- logstore str
Query logstore, use store for new alert, Deprecated from 1.161.0+.
Deprecated from 1.161.0+, use store
- power_
sql_ strmode default disable, whether to use power sql. support auto, enable, disable.
- project str
Query project.
- region str
Query project region.
- role_
arn str Query project store's ARN.
- store str
Query store for new alert.
- store_
type str Query store type for new alert, including log,metric,meta.
- time_
span_ strtype default Custom. No need to configure this parameter.
- end String
End time. example: 20s.
- query String
Query corresponding to chart. example: * AND aliyun.
- start String
Begin time. example: -60s.
- chart
Title String Chart title, optional from 1.161.0+.
- dashboard
Id String Query dashboard id.
- logstore String
Query logstore, use store for new alert, Deprecated from 1.161.0+.
Deprecated from 1.161.0+, use store
- power
Sql StringMode default disable, whether to use power sql. support auto, enable, disable.
- project String
Query project.
- region String
Query project region.
- role
Arn String Query project store's ARN.
- store String
Query store for new alert.
- store
Type String Query store type for new alert, including log,metric,meta.
- time
Span StringType default Custom. No need to configure this parameter.
AlertSchedule, AlertScheduleArgs
- Type string
including FixedRate,Hourly,Daily,Weekly,Cron.
- Cron
Expression string Cron expression when type is Cron.
- Day
Of intWeek Day of week when type is Weekly, including 0,1,2,3,4,5,6, 0 for Sunday, 1 for Monday
- Delay int
- Hour int
Hour of day when type is Weekly/Daily.
- Interval string
Execution interval. 60 seconds minimum, such as 60s, 1h. used when type is FixedRate.
- Run
Immediately bool - Time
Zone string Time zone for schedule.
- Type string
including FixedRate,Hourly,Daily,Weekly,Cron.
- Cron
Expression string Cron expression when type is Cron.
- Day
Of intWeek Day of week when type is Weekly, including 0,1,2,3,4,5,6, 0 for Sunday, 1 for Monday
- Delay int
- Hour int
Hour of day when type is Weekly/Daily.
- Interval string
Execution interval. 60 seconds minimum, such as 60s, 1h. used when type is FixedRate.
- Run
Immediately bool - Time
Zone string Time zone for schedule.
- type String
including FixedRate,Hourly,Daily,Weekly,Cron.
- cron
Expression String Cron expression when type is Cron.
- day
Of IntegerWeek Day of week when type is Weekly, including 0,1,2,3,4,5,6, 0 for Sunday, 1 for Monday
- delay Integer
- hour Integer
Hour of day when type is Weekly/Daily.
- interval String
Execution interval. 60 seconds minimum, such as 60s, 1h. used when type is FixedRate.
- run
Immediately Boolean - time
Zone String Time zone for schedule.
- type string
including FixedRate,Hourly,Daily,Weekly,Cron.
- cron
Expression string Cron expression when type is Cron.
- day
Of numberWeek Day of week when type is Weekly, including 0,1,2,3,4,5,6, 0 for Sunday, 1 for Monday
- delay number
- hour number
Hour of day when type is Weekly/Daily.
- interval string
Execution interval. 60 seconds minimum, such as 60s, 1h. used when type is FixedRate.
- run
Immediately boolean - time
Zone string Time zone for schedule.
- type str
including FixedRate,Hourly,Daily,Weekly,Cron.
- cron_
expression str Cron expression when type is Cron.
- day_
of_ intweek Day of week when type is Weekly, including 0,1,2,3,4,5,6, 0 for Sunday, 1 for Monday
- delay int
- hour int
Hour of day when type is Weekly/Daily.
- interval str
Execution interval. 60 seconds minimum, such as 60s, 1h. used when type is FixedRate.
- run_
immediately bool - time_
zone str Time zone for schedule.
- type String
including FixedRate,Hourly,Daily,Weekly,Cron.
- cron
Expression String Cron expression when type is Cron.
- day
Of NumberWeek Day of week when type is Weekly, including 0,1,2,3,4,5,6, 0 for Sunday, 1 for Monday
- delay Number
- hour Number
Hour of day when type is Weekly/Daily.
- interval String
Execution interval. 60 seconds minimum, such as 60s, 1h. used when type is FixedRate.
- run
Immediately Boolean - time
Zone String Time zone for schedule.
AlertSeverityConfiguration, AlertSeverityConfigurationArgs
- Eval
Condition Dictionary<string, string> Severity when this condition is met.
- Severity int
Severity for new alert, including 2,4,6,8,10 for Report,Low,Medium,High,Critical.
- Eval
Condition map[string]string Severity when this condition is met.
- Severity int
Severity for new alert, including 2,4,6,8,10 for Report,Low,Medium,High,Critical.
- eval
Condition Map<String,String> Severity when this condition is met.
- severity Integer
Severity for new alert, including 2,4,6,8,10 for Report,Low,Medium,High,Critical.
- eval
Condition {[key: string]: string} Severity when this condition is met.
- severity number
Severity for new alert, including 2,4,6,8,10 for Report,Low,Medium,High,Critical.
- eval_
condition Mapping[str, str] Severity when this condition is met.
- severity int
Severity for new alert, including 2,4,6,8,10 for Report,Low,Medium,High,Critical.
- eval
Condition Map<String> Severity when this condition is met.
- severity Number
Severity for new alert, including 2,4,6,8,10 for Report,Low,Medium,High,Critical.
AlertTemplateConfiguration, AlertTemplateConfigurationArgs
- Id string
Alert template id.
- Type string
including FixedRate,Hourly,Daily,Weekly,Cron.
- Annotations Dictionary<string, string>
Alert template annotations.
- Lang string
Alert template language including
cn
,en
.- Tokens Dictionary<string, string>
Alert template tokens.
- Id string
Alert template id.
- Type string
including FixedRate,Hourly,Daily,Weekly,Cron.
- Annotations map[string]string
Alert template annotations.
- Lang string
Alert template language including
cn
,en
.- Tokens map[string]string
Alert template tokens.
- id String
Alert template id.
- type String
including FixedRate,Hourly,Daily,Weekly,Cron.
- annotations Map<String,String>
Alert template annotations.
- lang String
Alert template language including
cn
,en
.- tokens Map<String,String>
Alert template tokens.
- id string
Alert template id.
- type string
including FixedRate,Hourly,Daily,Weekly,Cron.
- annotations {[key: string]: string}
Alert template annotations.
- lang string
Alert template language including
cn
,en
.- tokens {[key: string]: string}
Alert template tokens.
- id str
Alert template id.
- type str
including FixedRate,Hourly,Daily,Weekly,Cron.
- annotations Mapping[str, str]
Alert template annotations.
- lang str
Alert template language including
cn
,en
.- tokens Mapping[str, str]
Alert template tokens.
- id String
Alert template id.
- type String
including FixedRate,Hourly,Daily,Weekly,Cron.
- annotations Map<String>
Alert template annotations.
- lang String
Alert template language including
cn
,en
.- tokens Map<String>
Alert template tokens.
Import
Log alert can be imported using the id, e.g.
$ pulumi import alicloud:log/alert:Alert example tf-log:tf-log-alert
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.