Skip to content

Commit

Permalink
Update alerts to test changes
Browse files Browse the repository at this point in the history
  • Loading branch information
hectorhuertas committed Nov 16, 2023
1 parent 278af7f commit 0e2f16a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
9 changes: 6 additions & 3 deletions common/stock/namespace_sync.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,22 @@ groups:
rules:
- alert: ArgoCDApplicationNotSynced
expr: argocd_app_info{autosync_enabled="true",sync_status!="Synced"} == 1
#expr: argocd_app_info * on (namespace) group_left(team) sum by (namespace, team) (label_replace(kube_namespace_labels{job!="opencost"}, "team", "$1", "label_uw_systems_owner", "(system|partner)"))
for: 1h
labels:
group: namespace_sync
alerttype: stock
alertgroup: namespace_sync
annotations:
summary: "Argo CD application {{$labels.name}} is not synced for last 1h"
impact: "Some manifests won't be automatically deployed."
action: "Check the web UI / logs for errors."
link: https://argocd-system.$ENVIRONMENT.$PROVIDER.uw.systems/applications/{{$labels.namespace}}/{{$labels.name}}
- alert: ArgoCDApplicationAutoSyncDisabled
expr: argocd_app_info{autosync_enabled="false"} == 1
expr: (argocd_app_info{autosync_enabled="false"} == 1) * on (namespace) group_left(team) uw_namespace_team
for: 1h
labels:
group: namespace_sync
alerttype: stock
alertgroup: namespace_sync
annotations:
summary: "Auto Sync on Argo CD application {{$labels.name}} is disabled"
impact: "New manifests won't be automatically deployed."
Expand Down
1 change: 1 addition & 0 deletions common/stock/team_detection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ groups:
rules:
- record: uw_namespace_owner
expr: label_replace(kube_namespace_labels{job="kube-state-metrics"}, "team", "$1", "label_uw_systems_owner", "(system|partner)")
# used as: `metric_with_namespace * on (namespace) group_left (team) uw_namespace_team
- record: uw_namespace_team
expr: sum by (namespace, team) (label_replace(kube_namespace_labels{job="kube-state-metrics"}, "team", "$1", "label_uw_systems_owner", "(system)"))

0 comments on commit 0e2f16a

Please sign in to comment.