Skip to content

Commit

Permalink
Remove app label in phoenix rules (#1272)
Browse files Browse the repository at this point in the history
* Remove app label in phoenix rules

* Apply suggestions from code review

Co-authored-by: Marie Roque <[email protected]>

---------

Co-authored-by: Marie Roque <[email protected]>
  • Loading branch information
fiunchinho and marieroque authored Jul 3, 2024
1 parent 15ee37d commit 0e658d1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- Get rid of the `app`, `role` and `node` external labels in Phoenix rules.

## [4.4.2] - 2024-07-02

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
annotations:
description: '{{`Cluster {{ $labels.cluster_id }} creation is taking longer than expected.`}}'
opsrecipe: cluster-creation-failed/
expr: (statusresource_cluster_status{app=~"aws-operator.*", status="Creating"} == 1 or cluster_operator_cluster_status{app=~"cluster-operator.*", status="Creating", provider="aws"} == 1)
expr: (statusresource_cluster_status{pod=~"aws-operator.*", status="Creating"} == 1 or cluster_operator_cluster_status{pod=~"cluster-operator.*", status="Creating", provider="aws"} == 1)
for: 30m
labels:
area: kaas
Expand All @@ -31,7 +31,7 @@ spec:
annotations:
description: '{{`Cluster {{ $labels.cluster_id }} update is taking longer than expected.`}}'
opsrecipe: cluster-update-failed/
expr: (statusresource_cluster_status{app=~"aws-operator.*", status="Updating"} == 1 or cluster_operator_cluster_status{app=~"cluster-operator.*", status="Updating", provider="aws"} == 1)
expr: (statusresource_cluster_status{pod=~"aws-operator.*", status="Updating"} == 1 or cluster_operator_cluster_status{pod=~"cluster-operator.*", status="Updating", provider="aws"} == 1)
for: 3h
labels:
area: kaas
Expand All @@ -44,7 +44,7 @@ spec:
annotations:
description: '{{`Cluster {{ $labels.cluster_id }} deletion is taking longer than expected.`}}'
opsrecipe: cluster-deletion-failed/
expr: (statusresource_cluster_status{app=~"aws-operator.*", status="Deleting"} == 1 or cluster_operator_cluster_status{app=~"cluster-operator.*", status="Deleting", provider="aws"} == 1)
expr: (statusresource_cluster_status{pod=~"aws-operator.*", status="Deleting"} == 1 or cluster_operator_cluster_status{pod=~"cluster-operator.*", status="Deleting", provider="aws"} == 1)
for: 1h
labels:
area: kaas
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ spec:
topic: vault
- alert: ClusterServiceVaultTokenAlmostExpired
annotations:
description: '{{`Vault token for {{ $labels.app }} ({{ $labels.instance }}) is about to expire.`}}'
description: '{{`Vault token for {{ $labels.job }} ({{ $labels.instance }}) is about to expire.`}}'
opsrecipe: recreate-vault-tokens/
expr: sum((cluster_service_vault_token_expire_time - time()) < (60 * 60 * 24 * 7)) BY (app, instance)
expr: sum((cluster_service_vault_token_expire_time - time()) < (60 * 60 * 24 * 7)) BY (job, instance)
for: 5m
labels:
area: kaas
Expand All @@ -65,9 +65,9 @@ spec:
topic: vault
- alert: CertOperatorVaultTokenAlmostExpired
annotations:
description: '{{`Vault token for {{ $labels.app }} ({{ $labels.instance }}) is about to expire.`}}'
description: '{{`Vault token for {{ $labels.container }} ({{ $labels.instance }}) is about to expire.`}}'
opsrecipe: cert-operator-vault-token-expired/
expr: sum((cert_operator_vault_token_expire_time_seconds - time()) < (60 * 60 * 24 * 7)) BY (app, instance)
expr: sum((cert_operator_vault_token_expire_time_seconds - time()) < (60 * 60 * 24 * 7)) BY (container, instance)
for: 5m
labels:
area: kaas
Expand Down

0 comments on commit 0e658d1

Please sign in to comment.