Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define liveness alert policy and add its graph to the dashboard. #151

Merged
merged 5 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions deployment/live/monitoring/prod/terragrunt.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ inputs = merge(
include.root.locals,
{
alert_lt_num_witness_threshold = 10
alert_enable_num_witness = false
}
)

7 changes: 4 additions & 3 deletions deployment/live/monitoring/terragrunt.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ terraform {
}

locals {
project_id = "checkpoint-distributor"
region = "us-central1"
env = path_relative_to_include()
project_id = "checkpoint-distributor"
region = "us-central1"
env = path_relative_to_include()
alert_enable_num_witness = true
}

remote_state {
Expand Down
1 change: 1 addition & 0 deletions deployment/modules/monitoring/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ resource "google_monitoring_dashboard" "witness_dashboard" {
}

resource "google_monitoring_alert_policy" "witness_liveness" {
enabled = var.alert_enable_num_witness
display_name = "Number of live witnesses (${var.env})"
combiner = "OR"
conditions {
Expand Down
5 changes: 5 additions & 0 deletions deployment/modules/monitoring/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,8 @@ variable "alert_lt_num_witness_threshold" {
description = "The lower bound alert threshold for the number of live witnesses, as measured by the distributor_update_checkpoint_success Prometheus metric."
type = number
}

variable "alert_enable_num_witness" {
description = "Whether to enable alert_lt_num_witness_threshold."
type = bool
}
Loading