From 7ef0a8e978164b4353f842f9dece0d3b943bdac4 Mon Sep 17 00:00:00 2001 From: Matt Carmody Date: Thu, 4 Jan 2024 13:11:52 -0500 Subject: [PATCH] docs: remove metric_condition, add composite alert examples (#197) * remove metric_condition examples * add composite alert example * generate docs * update the md.tmpl files, not the md files * Update docs/resources/alert.md Co-authored-by: Brian Lamb <5820125+lambcode@users.noreply.github.com> * update the md.tmpl files, not the md files again --------- Co-authored-by: Brian Lamb <5820125+lambcode@users.noreply.github.com> --- docs/resources/alert.md | 65 +++++++++++++++- docs/resources/metric_condition.md | 79 -------------------- templates/resources/alert.md.tmpl | 65 +++++++++++++++- templates/resources/metric_condition.md.tmpl | 79 -------------------- 4 files changed, 126 insertions(+), 162 deletions(-) diff --git a/docs/resources/alert.md b/docs/resources/alert.md index 42219659..a61af19f 100644 --- a/docs/resources/alert.md +++ b/docs/resources/alert.md @@ -11,7 +11,7 @@ Provides a [Lightstep alert](https://api-docs.lightstep.com/reference/listalerts Visit [Lightstep's documentation](https://docs.lightstep.com/docs/about-alerts) for conceptual information about alerts and alert templates. -## Example Usage +## Example Usage (single alert) ```hcl resource "lightstep_alert" "beemo-requests" { @@ -19,7 +19,7 @@ resource "lightstep_alert" "beemo-requests" { name = "Frontend latency" expression { - is_multi = true + is_multi = false is_no_data = true operand = "above" thresholds { @@ -46,6 +46,67 @@ EOT } ``` +## Example Usage (composite alert) + +```hcl +resource "lightstep_alert" "high_error_rate_with_sustained_traffic" { + project_name = var.project + name = "Error rates are high for my operation with sustained traffic" + description = <