diff --git a/alerts/apps_alerts.libsonnet b/alerts/apps_alerts.libsonnet index 3616d61f2..1edac9b71 100644 --- a/alerts/apps_alerts.libsonnet +++ b/alerts/apps_alerts.libsonnet @@ -4,6 +4,7 @@ local utils = import '../lib/utils.libsonnet'; _config+:: { kubeStateMetricsSelector: error 'must provide selector for kube-state-metrics', kubeJobTimeoutDuration: error 'must provide value for kubeJobTimeoutDuration', + kubeDaemonSetRolloutStuckFor: '15m', namespaceSelector: null, prefixedNamespaceSelector: if self.namespaceSelector != null then self.namespaceSelector + ',' else '', }, @@ -204,10 +205,10 @@ local utils = import '../lib/utils.libsonnet'; severity: 'warning', }, annotations: { - description: 'DaemonSet {{ $labels.namespace }}/{{ $labels.daemonset }} has not finished or progressed for at least 15 minutes.', + description: 'DaemonSet {{ $labels.namespace }}/{{ $labels.daemonset }} has not finished or progressed for at least %(kubeDaemonSetRolloutStuckFor)s.' % $._config, summary: 'DaemonSet rollout is stuck.', }, - 'for': '15m', + 'for': $._config.kubeDaemonSetRolloutStuckFor, }, { expr: ||| diff --git a/tests.yaml b/tests.yaml index 82dd4bb60..44d422ff5 100644 --- a/tests.yaml +++ b/tests.yaml @@ -822,7 +822,7 @@ tests: severity: warning exp_annotations: summary: "DaemonSet rollout is stuck." - description: 'DaemonSet monitoring/node-exporter has not finished or progressed for at least 15 minutes.' + description: 'DaemonSet monitoring/node-exporter has not finished or progressed for at least 15m.' runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubedaemonsetrolloutstuck - eval_time: 34m alertname: KubeDaemonSetRolloutStuck @@ -878,7 +878,7 @@ tests: severity: warning exp_annotations: summary: "DaemonSet rollout is stuck." - description: 'DaemonSet monitoring/node-exporter has not finished or progressed for at least 15 minutes.' + description: 'DaemonSet monitoring/node-exporter has not finished or progressed for at least 15m.' runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubedaemonsetrolloutstuck - eval_time: 34m alertname: KubeDaemonSetRolloutStuck @@ -909,7 +909,7 @@ tests: severity: warning exp_annotations: summary: "DaemonSet rollout is stuck." - description: 'DaemonSet monitoring/node-exporter has not finished or progressed for at least 15 minutes.' + description: 'DaemonSet monitoring/node-exporter has not finished or progressed for at least 15m.' runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubedaemonsetrolloutstuck - eval_time: 34m alertname: KubeDaemonSetRolloutStuck @@ -940,7 +940,7 @@ tests: severity: warning exp_annotations: summary: "DaemonSet rollout is stuck." - description: 'DaemonSet monitoring/node-exporter has not finished or progressed for at least 15 minutes.' + description: 'DaemonSet monitoring/node-exporter has not finished or progressed for at least 15m.' runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubedaemonsetrolloutstuck - eval_time: 36m alertname: KubeDaemonSetRolloutStuck