| page_title | flashduty_inhibit_rule Resource - flashduty |
|---|---|
| subcategory | |
| description | Manages a Flashduty inhibit rule for a channel. |
Manages a Flashduty inhibit rule for a channel.
# Inhibit low-severity alerts when critical alert exists
resource "flashduty_inhibit_rule" "critical_inhibits_warning" {
channel_id = 6148622168454
rule_name = "Critical Inhibits Warning"
description = "Suppress warning alerts when critical alert is active for same host"
source_filters = [
{
conditions = [
{
key = "severity"
oper = "IN"
vals = ["Critical"]
}
]
}
]
target_filters = [
{
conditions = [
{
key = "severity"
oper = "IN"
vals = ["Warning", "Info"]
}
]
}
]
equals = ["host", "service"]
is_directly_discard = true
}
# Inhibit downstream service alerts when upstream is down
resource "flashduty_inhibit_rule" "upstream_inhibits_downstream" {
channel_id = 6148622168454
rule_name = "Upstream Inhibits Downstream"
description = "Suppress downstream alerts when upstream service is down"
source_filters = [
{
conditions = [
{
key = "labels.service"
oper = "IN"
vals = ["database", "cache"]
}
]
}
]
target_filters = [
{
conditions = [
{
key = "labels.service"
oper = "IN"
vals = ["api", "web"]
}
]
}
]
equals = ["datacenter"]
is_directly_discard = true
}channel_id(Number) The ID of the channel this rule belongs to.description(String) The description of the rule.equals(List of String) Fields that must be equal between source and target (e.g.,labels.host).rule_name(String) The name of the inhibit rule.source_filters(Attributes List) Source event filter conditions (OR groups of AND conditions). (see below for nested schema)target_filters(Attributes List) Target event filter conditions (events to be inhibited). (see below for nested schema)
is_directly_discard(Boolean) Whether to directly discard matching alerts.priority(Number) The priority of the rule.
id(String) The unique identifier of the inhibit rule.
Required:
conditions(Attributes List) AND conditions within this group. (see below for nested schema)
Required:
key(String) The attribute or label key.oper(String) The operator:INorNOTIN.vals(List of String) The values to match.
Required:
conditions(Attributes List) AND conditions within this group. (see below for nested schema)
Required:
key(String) The attribute or label key.oper(String) The operator:INorNOTIN.vals(List of String) The values to match.