Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ML metrics #377

Merged
merged 2 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 25 additions & 15 deletions terraform/modules/marklogic/monitoring_alarms.tf
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,11 @@ resource "aws_cloudwatch_metric_alarm" "time_since_payments_content_backup_high"
statistic = "Maximum"
threshold = 1800 //30 hours in minutes

alarm_description = "Longer than expected since payments-content was backed up"
alarm_actions = [var.alarms_sns_topic_arn]
ok_actions = [var.alarms_sns_topic_arn]
alarm_description = "Longer than expected since payments-content was backed up"
alarm_actions = [var.alarms_sns_topic_arn]
ok_actions = [var.alarms_sns_topic_arn]
insufficient_data_actions = [var.alarms_sns_topic_arn]

treat_missing_data = "missing"
dimensions = {
"metric" = "payments-content-minutes-since-backup"
Expand All @@ -290,9 +292,11 @@ resource "aws_cloudwatch_metric_alarm" "time_since_delta_content_backup_high" {
statistic = "Maximum"
threshold = 1800 //30 hours in minutes

alarm_description = "Longer than expected since delta-content was backed up"
alarm_actions = [var.alarms_sns_topic_arn]
ok_actions = [var.alarms_sns_topic_arn]
alarm_description = "Longer than expected since delta-content was backed up"
alarm_actions = [var.alarms_sns_topic_arn]
ok_actions = [var.alarms_sns_topic_arn]
insufficient_data_actions = [var.alarms_sns_topic_arn]

treat_missing_data = "missing"
dimensions = {
"metric" = "delta-content-minutes-since-backup"
Expand All @@ -309,9 +313,11 @@ resource "aws_cloudwatch_metric_alarm" "time_since_payments_content_incremental_
statistic = "Maximum"
threshold = 900 //15 hours in minutes

alarm_description = "Longer than expected since payments-content was incrementally backed up"
alarm_actions = [var.alarms_sns_topic_arn]
ok_actions = [var.alarms_sns_topic_arn]
alarm_description = "Longer than expected since payments-content was incrementally backed up"
alarm_actions = [var.alarms_sns_topic_arn]
ok_actions = [var.alarms_sns_topic_arn]
insufficient_data_actions = [var.alarms_sns_topic_arn]

treat_missing_data = "missing"
dimensions = {
"metric" = "payments-content-minutes-since-incr-backup"
Expand All @@ -328,9 +334,11 @@ resource "aws_cloudwatch_metric_alarm" "time_since_delta_content_incremental_bac
statistic = "Maximum"
threshold = 900 // 15 hours in minutes

alarm_description = "Longer than expected since delta-content was incrementally backed up"
alarm_actions = [var.alarms_sns_topic_arn]
ok_actions = [var.alarms_sns_topic_arn]
alarm_description = "Longer than expected since delta-content was incrementally backed up"
alarm_actions = [var.alarms_sns_topic_arn]
ok_actions = [var.alarms_sns_topic_arn]
insufficient_data_actions = [var.alarms_sns_topic_arn]

treat_missing_data = "missing"
dimensions = {
"metric" = "delta-content-minutes-since-incr-backup"
Expand All @@ -347,12 +355,14 @@ resource "aws_cloudwatch_metric_alarm" "task_server_queue_size_high" {
statistic = "Minimum"
threshold = 1000

alarm_description = <<EOF
alarm_description = <<EOF
Task server queue size is larger than expected.
Consider clearing the task queue.
EOF
alarm_actions = [var.alarms_sns_topic_arn]
ok_actions = [var.alarms_sns_topic_arn]
alarm_actions = [var.alarms_sns_topic_arn]
ok_actions = [var.alarms_sns_topic_arn]
insufficient_data_actions = [var.alarms_sns_topic_arn]

treat_missing_data = "missing"
dimensions = {
"metric" = "task-server-total-queue-size"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ mainSteps:
inputs:
timeoutSeconds: '120'
runCommand:
- "cloud-init status --wait"
- "mkdir -p /metrics-cron"
- "aws s3 cp --region eu-west-1 {{ShellScriptLocation}} /metrics-cron/metrics-cron.sh"
- "chmod +x /metrics-cron/metrics-cron.sh"
Expand Down
Loading