Skip to content

Commit

Permalink
[observability] Introduce "ReplicaUnavailable" alerts (#20344)
Browse files Browse the repository at this point in the history
* [observability] ReplicaMismatch: Improve "the mismatch is 1.0" message

* [observability] Introduce "ReplicasUnavailable" alert (as warning for now)
  • Loading branch information
geropl authored Nov 7, 2024
1 parent 97baff5 commit 9de8339
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,18 @@ spec:
annotations:
runbook_url: https://github.com/gitpod-io/runbooks/blob/main/runbooks/GitpodWorkspaceDeploymentReplicaMismatch.md
summary: Desired number of replicas for image-builder-mk3 are not available in cluster {{ $labels.cluster }}
description: The mismatch is {{ printf "%.2f" $value }}
description: 'Desired number of replicas for image-builder-mk3 are not available in cluster {{ $labels.cluster }}: {{ printf "%.2f" $value }} are missing'
expr: |
kube_deployment_spec_replicas{deployment="image-builder-mk3", cluster!~"ephemeral.*"} != kube_deployment_status_replicas_available{deployment="image-builder-mk3", cluster!~"ephemeral.*"}
for: 3m
- alert: GitpodImageBuilderMk3ReplicaUnavailable
labels:
# TODO(gpl): warning for now, to set it up and fine-tune it
severity: warning
annotations:
runbook_url: https://github.com/gitpod-io/runbooks/blob/main/runbooks/GitpodWorkspaceDeploymentReplicaMismatch.md
summary: image-builder-mk3 replicas are unavailable in cluster {{ $labels.cluster }}
description: 'image-builder-mk3 pods are unavailable in cluster {{ $labels.cluster }}: {{ printf "%.2f" $value }}'
expr: |
kube_deployment_status_replicas_unavailable{deployment="image-builder-mk3", cluster!~"ephemeral.*"} > 0
for: 10m
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,18 @@ spec:
annotations:
runbook_url: https://github.com/gitpod-io/runbooks/blob/main/runbooks/GitpodWorkspaceDeploymentReplicaMismatch.md
summary: Desired number of replicas for node-labeler are not available in cluster {{ $labels.cluster }}
description: The mismatch is {{ printf "%.2f" $value }}
description: 'Desired number of replicas for node-labeler are not available in cluster {{ $labels.cluster }}: {{ printf "%.2f" $value }} are missing'
expr: |
kube_deployment_spec_replicas{deployment="node-labeler", cluster!~"ephemeral.*"} != kube_deployment_status_replicas_available{deployment="node-labeler", cluster!~"ephemeral.*"}
for: 3m
- alert: GitpodNodeLabelerReplicaUnavailable
labels:
# TODO(gpl): warning for now, to set it up and fine-tune it
severity: warning
annotations:
runbook_url: https://github.com/gitpod-io/runbooks/blob/main/runbooks/GitpodWorkspaceDeploymentReplicaMismatch.md
summary: node-labeler replicas are unavailable in cluster {{ $labels.cluster }}
description: 'node-labeler pods are unavailable in cluster {{ $labels.cluster }}: {{ printf "%.2f" $value }}'
expr: |
kube_deployment_status_replicas_unavailable{deployment="node-labeler", cluster!~"ephemeral.*"} > 0
for: 10m
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,18 @@ spec:
annotations:
runbook_url: https://github.com/gitpod-io/runbooks/blob/main/runbooks/GitpodWorkspaceDeploymentReplicaMismatch.md
summary: Desired number of replicas for ws-manager-mk2 are not available in cluster {{ $labels.cluster }}
description: The mismatch is {{ printf "%.2f" $value }}
description: 'Desired number of replicas for ws-manager-mk2 are not available in cluster {{ $labels.cluster }}: {{ printf "%.2f" $value }} are missing'
expr: |
kube_deployment_spec_replicas{deployment="ws-manager-mk2", cluster!~"ephemeral.*"} != kube_deployment_status_replicas_available{deployment="ws-manager-mk2", cluster!~"ephemeral.*"}
for: 3m
- alert: GitpodWsManagerMk2ReplicaUnavailable
labels:
# TODO(gpl): warning for now, to set it up and fine-tune it
severity: warning
annotations:
runbook_url: https://github.com/gitpod-io/runbooks/blob/main/runbooks/GitpodWorkspaceDeploymentReplicaMismatch.md
summary: ws-manager-mk2 replicas are unavailable in cluster {{ $labels.cluster }}
description: 'ws-manager-mk2 pods are unavailable in cluster {{ $labels.cluster }}: {{ printf "%.2f" $value }}'
expr: |
kube_deployment_status_replicas_unavailable{deployment="ws-manager-mk2", cluster!~"ephemeral.*"} > 0
for: 10m
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,18 @@ spec:
annotations:
runbook_url: https://github.com/gitpod-io/runbooks/blob/main/runbooks/GitpodWorkspaceDeploymentReplicaMismatch.md
summary: Desired number of replicas for ws-proxy are not available in cluster {{ $labels.cluster }}
description: The mismatch is {{ printf "%.2f" $value }}
description: 'Desired number of replicas for ws-proxy are not available in cluster {{ $labels.cluster }}: {{ printf "%.2f" $value }} are missing'
expr: |
kube_deployment_spec_replicas{deployment="ws-proxy", cluster!~"ephemeral.*"} != kube_deployment_status_replicas_available{deployment="ws-proxy", cluster!~"ephemeral.*"}
for: 3m
- alert: GitpodWsProxyMk2ReplicaUnavailable
labels:
# TODO(gpl): warning for now, to set it up and fine-tune it
severity: warning
annotations:
runbook_url: https://github.com/gitpod-io/runbooks/blob/main/runbooks/GitpodWorkspaceDeploymentReplicaMismatch.md
summary: ws-proxy replicas are unavailable in cluster {{ $labels.cluster }}
description: 'ws-proxy pods are unavailable in cluster {{ $labels.cluster }}: {{ printf "%.2f" $value }}'
expr: |
kube_deployment_status_replicas_unavailable{deployment="ws-proxy", cluster!~"ephemeral.*"} > 0
for: 10m

0 comments on commit 9de8339

Please sign in to comment.