Skip to content

Commit 1ca5352

Browse files
committed
eli-304 changing formatting of message for Splunk
1 parent e73a679 commit 1ca5352

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

infrastructure/stacks/api-layer/eventbridge.tf

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,19 @@ resource "aws_cloudwatch_event_target" "firehose_target" {
7474
}
7575

7676
input_template = jsonencode({
77-
timestamp = "<time>"
78-
source = "aws:cloudwatch:alarm"
79-
account_id = "<account>"
80-
region = "<region>"
81-
alarm_name = "<alarm_name>"
82-
new_state = "<new_state>"
83-
old_state = "<old_state>"
84-
reason = "<reason>"
85-
severity = "<new_state>" == "ALARM" ? "high" : "info"
77+
time = "<time>"
78+
host = "aws"
79+
source = "aws:cloudwatch:alarm"
80+
sourcetype = "aws:cloudwatch:alarm"
81+
event = {
82+
account_id = "<account>"
83+
region = "<region>"
84+
alarm_name = "<alarm_name>"
85+
new_state = "<new_state>"
86+
old_state = "<old_state>"
87+
reason = "<reason>"
88+
severity = "<new_state>" == "ALARM" ? "high" : "info"
89+
}
8690
})
8791
}
8892
}

0 commit comments

Comments
 (0)