Skip to content

Commit 5a92b0c

Browse files
update-monitor-example (#253)
Co-authored-by: Mano Toth <[email protected]>
1 parent 69230b0 commit 5a92b0c

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

apps/terraform.mdx

+20
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,33 @@ To create a monitor in Axiom using the provider, add the following code to your
106106
```hcl
107107
resource "axiom_monitor" "test_monitor" {
108108
depends_on = [axiom_dataset.test_dataset, axiom_notifier.test_slack_notifier]
109+
110+
# `type` can be one of the following:
111+
# - "Threshold": For numeric values against thresholds. It requires `operator` and `threshold`.
112+
# - "MatchEvent": For detecting specific events. It doesn’t require `operator` and `threshold`.
113+
# - "AnomalyDetection": For detecting anomalies. It requires `compare_days` and `tolerance, operator`.
114+
115+
type = "Threshold"
116+
109117
name = "test_monitor"
110118
description = "This is a test monitor created by Terraform."
111119
apl_query = "['test_dataset'] | summarize count() by bin_auto(_time)"
112120
interval_minutes = 5
121+
122+
# `operator` is required for threshold and anomaly detection monitors.
123+
# Valid values are "Above", "AboveOrEqual", "Below", "BelowOrEqual".
113124
operator = "Above"
125+
114126
range_minutes = 5
127+
128+
# `threshold` is required for threshold monitors
115129
threshold = 1
130+
131+
# `compare_days` and `tolerance` are required for anomaly detection monitors.
132+
# Uncomment the two lines below for anomaly detection monitors.
133+
# compare_days = 7
134+
# tolerance = 25
135+
116136
notifier_ids = [
117137
axiom_notifier.test_slack_notifier.id
118138
]

0 commit comments

Comments
 (0)