Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the daemonset rollout stuck alert configurable. #989

Merged
Show file tree
Hide file tree
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
5 changes: 3 additions & 2 deletions alerts/apps_alerts.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -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 '',
},
Expand Down Expand Up @@ -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: |||
Expand Down
8 changes: 4 additions & 4 deletions tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading