Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions alerts/apps_alerts.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,24 @@
'for': '15m',
alert: 'KubePodCrashLooping',
},
{
expr: |||
(
kube_pod_container_status_last_terminated_reason{reason="OOMKilled", %(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s} == 1
) and on(pod) (
increase(kube_pod_container_status_restarts_total{%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s}[5m]) > 0
)
||| % $._config,
labels: {
severity: 'warning',
},
annotations: {
description: 'Pod {{ $labels.namespace }}/{{ $labels.pod }} ({{ $labels.container }}) was OOMKilled',
summary: 'Pod was OOMKilled.',
},
'for': '15m',
alert: 'KubePodOOMKilled',
},
{
// We wrap kube_pod_owner with the topk() aggregator to ensure that
// every (namespace, pod, %(clusterLabel)s) tuple is unique even if the "owner_kind"
Expand Down