Skip to main content

Inhibition

Multiple related notifications may be generated within a short time window. Instead of sending each alert separately, you can use notification inhibition to inhibit notifications based on the resource hierarchy.

Example: When a Kubernetes pod becomes unhealthy, its replicaset and the deployment will also become unhealthy. If you have a notification set up to alert on config.unhealthy, you'll receive 3 different notifications for the same cause.

deployment-with-inhibition.yaml
apiVersion: mission-control.flanksource.com/v1
kind: Notification
metadata:
name: pod-with-outgoing-inhibition
spec:
events:
- config.unhealthy
- config.warning
to:
connection: connection://mission-control/slack
inhibitions:
- direction: incoming
from: Kubernetes::Pod
to:
- Kubernetes::Deployment
- Kubernetes::ReplicaSet
depth: 2
FieldDescriptionScheme
direction*

Specifies the traversal direction in relation to the "From" resource. Can be "outgoing" (looks for child resources), "incoming" (looks for parent resources), or "all" (considers both).

inoming|outgoing|both

from*

Specifies the starting resource type (for example, "Kubernetes::Deployment").

string

to*

Specifies the traversal direction in relation to the from resource. outgoing looks for child resources and incoming looks for parent resources.

[]string

depth

Defines how many levels of child or parent resources to traverse.

int

soft

When true, relates using soft relationships. Example: Deployment to Pod is hard relationship, but Node to Pod is soft relationship.

bool