Skip to content

Commit 576aa31

Browse files
committed
Added new alarm to splunk backup bucket
1 parent eba1960 commit 576aa31

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

infrastructure/stacks/api-layer/cloudwatch_alarms.tf

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,3 +519,32 @@ resource "aws_cloudwatch_metric_alarm" "splunk_backup_delivery_failure" {
519519
ManagedBy = "terraform"
520520
}
521521
}
522+
523+
resource "aws_cloudwatch_metric_alarm" "splunk_backup_objects_present" {
524+
alarm_name = "SplunkBackupS3ObjectsPresent"
525+
alarm_description = "Triggers if there are any objects in the backup S3 bucket, indicating a Firehose delivery failure to Splunk."
526+
527+
namespace = "AWS/S3"
528+
metric_name = "NumberOfObjects"
529+
statistic = "Average"
530+
period = 3600
531+
evaluation_periods = 1
532+
threshold = 0
533+
comparison_operator = "GreaterThanThreshold"
534+
treat_missing_data = "notBreaching"
535+
536+
dimensions = {
537+
BucketName = "${var.project_name}-${var.environment}-eli-splunk"
538+
StorageType = "AllStorageTypes"
539+
}
540+
541+
alarm_actions = [aws_sns_topic.cloudwatch_alarms.arn]
542+
543+
tags = {
544+
Environment = var.environment
545+
AlertType = "data-delivery-failure"
546+
Service = "s3"
547+
Severity = "high"
548+
ManagedBy = "terraform"
549+
}
550+
}

0 commit comments

Comments
 (0)