From 3fe9d8366c5e4364002d38b590378550f2fa7808 Mon Sep 17 00:00:00 2001 From: emilioalvap Date: Fri, 21 Nov 2025 16:56:03 +0100 Subject: [PATCH 1/2] [synthetics] Add maintenance windows options docs --- solutions/observability/synthetics/cli.md | 6 ++++++ .../synthetics/configure-lightweight-monitors.md | 13 +++++++++++++ .../observability/synthetics/configure-projects.md | 3 +++ 3 files changed, 22 insertions(+) diff --git a/solutions/observability/synthetics/cli.md b/solutions/observability/synthetics/cli.md index ac829a7f89..11e4f2491d 100644 --- a/solutions/observability/synthetics/cli.md +++ b/solutions/observability/synthetics/cli.md @@ -180,6 +180,12 @@ If the journey contains external NPM packages other than the `@elastic/synthetic This can also be set in the configuration file using [the `monitor.fields` option](/solutions/observability/synthetics/configure-projects.md#synthetics-configuration-monitor). The value defined via the CLI will take precedence. +`--maintenance-windows Array` +: A list of maintenance window IDs used to associate every monitor with one or more [maintenance windows](/explore-analyze/alerts-cases/alerts/maintenance-windows.md). This argument accepts a variable number of values as shown in the example. + Example: `--maintenance-windows "maintenance-window-ID-1" "maintenance-window-ID-2` + + This can also be set in the configuration file using [the `monitor.fields` option](/solutions/observability/synthetics/configure-projects.md#synthetics-configuration-monitor). The value defined via the CLI will take precedence. + `--yes` : The `push` command includes interactive prompts to prevent you from accidentally deleting or duplicating monitors. If running the CLI non-interactively, you can override these prompts using the `--yes` option. When the `--yes` option is passed to `push`: diff --git a/solutions/observability/synthetics/configure-lightweight-monitors.md b/solutions/observability/synthetics/configure-lightweight-monitors.md index e7d5f6221a..42e2508b6e 100644 --- a/solutions/observability/synthetics/configure-lightweight-monitors.md +++ b/solutions/observability/synthetics/configure-lightweight-monitors.md @@ -377,6 +377,19 @@ $$$monitor-namespace$$$ namespace: custom-namespace ``` +$$$monitor-maintenanceWindows$$$ + +**`maintenance_windows`** +: Type: [string](/solutions/observability/synthetics/configure-lightweight-monitors.md#synthetics-lightweight-data-string) + + A list of maintenance window IDs used to associate this monitor with one or more [maintenance windows](/explore-analyze/alerts-cases/alerts/maintenance-windows.md). + + **Examples**: + + ```yaml + maintenance_windows: ["maintenance-window-ID-1", "maintenance-window-ID-2"] + ``` + ### HTTP options [synthetics-lightweight-http] The options described here configure Synthetics to connect via HTTP and optionally verify that the host returns the expected response. diff --git a/solutions/observability/synthetics/configure-projects.md b/solutions/observability/synthetics/configure-projects.md index 62be638870..3a73ee3ef7 100644 --- a/solutions/observability/synthetics/configure-projects.md +++ b/solutions/observability/synthetics/configure-projects.md @@ -295,6 +295,9 @@ For information on configuring monitors individually, refer to: * [Configure individual browser monitors](/solutions/observability/synthetics/configure-individual-browser-monitors.md) for browser monitors * [Configure lightweight monitors](/solutions/observability/synthetics/configure-lightweight-monitors.md) for lightweight monitors +`maintenanceWindows` (`Array`) +: A list of maintenance window IDs used to associate this monitor with one or more [maintenance windows](/explore-analyze/alerts-cases/alerts/maintenance-windows.md). + ## `proxy` [synthetics-configuration-proxy] `uri` (`string`) From a03def3e7ca1697f35cc125684332b9a087d4a8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Alvarez=20Pi=C3=B1eiro?= <95703246+emilioalvap@users.noreply.github.com> Date: Mon, 24 Nov 2025 12:09:13 +0100 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Mike Birnstiehl <114418652+mdbirnstiehl@users.noreply.github.com> --- solutions/observability/synthetics/cli.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/solutions/observability/synthetics/cli.md b/solutions/observability/synthetics/cli.md index 11e4f2491d..0d0886eb52 100644 --- a/solutions/observability/synthetics/cli.md +++ b/solutions/observability/synthetics/cli.md @@ -182,7 +182,8 @@ If the journey contains external NPM packages other than the `@elastic/synthetic `--maintenance-windows Array` : A list of maintenance window IDs used to associate every monitor with one or more [maintenance windows](/explore-analyze/alerts-cases/alerts/maintenance-windows.md). This argument accepts a variable number of values as shown in the example. - Example: `--maintenance-windows "maintenance-window-ID-1" "maintenance-window-ID-2` + + Example: `--maintenance-windows "maintenance-window-ID-1" "maintenance-window-ID-2` This can also be set in the configuration file using [the `monitor.fields` option](/solutions/observability/synthetics/configure-projects.md#synthetics-configuration-monitor). The value defined via the CLI will take precedence.