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 2 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
20 changes: 19 additions & 1 deletion src/domains/observability/env/prod/terraform.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -259,13 +259,31 @@ ehns_metric_alerts = {
}
],
},
no_wallet_ingestion_alert = {
aggregation = "Total"
metric_name = "IncomingMessages"
description = "Payment wallet onboarding written events less than 2000 detected in the last 24h"
operator = "LessThanOrEqual"
threshold = 2000
pietro-tota marked this conversation as resolved.
Show resolved Hide resolved
frequency = "PT1H"
window_size = "P1D"
dimension = [
{
name = "EntityName"
operator = "Include"
values = [
"payment-wallet-evt-tx",
pietro-tota marked this conversation as resolved.
Show resolved Hide resolved
]
}
],
},
}




eventhubs_gpd = [
{
{
name = "test-evh" # test
partitions = 1
message_retention = 1
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 @@ -127,18 +127,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]
},
] : []
}
Expand All @@ -151,7 +153,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
4 changes: 2 additions & 2 deletions src/domains/pay-wallet-common/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# payment-wallet-common

<!-- markdownlint-disable -->
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
<!-- BEGIN_TF_DOCS -->
## Requirements

| Name | Version |
Expand Down Expand Up @@ -150,4 +150,4 @@
## Outputs

No outputs.
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
<!-- END_TF_DOCS -->
Loading