1. Packages
  2. Rancher2
  3. API Docs
  4. ClusterAlertRule
Rancher 2 v6.1.0 published on Tuesday, Mar 12, 2024 by Pulumi

rancher2.ClusterAlertRule

Explore with Pulumi AI

rancher2 logo
Rancher 2 v6.1.0 published on Tuesday, Mar 12, 2024 by Pulumi

    Provides a Rancher v2 Cluster Alert Rule resource. This can be used to create Cluster Alert Rule for Rancher v2 environments and retrieve their information.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as rancher2 from "@pulumi/rancher2";
    
    // Create a new Rancher2 Cluster Alert Group
    const fooClusterAlertGroup = new rancher2.ClusterAlertGroup("fooClusterAlertGroup", {
        clusterId: "<cluster_id>",
        description: "Terraform cluster alert group",
        groupIntervalSeconds: 300,
        repeatIntervalSeconds: 3600,
    });
    // Create a new Rancher2 Cluster Alert Rule
    const fooClusterAlertRule = new rancher2.ClusterAlertRule("fooClusterAlertRule", {
        clusterId: fooClusterAlertGroup.clusterId,
        groupId: fooClusterAlertGroup.id,
        groupIntervalSeconds: 600,
        repeatIntervalSeconds: 6000,
    });
    
    import pulumi
    import pulumi_rancher2 as rancher2
    
    # Create a new Rancher2 Cluster Alert Group
    foo_cluster_alert_group = rancher2.ClusterAlertGroup("fooClusterAlertGroup",
        cluster_id="<cluster_id>",
        description="Terraform cluster alert group",
        group_interval_seconds=300,
        repeat_interval_seconds=3600)
    # Create a new Rancher2 Cluster Alert Rule
    foo_cluster_alert_rule = rancher2.ClusterAlertRule("fooClusterAlertRule",
        cluster_id=foo_cluster_alert_group.cluster_id,
        group_id=foo_cluster_alert_group.id,
        group_interval_seconds=600,
        repeat_interval_seconds=6000)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-rancher2/sdk/v6/go/rancher2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Create a new Rancher2 Cluster Alert Group
    		fooClusterAlertGroup, err := rancher2.NewClusterAlertGroup(ctx, "fooClusterAlertGroup", &rancher2.ClusterAlertGroupArgs{
    			ClusterId:             pulumi.String("<cluster_id>"),
    			Description:           pulumi.String("Terraform cluster alert group"),
    			GroupIntervalSeconds:  pulumi.Int(300),
    			RepeatIntervalSeconds: pulumi.Int(3600),
    		})
    		if err != nil {
    			return err
    		}
    		// Create a new Rancher2 Cluster Alert Rule
    		_, err = rancher2.NewClusterAlertRule(ctx, "fooClusterAlertRule", &rancher2.ClusterAlertRuleArgs{
    			ClusterId:             fooClusterAlertGroup.ClusterId,
    			GroupId:               fooClusterAlertGroup.ID(),
    			GroupIntervalSeconds:  pulumi.Int(600),
    			RepeatIntervalSeconds: pulumi.Int(6000),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Rancher2 = Pulumi.Rancher2;
    
    return await Deployment.RunAsync(() => 
    {
        // Create a new Rancher2 Cluster Alert Group
        var fooClusterAlertGroup = new Rancher2.ClusterAlertGroup("fooClusterAlertGroup", new()
        {
            ClusterId = "<cluster_id>",
            Description = "Terraform cluster alert group",
            GroupIntervalSeconds = 300,
            RepeatIntervalSeconds = 3600,
        });
    
        // Create a new Rancher2 Cluster Alert Rule
        var fooClusterAlertRule = new Rancher2.ClusterAlertRule("fooClusterAlertRule", new()
        {
            ClusterId = fooClusterAlertGroup.ClusterId,
            GroupId = fooClusterAlertGroup.Id,
            GroupIntervalSeconds = 600,
            RepeatIntervalSeconds = 6000,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.rancher2.ClusterAlertGroup;
    import com.pulumi.rancher2.ClusterAlertGroupArgs;
    import com.pulumi.rancher2.ClusterAlertRule;
    import com.pulumi.rancher2.ClusterAlertRuleArgs;
    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 fooClusterAlertGroup = new ClusterAlertGroup("fooClusterAlertGroup", ClusterAlertGroupArgs.builder()        
                .clusterId("<cluster_id>")
                .description("Terraform cluster alert group")
                .groupIntervalSeconds(300)
                .repeatIntervalSeconds(3600)
                .build());
    
            var fooClusterAlertRule = new ClusterAlertRule("fooClusterAlertRule", ClusterAlertRuleArgs.builder()        
                .clusterId(fooClusterAlertGroup.clusterId())
                .groupId(fooClusterAlertGroup.id())
                .groupIntervalSeconds(600)
                .repeatIntervalSeconds(6000)
                .build());
    
        }
    }
    
    resources:
      # Create a new Rancher2 Cluster Alert Group
      fooClusterAlertGroup:
        type: rancher2:ClusterAlertGroup
        properties:
          clusterId: <cluster_id>
          description: Terraform cluster alert group
          groupIntervalSeconds: 300
          repeatIntervalSeconds: 3600
      # Create a new Rancher2 Cluster Alert Rule
      fooClusterAlertRule:
        type: rancher2:ClusterAlertRule
        properties:
          clusterId: ${fooClusterAlertGroup.clusterId}
          groupId: ${fooClusterAlertGroup.id}
          groupIntervalSeconds: 600
          repeatIntervalSeconds: 6000
    

    Create ClusterAlertRule Resource

    new ClusterAlertRule(name: string, args: ClusterAlertRuleArgs, opts?: CustomResourceOptions);
    @overload
    def ClusterAlertRule(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         annotations: Optional[Mapping[str, Any]] = None,
                         cluster_id: Optional[str] = None,
                         event_rule: Optional[ClusterAlertRuleEventRuleArgs] = None,
                         group_id: Optional[str] = None,
                         group_interval_seconds: Optional[int] = None,
                         group_wait_seconds: Optional[int] = None,
                         inherited: Optional[bool] = None,
                         labels: Optional[Mapping[str, Any]] = None,
                         metric_rule: Optional[ClusterAlertRuleMetricRuleArgs] = None,
                         name: Optional[str] = None,
                         node_rule: Optional[ClusterAlertRuleNodeRuleArgs] = None,
                         repeat_interval_seconds: Optional[int] = None,
                         severity: Optional[str] = None,
                         system_service_rule: Optional[ClusterAlertRuleSystemServiceRuleArgs] = None)
    @overload
    def ClusterAlertRule(resource_name: str,
                         args: ClusterAlertRuleArgs,
                         opts: Optional[ResourceOptions] = None)
    func NewClusterAlertRule(ctx *Context, name string, args ClusterAlertRuleArgs, opts ...ResourceOption) (*ClusterAlertRule, error)
    public ClusterAlertRule(string name, ClusterAlertRuleArgs args, CustomResourceOptions? opts = null)
    public ClusterAlertRule(String name, ClusterAlertRuleArgs args)
    public ClusterAlertRule(String name, ClusterAlertRuleArgs args, CustomResourceOptions options)
    
    type: rancher2:ClusterAlertRule
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args ClusterAlertRuleArgs
    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 ClusterAlertRuleArgs
    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 ClusterAlertRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ClusterAlertRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ClusterAlertRuleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    ClusterAlertRule 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 ClusterAlertRule resource accepts the following input properties:

    ClusterId string
    The cluster id where create cluster alert rule (string)
    GroupId string
    The cluster alert rule alert group ID (string)
    Annotations Dictionary<string, object>
    The cluster alert rule annotations (map)
    EventRule ClusterAlertRuleEventRule
    The cluster alert rule event rule. ConflictsWith: `"metric_rule", "node_rule", "system_service_rule"`` (list Maxitems:1)
    GroupIntervalSeconds int
    The cluster alert rule group interval seconds. Default: 180 (int)
    GroupWaitSeconds int
    The cluster alert rule group wait seconds. Default: 180 (int)
    Inherited bool
    The cluster alert rule inherited. Default: true (bool)
    Labels Dictionary<string, object>
    The cluster alert rule labels (map)
    MetricRule ClusterAlertRuleMetricRule
    The cluster alert rule metric rule. ConflictsWith: `"event_rule", "node_rule", "system_service_rule"`` (list Maxitems:1)
    Name string
    The cluster alert rule name (string)
    NodeRule ClusterAlertRuleNodeRule
    The cluster alert rule node rule. ConflictsWith: `"event_rule", "metric_rule", "system_service_rule"`` (list Maxitems:1)
    RepeatIntervalSeconds int
    The cluster alert rule wait seconds. Default: 3600 (int)
    Severity string
    The cluster alert rule severity. Supported values : "critical" | "info" | "warning". Default: critical (string)
    SystemServiceRule ClusterAlertRuleSystemServiceRule
    The cluster alert rule system service rule. ConflictsWith: "event_rule", "metric_rule", "node_rule" (list Maxitems:1)
    ClusterId string
    The cluster id where create cluster alert rule (string)
    GroupId string
    The cluster alert rule alert group ID (string)
    Annotations map[string]interface{}
    The cluster alert rule annotations (map)
    EventRule ClusterAlertRuleEventRuleArgs
    The cluster alert rule event rule. ConflictsWith: `"metric_rule", "node_rule", "system_service_rule"`` (list Maxitems:1)
    GroupIntervalSeconds int
    The cluster alert rule group interval seconds. Default: 180 (int)
    GroupWaitSeconds int
    The cluster alert rule group wait seconds. Default: 180 (int)
    Inherited bool
    The cluster alert rule inherited. Default: true (bool)
    Labels map[string]interface{}
    The cluster alert rule labels (map)
    MetricRule ClusterAlertRuleMetricRuleArgs
    The cluster alert rule metric rule. ConflictsWith: `"event_rule", "node_rule", "system_service_rule"`` (list Maxitems:1)
    Name string
    The cluster alert rule name (string)
    NodeRule ClusterAlertRuleNodeRuleArgs
    The cluster alert rule node rule. ConflictsWith: `"event_rule", "metric_rule", "system_service_rule"`` (list Maxitems:1)
    RepeatIntervalSeconds int
    The cluster alert rule wait seconds. Default: 3600 (int)
    Severity string
    The cluster alert rule severity. Supported values : "critical" | "info" | "warning". Default: critical (string)
    SystemServiceRule ClusterAlertRuleSystemServiceRuleArgs
    The cluster alert rule system service rule. ConflictsWith: "event_rule", "metric_rule", "node_rule" (list Maxitems:1)
    clusterId String
    The cluster id where create cluster alert rule (string)
    groupId String
    The cluster alert rule alert group ID (string)
    annotations Map<String,Object>
    The cluster alert rule annotations (map)
    eventRule ClusterAlertRuleEventRule
    The cluster alert rule event rule. ConflictsWith: `"metric_rule", "node_rule", "system_service_rule"`` (list Maxitems:1)
    groupIntervalSeconds Integer
    The cluster alert rule group interval seconds. Default: 180 (int)
    groupWaitSeconds Integer
    The cluster alert rule group wait seconds. Default: 180 (int)
    inherited Boolean
    The cluster alert rule inherited. Default: true (bool)
    labels Map<String,Object>
    The cluster alert rule labels (map)
    metricRule ClusterAlertRuleMetricRule
    The cluster alert rule metric rule. ConflictsWith: `"event_rule", "node_rule", "system_service_rule"`` (list Maxitems:1)
    name String
    The cluster alert rule name (string)
    nodeRule ClusterAlertRuleNodeRule
    The cluster alert rule node rule. ConflictsWith: `"event_rule", "metric_rule", "system_service_rule"`` (list Maxitems:1)
    repeatIntervalSeconds Integer
    The cluster alert rule wait seconds. Default: 3600 (int)
    severity String
    The cluster alert rule severity. Supported values : "critical" | "info" | "warning". Default: critical (string)
    systemServiceRule ClusterAlertRuleSystemServiceRule
    The cluster alert rule system service rule. ConflictsWith: "event_rule", "metric_rule", "node_rule" (list Maxitems:1)
    clusterId string
    The cluster id where create cluster alert rule (string)
    groupId string
    The cluster alert rule alert group ID (string)
    annotations {[key: string]: any}
    The cluster alert rule annotations (map)
    eventRule ClusterAlertRuleEventRule
    The cluster alert rule event rule. ConflictsWith: `"metric_rule", "node_rule", "system_service_rule"`` (list Maxitems:1)
    groupIntervalSeconds number
    The cluster alert rule group interval seconds. Default: 180 (int)
    groupWaitSeconds number
    The cluster alert rule group wait seconds. Default: 180 (int)
    inherited boolean
    The cluster alert rule inherited. Default: true (bool)
    labels {[key: string]: any}
    The cluster alert rule labels (map)
    metricRule ClusterAlertRuleMetricRule
    The cluster alert rule metric rule. ConflictsWith: `"event_rule", "node_rule", "system_service_rule"`` (list Maxitems:1)
    name string
    The cluster alert rule name (string)
    nodeRule ClusterAlertRuleNodeRule
    The cluster alert rule node rule. ConflictsWith: `"event_rule", "metric_rule", "system_service_rule"`` (list Maxitems:1)
    repeatIntervalSeconds number
    The cluster alert rule wait seconds. Default: 3600 (int)
    severity string
    The cluster alert rule severity. Supported values : "critical" | "info" | "warning". Default: critical (string)
    systemServiceRule ClusterAlertRuleSystemServiceRule
    The cluster alert rule system service rule. ConflictsWith: "event_rule", "metric_rule", "node_rule" (list Maxitems:1)
    cluster_id str
    The cluster id where create cluster alert rule (string)
    group_id str
    The cluster alert rule alert group ID (string)
    annotations Mapping[str, Any]
    The cluster alert rule annotations (map)
    event_rule ClusterAlertRuleEventRuleArgs
    The cluster alert rule event rule. ConflictsWith: `"metric_rule", "node_rule", "system_service_rule"`` (list Maxitems:1)
    group_interval_seconds int
    The cluster alert rule group interval seconds. Default: 180 (int)
    group_wait_seconds int
    The cluster alert rule group wait seconds. Default: 180 (int)
    inherited bool
    The cluster alert rule inherited. Default: true (bool)
    labels Mapping[str, Any]
    The cluster alert rule labels (map)
    metric_rule ClusterAlertRuleMetricRuleArgs
    The cluster alert rule metric rule. ConflictsWith: `"event_rule", "node_rule", "system_service_rule"`` (list Maxitems:1)
    name str
    The cluster alert rule name (string)
    node_rule ClusterAlertRuleNodeRuleArgs
    The cluster alert rule node rule. ConflictsWith: `"event_rule", "metric_rule", "system_service_rule"`` (list Maxitems:1)
    repeat_interval_seconds int
    The cluster alert rule wait seconds. Default: 3600 (int)
    severity str
    The cluster alert rule severity. Supported values : "critical" | "info" | "warning". Default: critical (string)
    system_service_rule ClusterAlertRuleSystemServiceRuleArgs
    The cluster alert rule system service rule. ConflictsWith: "event_rule", "metric_rule", "node_rule" (list Maxitems:1)
    clusterId String
    The cluster id where create cluster alert rule (string)
    groupId String
    The cluster alert rule alert group ID (string)
    annotations Map<Any>
    The cluster alert rule annotations (map)
    eventRule Property Map
    The cluster alert rule event rule. ConflictsWith: `"metric_rule", "node_rule", "system_service_rule"`` (list Maxitems:1)
    groupIntervalSeconds Number
    The cluster alert rule group interval seconds. Default: 180 (int)
    groupWaitSeconds Number
    The cluster alert rule group wait seconds. Default: 180 (int)
    inherited Boolean
    The cluster alert rule inherited. Default: true (bool)
    labels Map<Any>
    The cluster alert rule labels (map)
    metricRule Property Map
    The cluster alert rule metric rule. ConflictsWith: `"event_rule", "node_rule", "system_service_rule"`` (list Maxitems:1)
    name String
    The cluster alert rule name (string)
    nodeRule Property Map
    The cluster alert rule node rule. ConflictsWith: `"event_rule", "metric_rule", "system_service_rule"`` (list Maxitems:1)
    repeatIntervalSeconds Number
    The cluster alert rule wait seconds. Default: 3600 (int)
    severity String
    The cluster alert rule severity. Supported values : "critical" | "info" | "warning". Default: critical (string)
    systemServiceRule Property Map
    The cluster alert rule system service rule. ConflictsWith: "event_rule", "metric_rule", "node_rule" (list Maxitems:1)

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ClusterAlertRule 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 ClusterAlertRule Resource

    Get an existing ClusterAlertRule 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?: ClusterAlertRuleState, opts?: CustomResourceOptions): ClusterAlertRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            annotations: Optional[Mapping[str, Any]] = None,
            cluster_id: Optional[str] = None,
            event_rule: Optional[ClusterAlertRuleEventRuleArgs] = None,
            group_id: Optional[str] = None,
            group_interval_seconds: Optional[int] = None,
            group_wait_seconds: Optional[int] = None,
            inherited: Optional[bool] = None,
            labels: Optional[Mapping[str, Any]] = None,
            metric_rule: Optional[ClusterAlertRuleMetricRuleArgs] = None,
            name: Optional[str] = None,
            node_rule: Optional[ClusterAlertRuleNodeRuleArgs] = None,
            repeat_interval_seconds: Optional[int] = None,
            severity: Optional[str] = None,
            system_service_rule: Optional[ClusterAlertRuleSystemServiceRuleArgs] = None) -> ClusterAlertRule
    func GetClusterAlertRule(ctx *Context, name string, id IDInput, state *ClusterAlertRuleState, opts ...ResourceOption) (*ClusterAlertRule, error)
    public static ClusterAlertRule Get(string name, Input<string> id, ClusterAlertRuleState? state, CustomResourceOptions? opts = null)
    public static ClusterAlertRule get(String name, Output<String> id, ClusterAlertRuleState 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.
    The following state arguments are supported:
    Annotations Dictionary<string, object>
    The cluster alert rule annotations (map)
    ClusterId string
    The cluster id where create cluster alert rule (string)
    EventRule ClusterAlertRuleEventRule
    The cluster alert rule event rule. ConflictsWith: `"metric_rule", "node_rule", "system_service_rule"`` (list Maxitems:1)
    GroupId string
    The cluster alert rule alert group ID (string)
    GroupIntervalSeconds int
    The cluster alert rule group interval seconds. Default: 180 (int)
    GroupWaitSeconds int
    The cluster alert rule group wait seconds. Default: 180 (int)
    Inherited bool
    The cluster alert rule inherited. Default: true (bool)
    Labels Dictionary<string, object>
    The cluster alert rule labels (map)
    MetricRule ClusterAlertRuleMetricRule
    The cluster alert rule metric rule. ConflictsWith: `"event_rule", "node_rule", "system_service_rule"`` (list Maxitems:1)
    Name string
    The cluster alert rule name (string)
    NodeRule ClusterAlertRuleNodeRule
    The cluster alert rule node rule. ConflictsWith: `"event_rule", "metric_rule", "system_service_rule"`` (list Maxitems:1)
    RepeatIntervalSeconds int
    The cluster alert rule wait seconds. Default: 3600 (int)
    Severity string
    The cluster alert rule severity. Supported values : "critical" | "info" | "warning". Default: critical (string)
    SystemServiceRule ClusterAlertRuleSystemServiceRule
    The cluster alert rule system service rule. ConflictsWith: "event_rule", "metric_rule", "node_rule" (list Maxitems:1)
    Annotations map[string]interface{}
    The cluster alert rule annotations (map)
    ClusterId string
    The cluster id where create cluster alert rule (string)
    EventRule ClusterAlertRuleEventRuleArgs
    The cluster alert rule event rule. ConflictsWith: `"metric_rule", "node_rule", "system_service_rule"`` (list Maxitems:1)
    GroupId string
    The cluster alert rule alert group ID (string)
    GroupIntervalSeconds int
    The cluster alert rule group interval seconds. Default: 180 (int)
    GroupWaitSeconds int
    The cluster alert rule group wait seconds. Default: 180 (int)
    Inherited bool
    The cluster alert rule inherited. Default: true (bool)
    Labels map[string]interface{}
    The cluster alert rule labels (map)
    MetricRule ClusterAlertRuleMetricRuleArgs
    The cluster alert rule metric rule. ConflictsWith: `"event_rule", "node_rule", "system_service_rule"`` (list Maxitems:1)
    Name string
    The cluster alert rule name (string)
    NodeRule ClusterAlertRuleNodeRuleArgs
    The cluster alert rule node rule. ConflictsWith: `"event_rule", "metric_rule", "system_service_rule"`` (list Maxitems:1)
    RepeatIntervalSeconds int
    The cluster alert rule wait seconds. Default: 3600 (int)
    Severity string
    The cluster alert rule severity. Supported values : "critical" | "info" | "warning". Default: critical (string)
    SystemServiceRule ClusterAlertRuleSystemServiceRuleArgs
    The cluster alert rule system service rule. ConflictsWith: "event_rule", "metric_rule", "node_rule" (list Maxitems:1)
    annotations Map<String,Object>
    The cluster alert rule annotations (map)
    clusterId String
    The cluster id where create cluster alert rule (string)
    eventRule ClusterAlertRuleEventRule
    The cluster alert rule event rule. ConflictsWith: `"metric_rule", "node_rule", "system_service_rule"`` (list Maxitems:1)
    groupId String
    The cluster alert rule alert group ID (string)
    groupIntervalSeconds Integer
    The cluster alert rule group interval seconds. Default: 180 (int)
    groupWaitSeconds Integer
    The cluster alert rule group wait seconds. Default: 180 (int)
    inherited Boolean
    The cluster alert rule inherited. Default: true (bool)
    labels Map<String,Object>
    The cluster alert rule labels (map)
    metricRule ClusterAlertRuleMetricRule
    The cluster alert rule metric rule. ConflictsWith: `"event_rule", "node_rule", "system_service_rule"`` (list Maxitems:1)
    name String
    The cluster alert rule name (string)
    nodeRule ClusterAlertRuleNodeRule
    The cluster alert rule node rule. ConflictsWith: `"event_rule", "metric_rule", "system_service_rule"`` (list Maxitems:1)
    repeatIntervalSeconds Integer
    The cluster alert rule wait seconds. Default: 3600 (int)
    severity String
    The cluster alert rule severity. Supported values : "critical" | "info" | "warning". Default: critical (string)
    systemServiceRule ClusterAlertRuleSystemServiceRule
    The cluster alert rule system service rule. ConflictsWith: "event_rule", "metric_rule", "node_rule" (list Maxitems:1)
    annotations {[key: string]: any}
    The cluster alert rule annotations (map)
    clusterId string
    The cluster id where create cluster alert rule (string)
    eventRule ClusterAlertRuleEventRule
    The cluster alert rule event rule. ConflictsWith: `"metric_rule", "node_rule", "system_service_rule"`` (list Maxitems:1)
    groupId string
    The cluster alert rule alert group ID (string)
    groupIntervalSeconds number
    The cluster alert rule group interval seconds. Default: 180 (int)
    groupWaitSeconds number
    The cluster alert rule group wait seconds. Default: 180 (int)
    inherited boolean
    The cluster alert rule inherited. Default: true (bool)
    labels {[key: string]: any}
    The cluster alert rule labels (map)
    metricRule ClusterAlertRuleMetricRule
    The cluster alert rule metric rule. ConflictsWith: `"event_rule", "node_rule", "system_service_rule"`` (list Maxitems:1)
    name string
    The cluster alert rule name (string)
    nodeRule ClusterAlertRuleNodeRule
    The cluster alert rule node rule. ConflictsWith: `"event_rule", "metric_rule", "system_service_rule"`` (list Maxitems:1)
    repeatIntervalSeconds number
    The cluster alert rule wait seconds. Default: 3600 (int)
    severity string
    The cluster alert rule severity. Supported values : "critical" | "info" | "warning". Default: critical (string)
    systemServiceRule ClusterAlertRuleSystemServiceRule
    The cluster alert rule system service rule. ConflictsWith: "event_rule", "metric_rule", "node_rule" (list Maxitems:1)
    annotations Mapping[str, Any]
    The cluster alert rule annotations (map)
    cluster_id str
    The cluster id where create cluster alert rule (string)
    event_rule ClusterAlertRuleEventRuleArgs
    The cluster alert rule event rule. ConflictsWith: `"metric_rule", "node_rule", "system_service_rule"`` (list Maxitems:1)
    group_id str
    The cluster alert rule alert group ID (string)
    group_interval_seconds int
    The cluster alert rule group interval seconds. Default: 180 (int)
    group_wait_seconds int
    The cluster alert rule group wait seconds. Default: 180 (int)
    inherited bool
    The cluster alert rule inherited. Default: true (bool)
    labels Mapping[str, Any]
    The cluster alert rule labels (map)
    metric_rule ClusterAlertRuleMetricRuleArgs
    The cluster alert rule metric rule. ConflictsWith: `"event_rule", "node_rule", "system_service_rule"`` (list Maxitems:1)
    name str
    The cluster alert rule name (string)
    node_rule ClusterAlertRuleNodeRuleArgs
    The cluster alert rule node rule. ConflictsWith: `"event_rule", "metric_rule", "system_service_rule"`` (list Maxitems:1)
    repeat_interval_seconds int
    The cluster alert rule wait seconds. Default: 3600 (int)
    severity str
    The cluster alert rule severity. Supported values : "critical" | "info" | "warning". Default: critical (string)
    system_service_rule ClusterAlertRuleSystemServiceRuleArgs
    The cluster alert rule system service rule. ConflictsWith: "event_rule", "metric_rule", "node_rule" (list Maxitems:1)
    annotations Map<Any>
    The cluster alert rule annotations (map)
    clusterId String
    The cluster id where create cluster alert rule (string)
    eventRule Property Map
    The cluster alert rule event rule. ConflictsWith: `"metric_rule", "node_rule", "system_service_rule"`` (list Maxitems:1)
    groupId String
    The cluster alert rule alert group ID (string)
    groupIntervalSeconds Number
    The cluster alert rule group interval seconds. Default: 180 (int)
    groupWaitSeconds Number
    The cluster alert rule group wait seconds. Default: 180 (int)
    inherited Boolean
    The cluster alert rule inherited. Default: true (bool)
    labels Map<Any>
    The cluster alert rule labels (map)
    metricRule Property Map
    The cluster alert rule metric rule. ConflictsWith: `"event_rule", "node_rule", "system_service_rule"`` (list Maxitems:1)
    name String
    The cluster alert rule name (string)
    nodeRule Property Map
    The cluster alert rule node rule. ConflictsWith: `"event_rule", "metric_rule", "system_service_rule"`` (list Maxitems:1)
    repeatIntervalSeconds Number
    The cluster alert rule wait seconds. Default: 3600 (int)
    severity String
    The cluster alert rule severity. Supported values : "critical" | "info" | "warning". Default: critical (string)
    systemServiceRule Property Map
    The cluster alert rule system service rule. ConflictsWith: "event_rule", "metric_rule", "node_rule" (list Maxitems:1)

    Supporting Types

    ClusterAlertRuleEventRule, ClusterAlertRuleEventRuleArgs

    ResourceKind string
    Resource kind. Supported values : "DaemonSet" | "Deployment" | "Node" | "Pod" | "StatefulSet" (string)
    EventType string
    Event type. Supported values : "Warning" | "Normal". Default: Warning (string)
    ResourceKind string
    Resource kind. Supported values : "DaemonSet" | "Deployment" | "Node" | "Pod" | "StatefulSet" (string)
    EventType string
    Event type. Supported values : "Warning" | "Normal". Default: Warning (string)
    resourceKind String
    Resource kind. Supported values : "DaemonSet" | "Deployment" | "Node" | "Pod" | "StatefulSet" (string)
    eventType String
    Event type. Supported values : "Warning" | "Normal". Default: Warning (string)
    resourceKind string
    Resource kind. Supported values : "DaemonSet" | "Deployment" | "Node" | "Pod" | "StatefulSet" (string)
    eventType string
    Event type. Supported values : "Warning" | "Normal". Default: Warning (string)
    resource_kind str
    Resource kind. Supported values : "DaemonSet" | "Deployment" | "Node" | "Pod" | "StatefulSet" (string)
    event_type str
    Event type. Supported values : "Warning" | "Normal". Default: Warning (string)
    resourceKind String
    Resource kind. Supported values : "DaemonSet" | "Deployment" | "Node" | "Pod" | "StatefulSet" (string)
    eventType String
    Event type. Supported values : "Warning" | "Normal". Default: Warning (string)

    ClusterAlertRuleMetricRule, ClusterAlertRuleMetricRuleArgs

    Duration string
    Metric rule duration (string)
    Expression string
    Metric rule expression (string)
    ThresholdValue double
    Metric rule threshold value (float64)
    Comparison string
    Metric rule comparison. Supported values : "equal" | "greater-or-equal" | "greater-than" | "less-or-equal" | "less-than" | "not-equal" | "has-value". Default: equal (string)
    Description string
    Metric rule description (string)
    Duration string
    Metric rule duration (string)
    Expression string
    Metric rule expression (string)
    ThresholdValue float64
    Metric rule threshold value (float64)
    Comparison string
    Metric rule comparison. Supported values : "equal" | "greater-or-equal" | "greater-than" | "less-or-equal" | "less-than" | "not-equal" | "has-value". Default: equal (string)
    Description string
    Metric rule description (string)
    duration String
    Metric rule duration (string)
    expression String
    Metric rule expression (string)
    thresholdValue Double
    Metric rule threshold value (float64)
    comparison String
    Metric rule comparison. Supported values : "equal" | "greater-or-equal" | "greater-than" | "less-or-equal" | "less-than" | "not-equal" | "has-value". Default: equal (string)
    description String
    Metric rule description (string)
    duration string
    Metric rule duration (string)
    expression string
    Metric rule expression (string)
    thresholdValue number
    Metric rule threshold value (float64)
    comparison string
    Metric rule comparison. Supported values : "equal" | "greater-or-equal" | "greater-than" | "less-or-equal" | "less-than" | "not-equal" | "has-value". Default: equal (string)
    description string
    Metric rule description (string)
    duration str
    Metric rule duration (string)
    expression str
    Metric rule expression (string)
    threshold_value float
    Metric rule threshold value (float64)
    comparison str
    Metric rule comparison. Supported values : "equal" | "greater-or-equal" | "greater-than" | "less-or-equal" | "less-than" | "not-equal" | "has-value". Default: equal (string)
    description str
    Metric rule description (string)
    duration String
    Metric rule duration (string)
    expression String
    Metric rule expression (string)
    thresholdValue Number
    Metric rule threshold value (float64)
    comparison String
    Metric rule comparison. Supported values : "equal" | "greater-or-equal" | "greater-than" | "less-or-equal" | "less-than" | "not-equal" | "has-value". Default: equal (string)
    description String
    Metric rule description (string)

    ClusterAlertRuleNodeRule, ClusterAlertRuleNodeRuleArgs

    Condition string
    System service rule condition. Supported values : "controller-manager" | "etcd" | "scheduler". Default: scheduler (string)
    CpuThreshold int
    Node rule cpu threshold. Default: 70 (int)
    MemThreshold int
    Node rule mem threshold. Default: 70 (int)
    NodeId string
    Node ID (string)
    Selector Dictionary<string, object>
    Node rule selector (map)
    Condition string
    System service rule condition. Supported values : "controller-manager" | "etcd" | "scheduler". Default: scheduler (string)
    CpuThreshold int
    Node rule cpu threshold. Default: 70 (int)
    MemThreshold int
    Node rule mem threshold. Default: 70 (int)
    NodeId string
    Node ID (string)
    Selector map[string]interface{}
    Node rule selector (map)
    condition String
    System service rule condition. Supported values : "controller-manager" | "etcd" | "scheduler". Default: scheduler (string)
    cpuThreshold Integer
    Node rule cpu threshold. Default: 70 (int)
    memThreshold Integer
    Node rule mem threshold. Default: 70 (int)
    nodeId String
    Node ID (string)
    selector Map<String,Object>
    Node rule selector (map)
    condition string
    System service rule condition. Supported values : "controller-manager" | "etcd" | "scheduler". Default: scheduler (string)
    cpuThreshold number
    Node rule cpu threshold. Default: 70 (int)
    memThreshold number
    Node rule mem threshold. Default: 70 (int)
    nodeId string
    Node ID (string)
    selector {[key: string]: any}
    Node rule selector (map)
    condition str
    System service rule condition. Supported values : "controller-manager" | "etcd" | "scheduler". Default: scheduler (string)
    cpu_threshold int
    Node rule cpu threshold. Default: 70 (int)
    mem_threshold int
    Node rule mem threshold. Default: 70 (int)
    node_id str
    Node ID (string)
    selector Mapping[str, Any]
    Node rule selector (map)
    condition String
    System service rule condition. Supported values : "controller-manager" | "etcd" | "scheduler". Default: scheduler (string)
    cpuThreshold Number
    Node rule cpu threshold. Default: 70 (int)
    memThreshold Number
    Node rule mem threshold. Default: 70 (int)
    nodeId String
    Node ID (string)
    selector Map<Any>
    Node rule selector (map)

    ClusterAlertRuleSystemServiceRule, ClusterAlertRuleSystemServiceRuleArgs

    Condition string
    System service rule condition. Supported values : "controller-manager" | "etcd" | "scheduler". Default: scheduler (string)
    Condition string
    System service rule condition. Supported values : "controller-manager" | "etcd" | "scheduler". Default: scheduler (string)
    condition String
    System service rule condition. Supported values : "controller-manager" | "etcd" | "scheduler". Default: scheduler (string)
    condition string
    System service rule condition. Supported values : "controller-manager" | "etcd" | "scheduler". Default: scheduler (string)
    condition str
    System service rule condition. Supported values : "controller-manager" | "etcd" | "scheduler". Default: scheduler (string)
    condition String
    System service rule condition. Supported values : "controller-manager" | "etcd" | "scheduler". Default: scheduler (string)

    Import

    Cluster Alert Rule can be imported using the Rancher cluster alert rule ID

    $ pulumi import rancher2:index/clusterAlertRule:ClusterAlertRule foo &lt;CLUSTER_ALERT_RULE_ID&gt;
    

    Package Details

    Repository
    Rancher2 pulumi/pulumi-rancher2
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the rancher2 Terraform Provider.
    rancher2 logo
    Rancher 2 v6.1.0 published on Tuesday, Mar 12, 2024 by Pulumi