-
Notifications
You must be signed in to change notification settings - Fork 10
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
Test Azure outage alert #1459
Test Azure outage alert #1459
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,48 @@ resource "azurerm_monitor_action_group" "notify_slack_email" { | |
} | ||
} | ||
|
||
resource "azurerm_monitor_activity_log_alert" "azure_service_health_alert" { | ||
count = local.non_pr_environment ? 1 : 0 | ||
name = "cdcti-${var.environment}-azure-status-alert" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider using a variable for the alert name prefix instead of hardcoding 'cdcti-' to maintain consistency and configurability across different environments. [important] |
||
location = data.azurerm_resource_group.group.location | ||
resource_group_name = data.azurerm_resource_group.group.name | ||
scopes = [azurerm_container_registry.registry.id] | ||
|
||
criteria { | ||
category = "ServiceHealth" | ||
levels = ["Error"] | ||
service_health { | ||
locations = var.service_health_locations | ||
events = ["Incident"] | ||
services = ["*"] | ||
} | ||
} | ||
|
||
action { | ||
action_group_id = azurerm_monitor_action_group.notify_slack_email[count.index].id | ||
} | ||
|
||
description = "Alert service(s) appear to be down" | ||
enabled = true | ||
|
||
lifecycle { | ||
ignore_changes = [ | ||
tags["business_steward"], | ||
tags["center"], | ||
tags["environment"], | ||
tags["escid"], | ||
tags["funding_source"], | ||
tags["pii_data"], | ||
tags["security_compliance"], | ||
tags["security_steward"], | ||
tags["support_group"], | ||
tags["system"], | ||
tags["technical_steward"], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ensure that the 'ignore_changes' lifecycle policy is reviewed to confirm that it aligns with the operational requirements and does not inadvertently ignore important changes that should trigger updates. [medium] |
||
tags["zone"] | ||
] | ||
} | ||
} | ||
|
||
resource "azurerm_monitor_scheduled_query_rules_alert" "database_token_expired_alert" { | ||
count = local.non_pr_environment ? 1 : 0 | ||
name = "cdcti-${var.environment}-api-log-token-alert" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's recommended to add a tag to the new resource for better resource management and to align with the existing infrastructure as code practices. [important]