ClusterAlertRule
Create a ClusterAlertRule Resource
new ClusterAlertRule(name: string, args: ClusterAlertRuleArgs, opts?: CustomResourceOptions);def ClusterAlertRule(resource_name, opts=None, annotations=None, cluster_id=None, event_rule=None, group_id=None, group_interval_seconds=None, group_wait_seconds=None, inherited=None, labels=None, metric_rule=None, name=None, node_rule=None, repeat_interval_seconds=None, severity=None, system_service_rule=None, __props__=None);func NewClusterAlertRule(ctx *Context, name string, args ClusterAlertRuleArgs, opts ...ResourceOption) (*ClusterAlertRule, error)public ClusterAlertRule(string name, ClusterAlertRuleArgs args, CustomResourceOptions? opts = null)- 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.
- opts ResourceOptions
- A bag of options that control this 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.
ClusterAlertRule Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model 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 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 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 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 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 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 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 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 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 Dict[str, Any]
The cluster alert rule annotations (map)
- event_
rule Dict[ClusterAlert Rule Event Rule] The cluster alert rule event rule. ConflictsWith:
"metric_rule", "node_rule", "system_service_rule"` (list Maxitems:1)- group_
interval_ floatseconds The cluster alert rule group interval seconds. Default:
180(int)- group_
wait_ floatseconds The cluster alert rule group wait seconds. Default:
180(int)- inherited bool
The cluster alert rule inherited. Default:
true(bool)- labels Dict[str, Any]
The cluster alert rule labels (map)
- metric_
rule Dict[ClusterAlert Rule Metric Rule] 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 Dict[ClusterAlert Rule Node Rule] The cluster alert rule node rule. ConflictsWith:
"event_rule", "metric_rule", "system_service_rule"` (list Maxitems:1)- repeat_
interval_ floatseconds 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_ Dict[Clusterrule Alert Rule System Service Rule] 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:
Look up an 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): ClusterAlertRulestatic get(resource_name, id, opts=None, annotations=None, cluster_id=None, event_rule=None, group_id=None, group_interval_seconds=None, group_wait_seconds=None, inherited=None, labels=None, metric_rule=None, name=None, node_rule=None, repeat_interval_seconds=None, severity=None, system_service_rule=None, __props__=None);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)- 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.
The following state arguments are supported:
- 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 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 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 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 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 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 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 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 The cluster alert rule system service rule. ConflictsWith:
"event_rule", "metric_rule", "node_rule"` (list Maxitems:1)
- annotations Dict[str, Any]
The cluster alert rule annotations (map)
- cluster_
id str The cluster id where create cluster alert rule (string)
- event_
rule Dict[ClusterAlert Rule Event Rule] 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_ floatseconds The cluster alert rule group interval seconds. Default:
180(int)- group_
wait_ floatseconds The cluster alert rule group wait seconds. Default:
180(int)- inherited bool
The cluster alert rule inherited. Default:
true(bool)- labels Dict[str, Any]
The cluster alert rule labels (map)
- metric_
rule Dict[ClusterAlert Rule Metric Rule] 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 Dict[ClusterAlert Rule Node Rule] The cluster alert rule node rule. ConflictsWith:
"event_rule", "metric_rule", "system_service_rule"` (list Maxitems:1)- repeat_
interval_ floatseconds 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_ Dict[Clusterrule Alert Rule System Service Rule] 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 str Resource kind. Supported values :
"DaemonSet" | "Deployment" | "Node" | "Pod" | "StatefulSet"(string)- event
Type str 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 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)
ClusterAlertRuleNodeRule
- Condition string
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 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)- 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
System service rule condition. Supported values :
"controller-manager" | "etcd" | "scheduler". Default:scheduler(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
System service rule condition. Supported values :
"controller-manager" | "etcd" | "scheduler". Default:scheduler(string)- cpu
Threshold float Node rule cpu threshold. Default:
70(int)- mem
Threshold float Node rule mem threshold. Default:
70(int)- node
Id str Node ID (string)
- selector Dict[str, Any]
Node rule selector (map)
ClusterAlertRuleSystemServiceRule
Package Details
- Repository
- https://github.com/pulumi/pulumi-rancher2
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
rancher2Terraform Provider.