Skip to content

Commit 420aa16

Browse files
Include matchedEvent variable (#8)
1 parent ec8e135 commit 420aa16

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

docs/monitor-data/monitors.mdx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ The URL will receive a HTTP(s) POST with a content type of `application/json`, t
116116

117117
`.Value` — When the notification corresponds to a threshold monitor, this is the value that gave rise to the monitor triggering or resolving.
118118

119+
`.MatchedEvent` — When the notification corresponds to a match monitor, this is the event that gave rise to the monitor matching.
120+
119121
You can use the Go Template syntax to interact with these variables when defining a custom body for your webhook.
120122

121123
A sample webhook body is shown below. This applies the default template shown on creating a custom webhook to a sample notification generated from a threshold monitor triggering.
@@ -131,7 +133,8 @@ A sample webhook body is shown below. This applies the default template shown on
131133
"queryStartTime": "2024-06-28 14:45:57.631364493 +0000 UTC",
132134
"timestamp": "2024-06-28 14:55:57 +0000 UTC",
133135
"title": "Axiom Monitor Test Triggered",
134-
"value": 57347
136+
"value": 57347,
137+
"matchedEvent": null
135138
}
136139
}
137140
```

0 commit comments

Comments
 (0)