generated from cds-snc/project-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: suppress missing patch CloudWatch alarms (#902)
Update the API's CloudWatch error and warning alarms to no longer trigger if there is a missing update patch. This is caused by the target ClamAV update server not having a patch available yet and will resolve on its own.
- Loading branch information
Showing
2 changed files
with
40 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
locals { | ||
api_functions = [ | ||
{ | ||
name = "api", | ||
log_group_name = var.scan_files_api_log_group_name, | ||
}, | ||
{ | ||
name = "api-provisioned", | ||
log_group_name = var.scan_files_api_sync_log_group_name, | ||
}, | ||
] | ||
error_logged_api = "ErrorLogged" | ||
error_logged_s3_scan_object = "ErrorLoggedS3ScanObject" | ||
error_namespace = "ScanFiles" | ||
scan_verdict_suspicious = "ScanVerdictSuspicious" | ||
scan_verdict_unknown = "ScanVerdictUnknown" | ||
warning_logged_api = "WarningLogged" | ||
|
||
# Metric filter patterns | ||
api_errors = [ | ||
"ERROR", | ||
"Error", | ||
"error", | ||
"failed", | ||
] | ||
api_errors_skip = [ | ||
"database server doesn't have the latest patch", | ||
] | ||
api_warnings = [ | ||
"Warning", | ||
"warning", | ||
] | ||
api_warnings_skip = [ | ||
"database server doesn't have the latest patch", | ||
] | ||
api_error_metric_pattern = "[(w1=\"*${join("*\" || w1=\"*", local.api_errors)}*\") && w1!=\"*${join("*\" && w1!=\"*", local.api_errors_skip)}*\"]" | ||
api_warning_metric_pattern = "[(w1=\"*${join("*\" || w1=\"*", local.api_warnings)}*\") && w1!=\"*${join("*\" && w1!=\"*", local.api_warnings_skip)}*\"]" | ||
} |