Alert Args
data class AlertArgs(val alertDescription: Output<String>? = null, val alertDisplayname: Output<String>? = null, val alertName: Output<String>? = null, val annotations: Output<List<AlertAnnotationArgs>>? = null, val autoAnnotation: Output<Boolean>? = null, val condition: Output<String>? = null, val dashboard: Output<String>? = null, val groupConfiguration: Output<AlertGroupConfigurationArgs>? = null, val joinConfigurations: Output<List<AlertJoinConfigurationArgs>>? = null, val labels: Output<List<AlertLabelArgs>>? = null, val muteUntil: Output<Int>? = null, val noDataFire: Output<Boolean>? = null, val noDataSeverity: Output<Int>? = null, val notificationLists: Output<List<AlertNotificationListArgs>>? = null, val notifyThreshold: Output<Int>? = null, val policyConfiguration: Output<AlertPolicyConfigurationArgs>? = null, val projectName: Output<String>? = null, val queryLists: Output<List<AlertQueryListArgs>>? = null, val schedule: Output<AlertScheduleArgs>? = null, val scheduleInterval: Output<String>? = null, val scheduleType: Output<String>? = null, val sendResolved: Output<Boolean>? = null, val severityConfigurations: Output<List<AlertSeverityConfigurationArgs>>? = null, val templateConfiguration: Output<AlertTemplateConfigurationArgs>? = null, val threshold: Output<Int>? = null, val throttling: Output<String>? = null, val type: Output<String>? = null, val version: Output<String>? = null) : ConvertibleToJava<AlertArgs>
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
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());
}
}
Content copied to clipboard
Import
Log alert can be imported using the id, e.g.
$ pulumi import alicloud:log/alert:Alert example tf-log:tf-log-alert
Content copied to clipboard
Constructors
Link copied to clipboard
fun AlertArgs(alertDescription: Output<String>? = null, alertDisplayname: Output<String>? = null, alertName: Output<String>? = null, annotations: Output<List<AlertAnnotationArgs>>? = null, autoAnnotation: Output<Boolean>? = null, condition: Output<String>? = null, dashboard: Output<String>? = null, groupConfiguration: Output<AlertGroupConfigurationArgs>? = null, joinConfigurations: Output<List<AlertJoinConfigurationArgs>>? = null, labels: Output<List<AlertLabelArgs>>? = null, muteUntil: Output<Int>? = null, noDataFire: Output<Boolean>? = null, noDataSeverity: Output<Int>? = null, notificationLists: Output<List<AlertNotificationListArgs>>? = null, notifyThreshold: Output<Int>? = null, policyConfiguration: Output<AlertPolicyConfigurationArgs>? = null, projectName: Output<String>? = null, queryLists: Output<List<AlertQueryListArgs>>? = null, schedule: Output<AlertScheduleArgs>? = null, scheduleInterval: Output<String>? = null, scheduleType: Output<String>? = null, sendResolved: Output<Boolean>? = null, severityConfigurations: Output<List<AlertSeverityConfigurationArgs>>? = null, templateConfiguration: Output<AlertTemplateConfigurationArgs>? = null, threshold: Output<Int>? = null, throttling: Output<String>? = null, type: Output<String>? = null, version: Output<String>? = null)
Functions
Properties
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard