mirror of
https://github.com/Sea-Haven-Industries/forgejo.git
synced 2026-09-30 03:03:11 +00:00
* feat(terraform): migrate forgejo to HCP Terraform Move the prod host onto workspace forgejo-prod in the After Hours VPC and freeze CDK push deploys so cutover can happen without applying into seahaven-prod. * fix(terraform): restore forgejo.db from the dump tarball Boot restore was copying data/ and repos/ and leaving the sqlite file at the archive root, so a volume restore started Forgejo with no database.
41 lines
1.3 KiB
HCL
41 lines
1.3 KiB
HCL
resource "aws_cloudwatch_metric_alarm" "verification_errors" {
|
|
count = var.enable_schedules ? 1 : 0
|
|
|
|
alarm_name = "forgejo-backup-verification-errors"
|
|
alarm_description = "Backup verification Lambda is failing. Slack notifications may not be firing."
|
|
comparison_operator = "GreaterThanOrEqualToThreshold"
|
|
evaluation_periods = 1
|
|
metric_name = "Errors"
|
|
namespace = "AWS/Lambda"
|
|
period = 3600
|
|
statistic = "Sum"
|
|
threshold = 1
|
|
treat_missing_data = "notBreaching"
|
|
|
|
dimensions = {
|
|
FunctionName = aws_lambda_function.verification.function_name
|
|
}
|
|
|
|
alarm_actions = [local.site_alerts_arn]
|
|
}
|
|
|
|
resource "aws_cloudwatch_metric_alarm" "verification_not_running" {
|
|
count = var.enable_schedules ? 1 : 0
|
|
|
|
alarm_name = "forgejo-backup-verification-not-running"
|
|
alarm_description = "Backup verification Lambda has not run in the last 24h."
|
|
comparison_operator = "LessThanThreshold"
|
|
evaluation_periods = 1
|
|
metric_name = "Invocations"
|
|
namespace = "AWS/Lambda"
|
|
period = 86400
|
|
statistic = "Sum"
|
|
threshold = 1
|
|
treat_missing_data = "breaching"
|
|
|
|
dimensions = {
|
|
FunctionName = aws_lambda_function.verification.function_name
|
|
}
|
|
|
|
alarm_actions = [local.site_alerts_arn]
|
|
}
|