From 88e36ecbf3e9091870bca4d5f27e1754a153ea4e Mon Sep 17 00:00:00 2001 From: Andreas Wilson <41663792+andrwils@users.noreply.github.com> Date: Wed, 11 Dec 2024 17:15:13 -0800 Subject: [PATCH 1/2] feat: remove heartbeat monitor section --- .../alerting/agent-heartbeat.monitor.json | 45 ++++++------------- 1 file changed, 13 insertions(+), 32 deletions(-) diff --git a/workflow-cli/configuration-opensearch/alerting/agent-heartbeat.monitor.json b/workflow-cli/configuration-opensearch/alerting/agent-heartbeat.monitor.json index afa4ecb..7be5275 100644 --- a/workflow-cli/configuration-opensearch/alerting/agent-heartbeat.monitor.json +++ b/workflow-cli/configuration-opensearch/alerting/agent-heartbeat.monitor.json @@ -5,8 +5,8 @@ "enabled": true, "schedule": { "period": { - "interval": 1, - "unit": "MINUTES" + "interval": 1, + "unit": "MINUTES" } }, "inputs": [ @@ -85,7 +85,7 @@ "destination_id": "appinfra-msteams", "message_template": { "source": "{ \"text\": \"Monitor {{ctx.monitor.name}} just entered alert status. Please investigate the issue.\n - Trigger: {{ctx.trigger.name}}\n - Severity: {{ctx.trigger.severity}}\n - Period start: {{ctx.periodStart}}\n - Period end: {{ctx.periodEnd}}\" }", - "lang" : "mustache" + "lang": "mustache" }, "throttle_enabled": true, "throttle": { @@ -94,7 +94,7 @@ }, "subject_template": { "source": "", - "lang" : "mustache" + "lang": "mustache" } }, { @@ -103,7 +103,7 @@ "destination_id": "automation-sqs-sns", "message_template": { "source": "{ \"type\": \"agent_down\", \"server\": \"<%= server.name %>\", \"agent\": \"fluent-bit.<%= agent.index %>\", \"periodStart\": \"{{ctx.periodStart}}\", \"periodEnd\": \"{{ctx.periodEnd}}\" }", - "lang" : "mustache" + "lang": "mustache" }, "throttle_enabled": true, "throttle": { @@ -112,7 +112,7 @@ }, "subject_template": { "source": "Notify", - "lang" : "mustache" + "lang": "mustache" } }, { @@ -120,25 +120,6 @@ "id": "<%= idgen('action-nonprod-wf', server.name, agent.index) %>", "name": "notify", "destination_id": "wf-nonprod-msteams", - "message_template": { - "source": "{\"text\": \"No logs received from <%= server.name %> between {{ctx.periodStart}} and {{ctx.periodEnd}}\"}", - "lang": "mustache" - }, - "throttle_enabled": true, - "subject_template": { - "source": "", - "lang": "mustache" - }, - "throttle": { - "value": 240, - "unit": "MINUTES" - } - }, - { - "$$OMIT": "<%= !serverTag('wildfire') || serverTag('production') ? 'true' : 'false' %>", - "id": "<%= idgen('action-nonprod-wf', server.name, agent.index) %>", - "name": "notify", - "destination_id": "wf-nonprod-msteams", "message_template": { "source": "{\"text\": \"No logs received from <%= server.name %> between {{ctx.periodStart}} and {{ctx.periodEnd}}\"}", "lang": "mustache" @@ -159,19 +140,19 @@ "name": "notify", "destination_id": "wf-prod-msteams", "message_template": { - "source": "{\"text\": \"No logs received from <%= server.name %> between {{ctx.periodStart}} and {{ctx.periodEnd}}\"}", - "lang": "mustache" + "source": "{\"text\": \"No logs received from <%= server.name %> between {{ctx.periodStart}} and {{ctx.periodEnd}}\"}", + "lang": "mustache" }, "throttle_enabled": true, "subject_template": { - "source": "", - "lang": "mustache" + "source": "", + "lang": "mustache" }, "throttle": { - "value": 30, - "unit": "MINUTES" + "value": 30, + "unit": "MINUTES" } - } + } ] } } From 263ffe2154af3364deb3e38301f80c0a9ceccb2f Mon Sep 17 00:00:00 2001 From: Andreas Wilson <41663792+andrwils@users.noreply.github.com> Date: Wed, 11 Dec 2024 17:25:11 -0800 Subject: [PATCH 2/2] feat: rename actions --- .../alerting/agent-heartbeat.monitor.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/workflow-cli/configuration-opensearch/alerting/agent-heartbeat.monitor.json b/workflow-cli/configuration-opensearch/alerting/agent-heartbeat.monitor.json index 7be5275..4e4eee7 100644 --- a/workflow-cli/configuration-opensearch/alerting/agent-heartbeat.monitor.json +++ b/workflow-cli/configuration-opensearch/alerting/agent-heartbeat.monitor.json @@ -81,7 +81,7 @@ "actions": [ { "id": "<%= idgen('action-teams', server.name, agent.index) %>", - "name": "Notify Teams Channel", + "name": "Notify Appinfra Teams Channel", "destination_id": "appinfra-msteams", "message_template": { "source": "{ \"text\": \"Monitor {{ctx.monitor.name}} just entered alert status. Please investigate the issue.\n - Trigger: {{ctx.trigger.name}}\n - Severity: {{ctx.trigger.severity}}\n - Period start: {{ctx.periodStart}}\n - Period end: {{ctx.periodEnd}}\" }", @@ -118,7 +118,7 @@ { "$$OMIT": "<%= !serverTag('wildfire') || !serverTag('nonproduction') ? 'true' : 'false' %>", "id": "<%= idgen('action-nonprod-wf', server.name, agent.index) %>", - "name": "notify", + "name": "Notify Wildfire Nonprod Teams Channel", "destination_id": "wf-nonprod-msteams", "message_template": { "source": "{\"text\": \"No logs received from <%= server.name %> between {{ctx.periodStart}} and {{ctx.periodEnd}}\"}", @@ -137,7 +137,7 @@ { "$$OMIT": "<%= !serverTag('wildfire') || !serverTag('production') ? 'true' : 'false' %>", "id": "<%= idgen('action-prod-wf', server.name, agent.index) %>", - "name": "notify", + "name": "Notify Wildfire Prod Teams Channel", "destination_id": "wf-prod-msteams", "message_template": { "source": "{\"text\": \"No logs received from <%= server.name %> between {{ctx.periodStart}} and {{ctx.periodEnd}}\"}",