Skip to content

Commit

Permalink
chore: slack notifications for networks (#10784)
Browse files Browse the repository at this point in the history
Slack alerts to #network-alerts when the proven chain stops on `devnet`
or `troll-turtle`.

I deployed the TF and can confirm it is working.
  • Loading branch information
just-mitch authored Dec 17, 2024
1 parent 64bccd0 commit bab9f85
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
2 changes: 2 additions & 0 deletions spartan/metrics/.helmignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@
.idea/
*.tmproj
.vscode/

terraform/
20 changes: 14 additions & 6 deletions spartan/metrics/terraform/grafana.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ terraform {
version = "~> 3.13.2"
}
}

backend "gcs" {
bucket = "aztec-terraform"
prefix = "metrics-deploy/us-west1-a/aztec-gke/metrics/alerting/terraform.tfstate"
}
}

provider "grafana" {
Expand All @@ -29,18 +34,21 @@ resource "grafana_contact_point" "slack" {

resource "grafana_notification_policy" "ignore_policy" {
contact_point = grafana_contact_point.slack.name
group_by = ["service_namespace"]
group_by = ["k8s_namespace_name"]


policy {
contact_point = grafana_contact_point.slack.name

matcher {
label = "service_namespace"
match = "="
value = "smoke"
label = "k8s_namespace_name"
match = "=~"
value = "devnet|troll-turtle"
}
}

mute_timings = ["always"]
policy {
mute_timings = ["always"]
contact_point = grafana_contact_point.slack.name
}
}

Expand Down
6 changes: 4 additions & 2 deletions spartan/metrics/terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ variable "grafana_url" {
}

variable "grafana_auth" {
type = string
type = string
sensitive = true
}

variable "slack_url" {
type = string
type = string
sensitive = true
}

0 comments on commit bab9f85

Please sign in to comment.