You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[synthetics] Update monitor status rule docs (#4345)
* document synthetics monitor status rule
* document how to move from the uptime rule to the synthetics rule
* add code comments
* address feedback from @paulb-elastic
* add info on using slos for availability
* add link
* delete table
* port to serverless
Copy file name to clipboardExpand all lines: docs/en/observability/monitor-status-alert.asciidoc
+257-7Lines changed: 257 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,158 @@
1
1
[[monitor-status-alert]]
2
2
= Create a monitor status rule
3
+
3
4
++++
4
5
<titleabbrev>Monitor status</titleabbrev>
5
6
++++
6
7
8
+
There are two types of monitor status rules:
9
+
10
+
* <<monitor-status-alert-synthetics>> for use with <<monitor-uptime-synthetics,Elastic Synthetics>>.
11
+
* deprecated:[8.15.0] <<monitor-status-alert-uptime>> for use with the Uptime app.
12
+
+
13
+
[WARNING]
14
+
====
15
+
*The Uptime app and the Uptime monitor status rule are deprecated as of version 8.15.0.*
16
+
17
+
If you are using the Uptime monitor status rule with the Uptime app, you should migrate the Uptime monitor and the Uptime monitor status rule to Elastic Synthetics and the Synthetics monitor rule.
18
+
19
+
If you are using the Uptime monitor status rule with a monitor created with Elastic Synthetics, you should migrate the Uptime monitor status rule to the Synthetics monitor rule.
20
+
Learn how in <<migrate-monitor-rule>>.
21
+
====
22
+
23
+
[discrete]
24
+
[[monitor-status-alert-synthetics]]
25
+
== Synthetics monitor status
26
+
27
+
Within the Synthetics UI, create a **Monitor Status** rule to receive notifications
28
+
based on errors and outages.
29
+
30
+
. To access this page, go to **{observability}** → **Synthetics**.
31
+
. At the top of the page, click **Alerts and rules** → **Create rule**.
32
+
. Select **Monitor status rule**.
33
+
34
+
[discrete]
35
+
[[synthetic-monitor-filters]]
36
+
=== Filters
37
+
38
+
The *Filter by* section controls the scope of the rule.
39
+
The rule will only check monitors that match the filters defined in this section.
40
+
In this example, the rule will only alert on `browser` monitors located in `Asia/Pacific - Japan`.
41
+
42
+
[role="screenshot"]
43
+
image::images/synthetic-monitor-filters.png[Filter by section of the Synthetics monitor status rule,width=600]
44
+
45
+
[discrete]
46
+
[[synthetic-monitor-conditions]]
47
+
=== Conditions
48
+
49
+
Conditions for each rule will be applied to all monitors that match the filters in the <<synthetic-monitor-filters,*Filter by* section>>.
50
+
You can choose the number of times the monitor has to be down relative to either a number of checks run
51
+
or a time range in which checks were run, and the minimum number of locations the monitor must be down in.
52
+
53
+
[NOTE]
54
+
====
55
+
Retests are included in the number of checks.
56
+
====
57
+
58
+
The *Rule schedule* defines how often to evaluate the condition. Note that checks are queued, and they run as close
59
+
to the defined value as capacity allows. For example, if a check is scheduled to run every 2 minutes, but the check
60
+
takes longer than 2 minutes to run, a check will not run until the previous check has finished.
61
+
62
+
You can also set *Advanced options* such as the number of consecutive runs that must meet the rule conditions before
63
+
an alert occurs.
64
+
65
+
In this example, the conditions will be met any time a `browser` monitor is down `3` of the last `5` times
66
+
the monitor ran across any locations that match the filter. These conditions will be evaluated every minute,
67
+
and you will only receive an alert when the conditions are met three times consecutively.
68
+
69
+
[role="screenshot"]
70
+
image::images/synthetic-monitor-conditions.png[Filters and conditions defining a Synthetics monitor status rule,width=600]
71
+
72
+
[discrete]
73
+
[[synthetic-monitor-action-types]]
74
+
=== Action types
75
+
76
+
Extend your rules by connecting them to actions that use the following supported built-in integrations.
The following variables are specific to this rule type.
118
+
You an also specify {kibana-ref}/rule-action-variables.html[variables common to all rules].
119
+
120
+
`context.checkedAt`:: Timestamp of the monitor run.
121
+
`context.hostName`:: Hostname of the location from which the check is performed.
122
+
`context.lastErrorMessage`:: Monitor last error message.
123
+
`context.locationId`:: Location id from which the check is performed.
124
+
`context.locationName`:: Location name from which the check is performed.
125
+
`context.locationNames`:: Location names from which the checks are performed.
126
+
`context.message`:: A generated message summarizing the status of monitors currently down.
127
+
`context.monitorId`:: ID of the monitor.
128
+
`context.monitorName`:: Name of the monitor.
129
+
`context.monitorTags`:: Tags associated with the monitor.
130
+
`context.monitorType`:: Type (for example, HTTP/TCP) of the monitor.
131
+
`context.monitorUrl`:: URL of the monitor.
132
+
`context.reason`:: A concise description of the reason for the alert.
133
+
`context.recoveryReason`:: A concise description of the reason for the recovery.
134
+
`context.status`:: Monitor status (for example, "down").
135
+
`context.viewInAppUrl`:: Open alert details and context in Synthetics app.
136
+
137
+
[discrete]
138
+
[[monitor-status-alert-uptime]]
139
+
== Uptime monitor status
140
+
141
+
[WARNING]
142
+
====
143
+
*The Uptime app and the Uptime monitor status rule are deprecated as of version 8.15.0.*
144
+
145
+
If you are using the Uptime monitor status rule with the Uptime app, you should migrate the Uptime monitor and the Uptime monitor status rule to Elastic Synthetics and the Synthetics monitor rule.
146
+
147
+
If you are using the Uptime monitor status rule with a monitor created with Elastic Synthetics, you should migrate the Uptime monitor status rule to the Synthetics monitor rule.
148
+
Learn how in <<migrate-monitor-rule>>.
149
+
====
150
+
7
151
Within the {uptime-app}, create a **Monitor Status** rule to receive notifications
8
152
based on errors and outages.
9
153
10
-
. To access this page, go to **{observability}** -> **Uptime**.
11
-
. At the top of the page, click **Alerts and rules** -> **Create rule**.
154
+
. To access this page, go to **{observability}** → **Uptime**.
155
+
. At the top of the page, click **Alerts and rules** → **Create rule**.
12
156
. Select **Monitor status rule**.
13
157
14
158
[TIP]
@@ -18,7 +162,7 @@ If you already have a query in the overview page search bar, it's populated here
18
162
19
163
[discrete]
20
164
[[status-alert-conditions]]
21
-
== Conditions
165
+
=== Conditions
22
166
23
167
You can specify the following thresholds for your rule.
24
168
@@ -45,7 +189,7 @@ the alert is triggered.
45
189
46
190
[discrete]
47
191
[[action-types-status]]
48
-
== Action types
192
+
=== Action types
49
193
50
194
You can extend your rules by connecting them to actions that use the following
51
195
supported built-in integrations. Actions are {kib} services or integrations with
@@ -69,7 +213,7 @@ image::images/uptime-run-when-selection.png[Action frequency for each alert,widt
69
213
70
214
[discrete]
71
215
[[action-variables-status]]
72
-
== Action variables
216
+
=== Action variables
73
217
74
218
Use the default notification message or customize it.
75
219
You can add more context to the message by clicking the icon above the message text box
To receive a notification when the alert recovers, select *Run when Recovered*. Use the default notification message or customize it. You can add more context to the message by clicking the icon above the message text box and selecting from a list of available variables.
86
230
87
231
[role="screenshot"]
88
-
image::images/monitor-status-alert-recovery.png[Default recovery message for monitor status rules with open "Add variable" popup listing available action variables,width=600]
232
+
image::images/monitor-status-alert-recovery.png[Default recovery message for monitor status rules with open "Add variable" popup listing available action variables,width=600]
233
+
234
+
[discrete]
235
+
[[migrate-monitor-rule]]
236
+
== Migrate from the Uptime rule to the Synthetics rule
237
+
238
+
If you are currently using the Uptime monitor status with a monitor created with Elastic Synthetics,
239
+
you should migrate the Uptime monitor status rule to:
240
+
241
+
* The *Synthetics monitor rule* for <<migrate-monitor-rule-synthetics-rule,synthetic monitor _status_ checks>>.
242
+
* The *Synthetics availability SLI* for <<migrate-monitor-rule-synthetics-sli,synthetic monitor _availability_ checks>>.
243
+
244
+
[discrete]
245
+
[[migrate-monitor-rule-synthetics-rule]]
246
+
=== Uptime status check to Synthetics monitor rule
247
+
248
+
[discrete]
249
+
==== Filters
250
+
251
+
The KQL syntax that you used in the Uptime monitor status rule is also valid in the *Filter by* section
252
+
of the Synthetics monitor status rule. The Synthetics monitor status rule also offers dropdowns for several
253
+
categories for easy filtering. However, you can still use KQL syntax for these categories if you prefer.
254
+
255
+
[discrete]
256
+
==== Conditions
257
+
258
+
[NOTE]
259
+
====
260
+
If you are using the _Uptime availability condition_ refer to <<migrate-monitor-rule-synthetics-sli>>.
261
+
====
262
+
263
+
If you're using the Uptime status check condition, you can recreate similar effects using the following
264
+
Synthetics monitor status rule condition equivalents:
265
+
266
+
|===
267
+
| | Uptime | Synthetics equivalent
268
+
269
+
| *Number of times the monitor is down*
270
+
a| `ANY MONITOR IS DOWN >=` `{number}` times
271
+
272
+
*Example*: `ANY MONITOR IS DOWN >=` `5` times
273
+
a| `IS DOWN` `{number}` times
274
+
275
+
*Example*: `IS DOWN` `5` times
276
+
277
+
| *Timeframe*
278
+
a| `WITHIN last` `{number}` `{time range unit}`
279
+
280
+
*Example*: `WITHIN last` `15` `minutes`
281
+
282
+
a| `WITHIN THE LAST` `{number}` `{time range unit}`
283
+
284
+
*Example*: `WITHIN THE LAST` `15` `minutes`
285
+
286
+
|===
287
+
288
+
[discrete]
289
+
==== Actions
290
+
291
+
The default messages for the Uptime monitor status rule and Synthetics monitor status rule are different,
292
+
but you can recreate similar messages using <<synthetic-monitor-action-variables,Synthetics monitor status rule action variables>>.
293
+
294
+
[discrete]
295
+
[[migrate-monitor-rule-synthetics-sli]]
296
+
=== Uptime availability check to Synthetics availability SLI
297
+
298
+
SLOs allow you to set clear, measurable targets for your service performance, based on factors like availability.
299
+
The <<synthetics-availability-sli,Synthetics availability SLI>> is a service-level indicator (SLI) based on the
300
+
availability of your synthetic monitors.
301
+
302
+
[discrete]
303
+
==== Filters
304
+
305
+
The KQL syntax that you used in the Uptime monitor status rule is also valid in the *Query filter*
306
+
field of the Synthetics availability SLI.
307
+
308
+
[discrete]
309
+
==== Conditions
310
+
311
+
Use the following Synthetics availability SLI fields to replace the Uptime monitor status rule's
312
+
availability conditions:
313
+
314
+
|===
315
+
| | Uptime | Synthetics equivalent
316
+
317
+
| *Number of checks that are down relative to all checks run*
318
+
a| `ANY MONITOR IS UP IN <` `{percent}` of checks
319
+
320
+
*Example*: `ANY MONITOR IS UP IN <` `90%` of checks
321
+
a| *Target / SLO (%)* field
322
+
323
+
*Example*: `90%`
324
+
325
+
| *Timeframe*
326
+
a| `WITHIN THE LAST` `{number}` `{time range unit}`
327
+
328
+
*Example*: `WITHIN THE LAST` `30` `days`
329
+
a| *Time window* and *Duration* fields
330
+
331
+
*Example*: Time window: `Rolling`, Duration: `30 days`
332
+
|===
333
+
334
+
[discrete]
335
+
==== Actions
336
+
337
+
After creating a new SLO using the Synthetics availability SLI, you can use the SLO burn rate rule.
338
+
For more information about configuring the rule, see <<slo-burn-rate-alert,Create an SLO burn rate rule>>.
0 commit comments