rancher2.ClusterAlertRule
Explore with Pulumi AI
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
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 main
import (
"github.com/pulumi/pulumi-rancher2/sdk/v4/go/rancher2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
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
}
_, 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
})
}
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());
}
}
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)
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,
});
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:
- Cluster
Id string The cluster id where create cluster alert rule (string)
- Group
Id string The cluster alert rule alert group ID (string)
- Annotations Dictionary<string, object>
The cluster alert rule annotations (map)
- Event
Rule ClusterAlert Rule Event Rule Args The cluster alert rule event rule. ConflictsWith: `"metric_rule", "node_rule", "system_service_rule"`` (list Maxitems:1)
- Group
Interval intSeconds The cluster alert rule group interval seconds. Default:
180
(int)- Group
Wait intSeconds 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)
- Metric
Rule ClusterAlert Rule Metric Rule Args 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)
- Node
Rule ClusterAlert Rule Node Rule Args The cluster alert rule node rule. ConflictsWith: `"event_rule", "metric_rule", "system_service_rule"`` (list Maxitems:1)
- Repeat
Interval intSeconds The cluster alert rule wait seconds. Default:
3600
(int)- Severity string
The cluster alert rule severity. Supported values :
"critical" | "info" | "warning"
. Default:critical
(string)- System
Service ClusterRule Alert Rule System Service Rule Args The cluster alert rule system service rule. ConflictsWith:
"event_rule", "metric_rule", "node_rule"
(list Maxitems:1)
- Cluster
Id string The cluster id where create cluster alert rule (string)
- Group
Id string The cluster alert rule alert group ID (string)
- Annotations map[string]interface{}
The cluster alert rule annotations (map)
- Event
Rule ClusterAlert Rule Event Rule Args The cluster alert rule event rule. ConflictsWith: `"metric_rule", "node_rule", "system_service_rule"`` (list Maxitems:1)
- Group
Interval intSeconds The cluster alert rule group interval seconds. Default:
180
(int)- Group
Wait intSeconds 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)
- Metric
Rule ClusterAlert Rule Metric Rule Args 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)
- Node
Rule ClusterAlert Rule Node Rule Args The cluster alert rule node rule. ConflictsWith: `"event_rule", "metric_rule", "system_service_rule"`` (list Maxitems:1)
- Repeat
Interval intSeconds The cluster alert rule wait seconds. Default:
3600
(int)- Severity string
The cluster alert rule severity. Supported values :
"critical" | "info" | "warning"
. Default:critical
(string)- System
Service ClusterRule Alert Rule System Service Rule Args The cluster alert rule system service rule. ConflictsWith:
"event_rule", "metric_rule", "node_rule"
(list Maxitems:1)
- cluster
Id String The cluster id where create cluster alert rule (string)
- group
Id String The cluster alert rule alert group ID (string)
- annotations Map<String,Object>
The cluster alert rule annotations (map)
- event
Rule ClusterAlert Rule Event Rule Args The cluster alert rule event rule. ConflictsWith: `"metric_rule", "node_rule", "system_service_rule"`` (list Maxitems:1)
- group
Interval IntegerSeconds The cluster alert rule group interval seconds. Default:
180
(int)- group
Wait IntegerSeconds 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)
- metric
Rule ClusterAlert Rule Metric Rule Args 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)
- node
Rule ClusterAlert Rule Node Rule Args The cluster alert rule node rule. ConflictsWith: `"event_rule", "metric_rule", "system_service_rule"`` (list Maxitems:1)
- repeat
Interval IntegerSeconds The cluster alert rule wait seconds. Default:
3600
(int)- severity String
The cluster alert rule severity. Supported values :
"critical" | "info" | "warning"
. Default:critical
(string)- system
Service ClusterRule Alert Rule System Service Rule Args The cluster alert rule system service rule. ConflictsWith:
"event_rule", "metric_rule", "node_rule"
(list Maxitems:1)
- cluster
Id string The cluster id where create cluster alert rule (string)
- group
Id string The cluster alert rule alert group ID (string)
- annotations {[key: string]: any}
The cluster alert rule annotations (map)
- event
Rule ClusterAlert Rule Event Rule Args The cluster alert rule event rule. ConflictsWith: `"metric_rule", "node_rule", "system_service_rule"`` (list Maxitems:1)
- group
Interval numberSeconds The cluster alert rule group interval seconds. Default:
180
(int)- group
Wait numberSeconds 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)
- metric
Rule ClusterAlert Rule Metric Rule Args 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)
- node
Rule ClusterAlert Rule Node Rule Args The cluster alert rule node rule. ConflictsWith: `"event_rule", "metric_rule", "system_service_rule"`` (list Maxitems:1)
- repeat
Interval numberSeconds The cluster alert rule wait seconds. Default:
3600
(int)- severity string
The cluster alert rule severity. Supported values :
"critical" | "info" | "warning"
. Default:critical
(string)- system
Service ClusterRule Alert Rule System Service Rule Args 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 ClusterAlert Rule Event Rule Args The cluster alert rule event rule. ConflictsWith: `"metric_rule", "node_rule", "system_service_rule"`` (list Maxitems:1)
- group_
interval_ intseconds The cluster alert rule group interval seconds. Default:
180
(int)- group_
wait_ intseconds 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 ClusterAlert Rule Metric Rule Args 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 ClusterAlert Rule Node Rule Args The cluster alert rule node rule. ConflictsWith: `"event_rule", "metric_rule", "system_service_rule"`` (list Maxitems:1)
- repeat_
interval_ intseconds 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_ Clusterrule Alert Rule System Service Rule Args The cluster alert rule system service rule. ConflictsWith:
"event_rule", "metric_rule", "node_rule"
(list Maxitems:1)
- cluster
Id String The cluster id where create cluster alert rule (string)
- group
Id String The cluster alert rule alert group ID (string)
- annotations Map<Any>
The cluster alert rule annotations (map)
- event
Rule Property Map The cluster alert rule event rule. ConflictsWith: `"metric_rule", "node_rule", "system_service_rule"`` (list Maxitems:1)
- group
Interval NumberSeconds The cluster alert rule group interval seconds. Default:
180
(int)- group
Wait NumberSeconds 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)
- metric
Rule 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)
- node
Rule Property Map The cluster alert rule node rule. ConflictsWith: `"event_rule", "metric_rule", "system_service_rule"`` (list Maxitems:1)
- repeat
Interval NumberSeconds The cluster alert rule wait seconds. Default:
3600
(int)- severity String
The cluster alert rule severity. Supported values :
"critical" | "info" | "warning"
. Default:critical
(string)- system
Service Property MapRule 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.
- Annotations Dictionary<string, object>
The cluster alert rule annotations (map)
- Cluster
Id string The cluster id where create cluster alert rule (string)
- Event
Rule ClusterAlert Rule Event Rule Args The cluster alert rule event rule. ConflictsWith: `"metric_rule", "node_rule", "system_service_rule"`` (list Maxitems:1)
- Group
Id string The cluster alert rule alert group ID (string)
- Group
Interval intSeconds The cluster alert rule group interval seconds. Default:
180
(int)- Group
Wait intSeconds 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)
- Metric
Rule ClusterAlert Rule Metric Rule Args 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)
- Node
Rule ClusterAlert Rule Node Rule Args The cluster alert rule node rule. ConflictsWith: `"event_rule", "metric_rule", "system_service_rule"`` (list Maxitems:1)
- Repeat
Interval intSeconds The cluster alert rule wait seconds. Default:
3600
(int)- Severity string
The cluster alert rule severity. Supported values :
"critical" | "info" | "warning"
. Default:critical
(string)- System
Service ClusterRule Alert Rule System Service Rule Args 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)
- Cluster
Id string The cluster id where create cluster alert rule (string)
- Event
Rule ClusterAlert Rule Event Rule Args The cluster alert rule event rule. ConflictsWith: `"metric_rule", "node_rule", "system_service_rule"`` (list Maxitems:1)
- Group
Id string The cluster alert rule alert group ID (string)
- Group
Interval intSeconds The cluster alert rule group interval seconds. Default:
180
(int)- Group
Wait intSeconds 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)
- Metric
Rule ClusterAlert Rule Metric Rule Args 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)
- Node
Rule ClusterAlert Rule Node Rule Args The cluster alert rule node rule. ConflictsWith: `"event_rule", "metric_rule", "system_service_rule"`` (list Maxitems:1)
- Repeat
Interval intSeconds The cluster alert rule wait seconds. Default:
3600
(int)- Severity string
The cluster alert rule severity. Supported values :
"critical" | "info" | "warning"
. Default:critical
(string)- System
Service ClusterRule Alert Rule System Service Rule Args 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)
- cluster
Id String The cluster id where create cluster alert rule (string)
- event
Rule ClusterAlert Rule Event Rule Args The cluster alert rule event rule. ConflictsWith: `"metric_rule", "node_rule", "system_service_rule"`` (list Maxitems:1)
- group
Id String The cluster alert rule alert group ID (string)
- group
Interval IntegerSeconds The cluster alert rule group interval seconds. Default:
180
(int)- group
Wait IntegerSeconds 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)
- metric
Rule ClusterAlert Rule Metric Rule Args 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)
- node
Rule ClusterAlert Rule Node Rule Args The cluster alert rule node rule. ConflictsWith: `"event_rule", "metric_rule", "system_service_rule"`` (list Maxitems:1)
- repeat
Interval IntegerSeconds The cluster alert rule wait seconds. Default:
3600
(int)- severity String
The cluster alert rule severity. Supported values :
"critical" | "info" | "warning"
. Default:critical
(string)- system
Service ClusterRule Alert Rule System Service Rule Args 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)
- cluster
Id string The cluster id where create cluster alert rule (string)
- event
Rule ClusterAlert Rule Event Rule Args The cluster alert rule event rule. ConflictsWith: `"metric_rule", "node_rule", "system_service_rule"`` (list Maxitems:1)
- group
Id string The cluster alert rule alert group ID (string)
- group
Interval numberSeconds The cluster alert rule group interval seconds. Default:
180
(int)- group
Wait numberSeconds 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)
- metric
Rule ClusterAlert Rule Metric Rule Args 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)
- node
Rule ClusterAlert Rule Node Rule Args The cluster alert rule node rule. ConflictsWith: `"event_rule", "metric_rule", "system_service_rule"`` (list Maxitems:1)
- repeat
Interval numberSeconds The cluster alert rule wait seconds. Default:
3600
(int)- severity string
The cluster alert rule severity. Supported values :
"critical" | "info" | "warning"
. Default:critical
(string)- system
Service ClusterRule Alert Rule System Service Rule Args 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 ClusterAlert Rule Event Rule Args 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_ intseconds The cluster alert rule group interval seconds. Default:
180
(int)- group_
wait_ intseconds 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 ClusterAlert Rule Metric Rule Args 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 ClusterAlert Rule Node Rule Args The cluster alert rule node rule. ConflictsWith: `"event_rule", "metric_rule", "system_service_rule"`` (list Maxitems:1)
- repeat_
interval_ intseconds 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_ Clusterrule Alert Rule System Service Rule Args 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)
- cluster
Id String The cluster id where create cluster alert rule (string)
- event
Rule Property Map The cluster alert rule event rule. ConflictsWith: `"metric_rule", "node_rule", "system_service_rule"`` (list Maxitems:1)
- group
Id String The cluster alert rule alert group ID (string)
- group
Interval NumberSeconds The cluster alert rule group interval seconds. Default:
180
(int)- group
Wait NumberSeconds 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)
- metric
Rule 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)
- node
Rule Property Map The cluster alert rule node rule. ConflictsWith: `"event_rule", "metric_rule", "system_service_rule"`` (list Maxitems:1)
- repeat
Interval NumberSeconds The cluster alert rule wait seconds. Default:
3600
(int)- severity String
The cluster alert rule severity. Supported values :
"critical" | "info" | "warning"
. Default:critical
(string)- system
Service Property MapRule The cluster alert rule system service rule. ConflictsWith:
"event_rule", "metric_rule", "node_rule"
(list Maxitems:1)
Supporting Types
ClusterAlertRuleEventRule
- Resource
Kind string Resource kind. Supported values :
"DaemonSet" | "Deployment" | "Node" | "Pod" | "StatefulSet"
(string)- Event
Type string Event type. Supported values :
"Warning" | "Normal"
. Default:Warning
(string)
- Resource
Kind string Resource kind. Supported values :
"DaemonSet" | "Deployment" | "Node" | "Pod" | "StatefulSet"
(string)- Event
Type string Event type. Supported values :
"Warning" | "Normal"
. Default:Warning
(string)
- resource
Kind String Resource kind. Supported values :
"DaemonSet" | "Deployment" | "Node" | "Pod" | "StatefulSet"
(string)- event
Type String Event type. Supported values :
"Warning" | "Normal"
. Default:Warning
(string)
- resource
Kind string Resource kind. Supported values :
"DaemonSet" | "Deployment" | "Node" | "Pod" | "StatefulSet"
(string)- event
Type 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)
- resource
Kind String Resource kind. Supported values :
"DaemonSet" | "Deployment" | "Node" | "Pod" | "StatefulSet"
(string)- event
Type String Event type. Supported values :
"Warning" | "Normal"
. Default:Warning
(string)
ClusterAlertRuleMetricRule
- Duration string
Metric rule duration (string)
- Expression string
Metric rule expression (string)
- Threshold
Value 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)
- Threshold
Value 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)
- threshold
Value 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)
- threshold
Value 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)
- threshold
Value 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
- Condition string
Node rule condition. Supported values :
"cpu" | "mem" | "notready"
. Default:notready
(string)- Cpu
Threshold int Node rule cpu threshold. Default:
70
(int)- Mem
Threshold int Node rule mem threshold. Default:
70
(int)- Node
Id string Node ID (string)
- Selector Dictionary<string, object>
Node rule selector (map)
- Condition string
Node rule condition. Supported values :
"cpu" | "mem" | "notready"
. Default:notready
(string)- Cpu
Threshold int Node rule cpu threshold. Default:
70
(int)- Mem
Threshold int Node rule mem threshold. Default:
70
(int)- Node
Id string Node ID (string)
- Selector map[string]interface{}
Node rule selector (map)
- condition String
Node rule condition. Supported values :
"cpu" | "mem" | "notready"
. Default:notready
(string)- cpu
Threshold Integer Node rule cpu threshold. Default:
70
(int)- mem
Threshold Integer Node rule mem threshold. Default:
70
(int)- node
Id String Node ID (string)
- selector Map<String,Object>
Node rule selector (map)
- condition string
Node rule condition. Supported values :
"cpu" | "mem" | "notready"
. Default:notready
(string)- cpu
Threshold number Node rule cpu threshold. Default:
70
(int)- mem
Threshold number Node rule mem threshold. Default:
70
(int)- node
Id string Node ID (string)
- selector {[key: string]: any}
Node rule selector (map)
- condition str
Node rule condition. Supported values :
"cpu" | "mem" | "notready"
. Default:notready
(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
Node rule condition. Supported values :
"cpu" | "mem" | "notready"
. Default:notready
(string)- cpu
Threshold Number Node rule cpu threshold. Default:
70
(int)- mem
Threshold Number Node rule mem threshold. Default:
70
(int)- node
Id String Node ID (string)
- selector Map<Any>
Node rule selector (map)
ClusterAlertRuleSystemServiceRule
- Condition string
Node rule condition. Supported values :
"cpu" | "mem" | "notready"
. Default:notready
(string)
- Condition string
Node rule condition. Supported values :
"cpu" | "mem" | "notready"
. Default:notready
(string)
- condition String
Node rule condition. Supported values :
"cpu" | "mem" | "notready"
. Default:notready
(string)
- condition string
Node rule condition. Supported values :
"cpu" | "mem" | "notready"
. Default:notready
(string)
- condition str
Node rule condition. Supported values :
"cpu" | "mem" | "notready"
. Default:notready
(string)
- condition String
Node rule condition. Supported values :
"cpu" | "mem" | "notready"
. Default:notready
(string)
Import
Cluster Alert Rule can be imported using the Rancher cluster alert rule ID
$ pulumi import rancher2:index/clusterAlertRule:ClusterAlertRule foo <CLUSTER_ALERT_RULE_ID>
Package Details
- Repository
- Rancher2 pulumi/pulumi-rancher2
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
rancher2
Terraform Provider.