Skip to content

Commit

Permalink
Merge pull request #32 from evilmartians/0.4.0-extra-alerts
Browse files Browse the repository at this point in the history
extra-alerts: Update kube-prometheus-stack to 55.0.0
  • Loading branch information
deponian authored Dec 5, 2023
2 parents 92c7d09 + bb49191 commit 77f1743
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 8 deletions.
3 changes: 3 additions & 0 deletions charts/extra-alerts/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 0.4.0 (05.12.2023)
- Update kube-prometheus-stack to 55.0.0

# 0.3.0 (10.03.2023)
- Update kube-prometheus-stack to 45.7.1

Expand Down
4 changes: 2 additions & 2 deletions charts/extra-alerts/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
apiVersion: v2
name: extra-alerts
description: A Helm chart with some tuned extra PrometheusRules from kube-prometheus-stack chart
appVersion: "45.7.1" # kube-prometheus-stack version
version: 0.3.0
appVersion: "55.0.0" # kube-prometheus-stack version
version: 0.4.0
maintainers:
- name: Ilya Cherepanov
email: [email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ spec:
description: pod/{{`{{`}} $labels.pod {{`}}`}} in namespace {{`{{`}} $labels.namespace {{`}}`}} on container {{`{{`}} $labels.container{{`}}`}} has been in waiting state for longer than 5 minutes.
runbook_url: {{ .Values.runbookUrl }}alert-name-kubecontainerwaiting
summary: Pod container waiting longer than 5 minutes
expr: sum by (namespace, pod, container, cluster) (kube_pod_container_status_waiting_reason{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}) > 0
expr: sum by ({{ range $.Values.defaultRules.additionalAggregationLabels }}{{ . }},{{ end }}namespace, pod, container, cluster) (kube_pod_container_status_waiting_reason{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}) > 0
for: 5m
labels:
severity: warning
Expand All @@ -63,7 +63,7 @@ spec:
description: pod/{{`{{`}} $labels.pod {{`}}`}} in namespace {{`{{`}} $labels.namespace {{`}}`}} on container {{`{{`}} $labels.container{{`}}`}} has been in waiting state for longer than 1 hour.
runbook_url: {{ .Values.runbookUrl }}alert-name-kubecontainerwaiting
summary: Pod container waiting longer than 1 hour
expr: sum by (namespace, pod, container, cluster) (kube_pod_container_status_waiting_reason{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}) > 0
expr: sum by ({{ range $.Values.defaultRules.additionalAggregationLabels }}{{ . }},{{ end }}namespace, pod, container, cluster) (kube_pod_container_status_waiting_reason{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}) > 0
for: 1h
labels:
severity: critical
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ spec:
) < 0.03
and
kubelet_volume_stats_used_bytes{job="kubelet", namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"} > 0
unless on(namespace, persistentvolumeclaim)
unless on ({{ range $.Values.defaultRules.additionalAggregationLabels }}{{ . }},{{ end }}namespace, persistentvolumeclaim)
kube_persistentvolumeclaim_access_mode{ access_mode="ReadOnlyMany"} == 1
unless on(namespace, persistentvolumeclaim)
unless on ({{ range $.Values.defaultRules.additionalAggregationLabels }}{{ . }},{{ end }}namespace, persistentvolumeclaim)
kube_persistentvolumeclaim_labels{label_excluded_from_alerts="true"} == 1
for: 1m
labels:
Expand All @@ -57,9 +57,9 @@ spec:
kubelet_volume_stats_used_bytes{job="kubelet", namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"} > 0
and
predict_linear(kubelet_volume_stats_available_bytes{job="kubelet", namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"}[6h], 4 * 24 * 3600) < 0
unless on(namespace, persistentvolumeclaim)
unless on ({{ range $.Values.defaultRules.additionalAggregationLabels }}{{ . }},{{ end }}namespace, persistentvolumeclaim)
kube_persistentvolumeclaim_access_mode{ access_mode="ReadOnlyMany"} == 1
unless on(namespace, persistentvolumeclaim)
unless on ({{ range $.Values.defaultRules.additionalAggregationLabels }}{{ . }},{{ end }}namespace, persistentvolumeclaim)
kube_persistentvolumeclaim_labels{label_excluded_from_alerts="true"} == 1
for: 1h
labels:
Expand Down
4 changes: 4 additions & 0 deletions charts/extra-alerts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@ annotations: {}
additionalRuleLabels:
responsible: ops
type: incluster

# Should match the value in kube-prometheus-stack values file
defaultRules:
additionalAggregationLabels: []

0 comments on commit 77f1743

Please sign in to comment.