Update a monitor
- Base URL
-
https://{kibana_url}
Refer to Spaces for more information.
Update a monitor with the specified attributes. The required and default fields may vary based on the monitor type.
You must have all privileges for the Synthetics feature in the Observability section of the Kibana feature privileges.
You can also partially update a monitor.
This will only update the fields that are specified in the request body.
All other fields are left unchanged.
The specified fields should conform to the monitor type.
For example, you can't update the inline_script field of a HTTP monitor.
Required authorization
- Privileges uptime-read and uptime-write
Request body
-
alertmap string to object -
The alert configuration. The default is
{ status: { enabled: true }, tls: { enabled: true } }. -
Any JSON value.
-
labelsmap string to string -
Key-value pairs of labels to associate with the monitor. Labels can be used for filtering and grouping monitors.
-
<string>string · max length: 1000000 -
locationsanyOf · max items: 1000 -
The Elastic-managed locations to deploy the monitor to. Monitors can be deployed in multiple locations so that you can detect differences in availability and response times across those locations. To list available locations, run the
elastic-synthetics locationscommand with the deployment's Kibana URL, or go to Synthetics > Management and click Create monitor.You can provide
locationsorprivate_locationsor both. At least one is required. -
maintenance_windowsstring · max items: 1000 -
The IDs of the maintenance windows to apply to the monitor.
-
mode -
The mode of the monitor. If it is
all, the monitor pings all resolvable IPs for a hostname. If it isany, the monitor pings only one IP address for a hostname. If you're using a DNS-load balancer and want to ping every IP address for the specified hostname, useall. Defaults toany. -
Values:
anyall -
namespacestring -
The namespace field should be lowercase and not contain spaces. The namespace must not include any of the following characters:
*,\,/,?,",<,>,|, whitespace,,,#,:, or-. Defaults todefault. -
private_locationsanyOf · max items: 1000 -
The private locations to deploy the monitor to. These locations are hosted and managed by you, whereas
locationsare hosted by Elastic. You can specify a private location using the location's name. To list available private locations, run theelastic-synthetics locationscommand with the deployment's Kibana URL, or go to Synthetics > Settings and click Private locations. -
retest_on_failureboolean -
Turn retesting for when a monitor fails on or off. By default, monitors are automatically retested if the monitor goes from "up" to "down". If the result of the retest is also "down", an error is created and, if configured, an alert is sent. Using
retest_on_failurecan reduce noise related to transient problems. -
scheduleanyOf -
The monitor's schedule in minutes. Supported values are
1,3,5,10,15,30,60,120, and240. The default value is3minutes for HTTP, TCP, and ICMP monitors, and10minutes for browser monitors. -
spacesstring · max items: 1000 -
The IDs of additional spaces to make the monitor available in, besides the current space.
-
Any JSON value.
-
An array of tags.
-
timeoutstring | number -
The monitor timeout in seconds. The monitor fails if it doesn't complete within this time. Defaults to
16.For browser monitors, the minimum timeout is 30 seconds. Browser monitor timeouts only apply on private locations; on public locations the timeout has no effect and the response includes a warning.
string
string
number
Responses
A successful response. The response may include a warnings array when the monitor configuration has non-critical issues.
Bad request. For browser monitors, a 400 error is returned if the timeout is less than 30 seconds.
The monitor does not exist.