PrometheusAlertRule

Provides a Application Real-Time Monitoring Service (ARMS) Prometheus Alert Rule resource. For information about Application Real-Time Monitoring Service (ARMS) Prometheus Alert Rule and how to use it, see What is Prometheus Alert Rule.

NOTE: Available in v1.136.0+.

Example Usage

Basic Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.arms.PrometheusAlertRule;
import com.pulumi.alicloud.arms.PrometheusAlertRuleArgs;
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 example = new PrometheusAlertRule("example", PrometheusAlertRuleArgs.builder()
.clusterId("example_value")
.duration("example_value")
.expression("example_value")
.message("example_value")
.prometheusAlertRuleName("example_value")
.build());
}
}

Import

Application Real-Time Monitoring Service (ARMS) Prometheus Alert Rule can be imported using the id, e.g.

$ pulumi import alicloud:arms/prometheusAlertRule:PrometheusAlertRule example <cluster_id>:<prometheus_alert_rule_id>

Properties

Link copied to clipboard

The annotations of the alert rule.. See the following Block annotations.

Link copied to clipboard
val clusterId: Output<String>

The ID of the cluster.

Link copied to clipboard
val dispatchRuleId: Output<String>?

The ID of the notification policy. This parameter is required when the notify_type parameter is set to DISPATCH_RULE.

Link copied to clipboard
val duration: Output<String>

The duration of the alert.

Link copied to clipboard
val expression: Output<String>

The alert rule expression that follows the PromQL syntax.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard

The labels of the resource. See the following Block labels.

Link copied to clipboard
val message: Output<String>

The message of the alert notification.

Link copied to clipboard
val notifyType: Output<String>?

The method of sending the alert notification. Valid values: ALERT_MANAGER, DISPATCH_RULE.

Link copied to clipboard

The first ID of the resource.

Link copied to clipboard

The name of the resource.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val status: Output<Int>

The status of the resource. Valid values: 0, 1.

Link copied to clipboard
val type: Output<String>

The type of the alert rule.

Link copied to clipboard
val urn: Output<String>