Skip to content

Commit

Permalink
add app_uw_systems annotations to replica stock alerts
Browse files Browse the repository at this point in the history
  • Loading branch information
a-june committed Nov 9, 2023
1 parent 8e86c9e commit 85b923e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions common/stock/missing_replicas.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ groups:
- name: MissingReplicas
rules:
- alert: DeploymentMissingReplicas
expr: kube_deployment_status_replicas_available != kube_deployment_status_replicas
expr: (kube_deployment_spec_replicas != kube_deployment_status_replicas_available) * ON (deployment, namespace) group_left(annotation_app_uw_systems_tier, annotation_app_uw_systems_system, annotation_app_uw_systems_owner) kube_deployment_annotations{}
for: 15m
labels:
group: missing_replicas
Expand All @@ -15,7 +15,7 @@ groups:
action: "Check why some replicas are not healthy"
command: "kubectl --context $ENVIRONMENT-$PROVIDER --namespace {{ $labels.namespace }} describe deployment {{ $labels.deployment }}"
- alert: StatefulsetMissingReplicas
expr: kube_statefulset_status_replicas_ready != kube_statefulset_status_replicas
expr: (kube_statefulset_status_replicas_ready != kube_statefulset_status_replicas) * ON (statefulset, namespace) group_left(annotation_app_uw_systems_tier, annotation_app_uw_systems_system, annotation_app_uw_systems_owner) kube_statefulset_annotations{}
for: 15m
labels:
group: missing_replicas
Expand All @@ -36,7 +36,7 @@ groups:
action: "Check why some replicas are not healthy"
command: "kubectl --context $ENVIRONMENT-$PROVIDER --namespace {{ $labels.namespace }} describe daemonset {{ $labels.daemonset }}"
- alert: DeploymentMissingAllReplicas
expr: kube_deployment_status_replicas_available == 0 and kube_deployment_status_replicas != 0
expr: (kube_deployment_status_replicas_available == 0 and kube_deployment_status_replicas != 0) * ON (deployment, namespace) group_left(annotation_app_uw_systems_tier, annotation_app_uw_systems_system, annotation_app_uw_systems_owner) kube_deployment_annotations{}
for: 5m
labels:
group: missing_replicas
Expand All @@ -46,7 +46,7 @@ groups:
action: "Check why all replicas are missing"
command: "kubectl --context $ENVIRONMENT-$PROVIDER --namespace {{ $labels.namespace }} describe deployment {{ $labels.deployment }}"
- alert: StatefulsetMissingAllReplicas
expr: kube_statefulset_status_replicas_ready == 0 and kube_statefulset_status_replicas != 0
expr: (kube_statefulset_status_replicas_ready == 0 and kube_statefulset_status_replicas != 0) * ON (statefulset, namespace) group_left(annotation_app_uw_systems_tier, annotation_app_uw_systems_system, annotation_app_uw_systems_owner) kube_statefulset_annotations{}
for: 5m
labels:
group: missing_replicas
Expand All @@ -56,7 +56,7 @@ groups:
action: "Check why all replicas are missing"
command: "kubectl --context $ENVIRONMENT-$PROVIDER --namespace {{ $labels.namespace }} describe statefulset {{ $labels.statefulset }}"
- alert: DaemonsetMissingAllReplicas
expr: kube_daemonset_status_number_ready == 0 and kube_daemonset_status_desired_number_scheduled != 0
expr: (kube_daemonset_status_number_ready == 0 and kube_daemonset_status_desired_number_scheduled != 0)
for: 5m
labels:
group: missing_replicas
Expand Down

0 comments on commit 85b923e

Please sign in to comment.