From e71c5d9c6c71867f22d28be19ad8bb25fe9a3497 Mon Sep 17 00:00:00 2001 From: Jon Moses Date: Thu, 25 Jul 2024 12:17:41 -0400 Subject: [PATCH] fix(docs): Regenerate docs after alert example changes This change fixes a small typo in an alert example, and regenerates the documentation to capture that, and the previous example updates. Ref: LOG-20284 --- docs/resources/absence_alert.md | 13 +++++++++---- docs/resources/change_alert.md | 16 ++++++++++++---- docs/resources/threshold_alert.md | 19 +++++++++++++++---- .../resources/mezmo_absence_alert/resource.tf | 2 +- 4 files changed, 37 insertions(+), 13 deletions(-) diff --git a/docs/resources/absence_alert.md b/docs/resources/absence_alert.md index 62575997..0c63fa00 100644 --- a/docs/resources/absence_alert.md +++ b/docs/resources/absence_alert.md @@ -42,10 +42,15 @@ resource "mezmo_absence_alert" "no_data_alert" { name = "metrics absence alert" event_type = "metric" window_duration_minutes = 15 - subject = "No data received!" - severity = "WARNING" - body = "There has been no metrics data recieved in the last 15 minutes!" - ingestion_key = "abc123" + alert_payload = { + service = { + name = "log_analysis" + subject = "No data received!" + severity = "WARNING" + body = "There has been no metrics data received in the last 15 minutes!" + ingestion_key = "abc123" + } + } } ``` diff --git a/docs/resources/change_alert.md b/docs/resources/change_alert.md index 05a369fb..cd80cf69 100644 --- a/docs/resources/change_alert.md +++ b/docs/resources/change_alert.md @@ -62,10 +62,18 @@ resource "mezmo_change_alert" "order_spike" { } window_type = "sliding" window_duration_minutes = 15 - subject = "Spike in ordering!" - severity = "WARNING" - body = "There has been a > 20% increase in orders over the last 15 minutes. Check application scaling." - ingestion_key = "abc123" + + alert_payload = { + service = { + name = "webhook" + uri = "https://example.com/my_webhook" + message_text = "There has been a > 20% increase in orders ({{.total_orders}}) over the last 15 minutes. Check application scaling." + } + throttling = { + window_secs = 3600 + threshold = 2 + } + } } ``` diff --git a/docs/resources/threshold_alert.md b/docs/resources/threshold_alert.md index f4031639..7284bbd8 100644 --- a/docs/resources/threshold_alert.md +++ b/docs/resources/threshold_alert.md @@ -62,10 +62,21 @@ resource "mezmo_threshold_alert" "order_count" { } window_type = "tumbling" window_duration_minutes = 60 - subject = "Lots of orders coming in the last hour!" - severity = "WARNING" - body = "Check to make sure there are no errors in pricing, and no unexpected special offers were released." - ingestion_key = "abc123" + alert_payload = { + service = { + name = "pager_duty" + uri = "https://example.com/pager_duty_api" + source = "{{.my_source}}" + routing_key = "abc123" + severity = "CRITICAL" + event_action = "trigger" + summary = "Check to make sure there are no errors in pricing, and no unexpected special offers were released." + } + throttling = { + window_secs = 3600 + threshold = 1 + } + } } ``` diff --git a/examples/resources/mezmo_absence_alert/resource.tf b/examples/resources/mezmo_absence_alert/resource.tf index 1ec3abd2..4970c7fa 100644 --- a/examples/resources/mezmo_absence_alert/resource.tf +++ b/examples/resources/mezmo_absence_alert/resource.tf @@ -32,7 +32,7 @@ resource "mezmo_absence_alert" "no_data_alert" { name = "log_analysis" subject = "No data received!" severity = "WARNING" - body = "There has been no metrics data recieved in the last 15 minutes!" + body = "There has been no metrics data received in the last 15 minutes!" ingestion_key = "abc123" } }