Skip to content

Commit

Permalink
Update the CW log metric filter patterns to match the changes in cisa…
Browse files Browse the repository at this point in the history
…gov/cyhy-core#67

By logging a message for any uncaught exceptions, we are able to
trigger AWS CloudWatch metric alarms via the code in
terraform/nvdsync_failure_alarms.tf and
terraform/kevsync_failure_alarms.tf whenever the cyhy-nvdsync or
cyhy-kevsync scripts fails.
  • Loading branch information
jsf9k committed Apr 20, 2022
1 parent 29070e7 commit 370cb41
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion terraform/kevsync_failure_alarms.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ resource "aws_cloudwatch_log_metric_filter" "kevsync_failure" {
for_each = local.db_instances

name = "KEV Sync Failure Count - ${each.value.hostname}"
pattern = "kevsync error"
pattern = "cyhy-kevsync ERROR"
# The instances' CloudWatch Agent's configurations define what the
# log group name looks like.
log_group_name = "/instance-logs/${each.value.hostname}/syslog"
Expand Down
2 changes: 1 addition & 1 deletion terraform/nvdsync_failure_alarms.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ resource "aws_cloudwatch_log_metric_filter" "nvdsync_failure" {
for_each = local.db_instances

name = "NVD Sync Failure Count - ${each.value.hostname}"
pattern = "nvdsync error"
pattern = "cyhy-nvdsync ERROR"
# The instances' CloudWatch Agent's configurations define what the
# log group name looks like.
log_group_name = "/instance-logs/${each.value.hostname}/syslog"
Expand Down

0 comments on commit 370cb41

Please sign in to comment.