Documentation
Documentation / Rules reference

Incident and alert rules

Gita evaluates a fixed set of rules against the status Kubernetes reports for your Pods, Nodes and Namespaces. This page lists every rule, the exact field it reads, when it opens and when it resolves.

Status. These rules run in the experimental Gita v5 installation, which is still under evaluation. Rule IDs and severities follow the current Gita platform defaults.
01

How rules work

Rules are defined by Gita and apply to every connected cluster. They cannot be created, disabled or tuned per cluster, so every team sees the same findings for the same Kubernetes state.

  1. 01

    Observe

    The agent in each cluster watches Pods, Nodes and Namespaces and keeps only the fields the rules need. Environment variables, annotations and other spec fields do not leave the cluster.

  2. 02

    Deliver

    Observations are stored on the agent's volume until the platform confirms it saved them, so a lost connection delays findings instead of dropping them. The agent also sends a full reconciliation periodically.

  3. 03

    Evaluate

    The worker evaluates every rule for the resource on each change. A finding is identified by cluster, resource UID, rule ID and, for containers, the container name.

Incidents

Something is already broken: a container cannot start, a Pod failed, a Node or Namespace is unavailable. Incidents appear on the Incidents page and in the Timeline, and can receive an ACK.

Alerts

A resource is under pressure and may fail soon. Alerts appear on the Alerts page. They do not have a detail page, ACK or Timeline entry yet.

02

Lifecycle

SituationWhat Gita does
The rule condition is metOpens the finding, or keeps it open and updates its reason and last seen time.
The condition is no longer metResolves the finding immediately and records the resolution time.
The condition returns after resolvingReopens the same finding with a new opened time. Each open and resolve is kept in the history.
The resource is deletedResolves every open finding for that resource.
Status is missing or Unknown where the rule cannot decideKeeps the current state. Gita never resolves a finding because data is missing.
The rule cannot be evaluated or processing failsRetries, then shows the failure on the Incidents and Alerts pages. Nothing is resolved.
The agent disconnectsStored findings remain readable. New changes are evaluated once the agent reconnects and delivers its pending observations.

An empty list only means there are no findings once collection and processing are healthy. Until the first reconciliation completes, or while the queue is delayed, the page says so instead of showing an empty list as healthy.

03

Excluded namespaces

Pod rules (GITA-INC-001 and GITA-INC-002) ignore Pods in namespaces whose name starts with kube-system. This keeps cluster system components out of your findings. Gita's own Pods are evaluated like any other workload, so a failing Gita component is reported too.

kube-system

Excluded

gita-billing

Evaluated

payments

Evaluated

The match is a prefix, so kube-system-tools is excluded, while gita and gita-apps are evaluated. Nodes and Namespaces are cluster-scoped and are never excluded: a Terminating kube-system Namespace still opens GITA-INC-007.

04

Incident rules

GITA-INC-001HIGHPod

Container is unhealthy

Field checked: status.containerStatuses[].state

Opens when
  • A container is in the waiting state with any reason other than ContainerCreating or PodInitializing, for example CrashLoopBackOff, ImagePullBackOff, ErrImagePull or CreateContainerConfigError.
  • A waiting state without a reason also opens the incident, reported as “Waiting”.
Resolves when
  • The container has been running for at least 5 minutes, measured from its start time. Gita checks again at that moment even if the Pod does not change.
  • The container terminates and the Pod will not restart it: restartPolicy Never, OnFailure with exit code 0, or a Pod that has Succeeded or Failed.
  • The container no longer appears in the Pod status, or the Pod is deleted.
Missing or unknown status
A restart keeps the incident open: ContainerCreating, PodInitializing, a run shorter than 5 minutes and a termination that will be restarted do not resolve it, so a CrashLoopBackOff stays one incident instead of reopening on every restart. A running Pod that declares containers but reports no container statuses is not evaluated; the current state of its findings is kept.

Gita opens one incident per container, so two failing containers in one Pod are two incidents. A terminated container does not open this rule, even with a non-zero exit code: a Pod that fails as a whole is reported by GITA-INC-002. Init containers are not evaluated.

Status that triggers the rule
status:
  phase: Running
  containerStatuses:
    - name: api
      state:
        waiting:
          reason: CrashLoopBackOff   # opens GITA-INC-001 for "api"
Check it yourself
kubectl get pod <pod> -n <namespace> \
  -o jsonpath='{range .status.containerStatuses[*]}{.name}{"\t"}{.state}{"\n"}{end}'
GITA-INC-002HIGHPod

Pod status is unhealthy

Field checked: status.phase

Opens when
  • The Pod phase is anything other than Running, Succeeded or Pending: Failed or Unknown.
Resolves when
  • The phase returns to Running, Succeeded or Pending, or the Pod is deleted.
Missing or unknown status
A Pod without a phase is not evaluated; open incidents stay open.

Pending is not an incident by itself. A Pod stuck in Pending because an image cannot be pulled is reported by GITA-INC-001 through its waiting container.

Status that triggers the rule
status:
  phase: Failed        # opens GITA-INC-002
  reason: Evicted
Check it yourself
kubectl get pod <pod> -n <namespace> -o jsonpath='{.status.phase}'
GITA-INC-005CRITICALNode

Node is not ready

Field checked: status.conditions[type=Ready].status

Opens when
  • The Ready condition is False: the kubelet reports that the Node cannot run Pods.
  • The Ready condition is Unknown: the node controller stopped receiving status from the kubelet, usually because the Node is down or unreachable.
Resolves when
  • The Ready condition becomes True, or the Node is removed from the cluster.
Missing or unknown status
A Node without a Ready condition is not evaluated; open incidents stay open.
Status that triggers the rule
status:
  conditions:
    - type: Ready
      status: "Unknown"   # opens GITA-INC-005
      reason: NodeStatusUnknown
Check it yourself
kubectl get node <node> \
  -o jsonpath='{.status.conditions[?(@.type=="Ready")].status}'
GITA-INC-007CRITICALNamespace

Namespace is not active

Field checked: status.phase

Opens when
  • The Namespace phase is anything other than Active, typically Terminating.
Resolves when
  • The phase becomes Active again, or the Namespace finishes deleting.
Missing or unknown status
A Namespace without a phase is not evaluated; open incidents stay open.

A Namespace stuck in Terminating usually has resources with finalizers that cannot complete. Namespace exclusions do not apply to this rule.

Status that triggers the rule
status:
  phase: Terminating   # opens GITA-INC-007
Check it yourself
kubectl get namespace <namespace> -o jsonpath='{.status.phase}'
05

Alert rules

Node pressure conditions are set by the kubelet when a resource crosses its eviction threshold. Thresholds come from the kubelet configuration of each Node, not from Gita.

GITA-ALT-001HIGHNode

Kubelet has insufficient disk space

Field checked: status.conditions[type=DiskPressure].status

Opens when
  • The DiskPressure condition is True: available disk or inodes on the Node fell below the kubelet eviction threshold. The kubelet may evict Pods and refuse new ones.
Resolves when
  • The DiskPressure condition becomes False, or the Node is removed from the cluster.
Missing or unknown status
If DiskPressure is missing or Unknown, the alert keeps its current state: an open alert stays open and no new alert opens. This happens when a Node stops reporting status, which is reported separately by GITA-INC-005.
Status that triggers the rule
status:
  conditions:
    - type: DiskPressure
      status: "True"   # opens the alert
Check it yourself
kubectl get node <node> \
  -o jsonpath='{.status.conditions[?(@.type=="DiskPressure")].status}'
GITA-ALT-002HIGHNode

Kubelet has insufficient memory

Field checked: status.conditions[type=MemoryPressure].status

Opens when
  • The MemoryPressure condition is True: available memory on the Node fell below the kubelet eviction threshold. The kubelet may evict Pods.
Resolves when
  • The MemoryPressure condition becomes False, or the Node is removed from the cluster.
Missing or unknown status
If MemoryPressure is missing or Unknown, the alert keeps its current state: an open alert stays open and no new alert opens. This happens when a Node stops reporting status, which is reported separately by GITA-INC-005.
Status that triggers the rule
status:
  conditions:
    - type: MemoryPressure
      status: "True"   # opens the alert
Check it yourself
kubectl get node <node> \
  -o jsonpath='{.status.conditions[?(@.type=="MemoryPressure")].status}'
GITA-ALT-003HIGHNode

Kubelet has insufficient PIDs

Field checked: status.conditions[type=PIDPressure].status

Opens when
  • The PIDPressure condition is True: the number of available process IDs on the Node fell below the kubelet threshold. New processes may fail to start.
Resolves when
  • The PIDPressure condition becomes False, or the Node is removed from the cluster.
Missing or unknown status
If PIDPressure is missing or Unknown, the alert keeps its current state: an open alert stays open and no new alert opens. This happens when a Node stops reporting status, which is reported separately by GITA-INC-005.
Status that triggers the rule
status:
  conditions:
    - type: PIDPressure
      status: "True"   # opens the alert
Check it yourself
kubectl get node <node> \
  -o jsonpath='{.status.conditions[?(@.type=="PIDPressure")].status}'
06

Not yet available

These alerts exist in the current Gita platform but need metrics the v5 agent does not collect. They never appear as findings in this version.

GITA-ALT-004MEDIUM

PVC has less than 20% free space

Compares kubelet_volume_stats_available_bytes with kubelet_volume_stats_capacity_bytes for each PersistentVolumeClaim. Requires kubelet volume metrics, which the agent does not collect yet.

GITA-ALT-005MEDIUM

Node filesystem has less than 20% free space

Compares node_filesystem_avail_bytes with node_filesystem_size_bytes for each mount point. Requires node-exporter, which the Gita chart does not install yet.

07

Quick reference

RuleResourceSeverityField
GITA-INC-001Container is unhealthyPodHIGHstatus.containerStatuses[].state
GITA-INC-002Pod status is unhealthyPodHIGHstatus.phase
GITA-INC-005Node is not readyNodeCRITICALstatus.conditions[type=Ready].status
GITA-INC-007Namespace is not activeNamespaceCRITICALstatus.phase
GITA-ALT-001Kubelet has insufficient disk spaceNodeHIGHstatus.conditions[type=DiskPressure].status
GITA-ALT-002Kubelet has insufficient memoryNodeHIGHstatus.conditions[type=MemoryPressure].status
GITA-ALT-003Kubelet has insufficient PIDsNodeHIGHstatus.conditions[type=PIDPressure].status