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

feat(alerts): configure alerts for payment wallet ingestion #2608

Merged
merged 12 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from 11 commits
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
18 changes: 18 additions & 0 deletions src/domains/observability/env/prod/terraform.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,24 @@ ehns_metric_alerts = {
}
],
},
no_wallet_ingestion_alert = {
aggregation = "Total"
metric_name = "IncomingMessages"
description = "Payment wallet onboarding written events less than 1000 detected in the last 24h"
operator = "LessThanOrEqual"
threshold = 1000
frequency = "PT1H"
window_size = "P1D"
dimension = [
{
name = "EntityName"
operator = "Include"
values = [
"payment-wallet-ingestion-dl",
]
}
],
},
}

eventhubs_gpd = [
Expand Down
24 changes: 13 additions & 11 deletions src/domains/pay-wallet-common/03_storage.tf
Original file line number Diff line number Diff line change
Expand Up @@ -139,18 +139,20 @@ resource "azurerm_monitor_diagnostic_setting" "pay_wallet_queue_diagnostics" {
locals {
queue_alert_props = var.env_short == "p" ? [
{
queue_key = "usage-update-queue"
severity = 1
time_window = 30
frequency = 15
threshold = 10
queue_key = "cdc-queue"
severity = 1
time_window = 30
frequency = 15
threshold = 10
action_group = [data.azurerm_monitor_action_group.email.id, data.azurerm_monitor_action_group.slack.id]
},
{
queue_key = "expiration-queue"
severity = 1
time_window = 30
frequency = 15
threshold = 10
queue_key = "expiration-queue"
severity = 1
time_window = 30
frequency = 15
threshold = 10
action_group = [data.azurerm_monitor_action_group.email.id, data.azurerm_monitor_action_group.slack.id, azurerm_monitor_action_group.payment_wallet_opsgenie[0].id]
},
{
queue_key = "logged-action-dead-letter-queue"
Expand All @@ -170,7 +172,7 @@ resource "azurerm_monitor_scheduled_query_rules_alert" "pay_wallet_enqueue_rate_
location = var.location

action {
action_group = [data.azurerm_monitor_action_group.email.id, data.azurerm_monitor_action_group.slack.id, azurerm_monitor_action_group.payment_wallet_opsgenie[0].id]
action_group = each.value.action_group
email_subject = "Email Header"
custom_webhook_payload = "{}"
}
Expand Down
Loading