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.
The alert configuration. The default is { status: { enabled: true }, tls: { enabled: true } }.
statusmapstring to {}object
enabledbooleanrequired
groupBystring
tlsmapstring to {}object
enabledbooleanrequired
groupBystring
certificate_error_spki_allowlistobject
Any JSON value.
checkobject
Any JSON value.
check.receiveobject
Any JSON value.
check.request.bodyobject
Any JSON value.
check.request.headersobject
Any JSON value.
check.request.methodobject
Any JSON value.
check.response.body.negativeobject
Any JSON value.
check.response.body.positiveobject
Any JSON value.
check.response.headersobject
Any JSON value.
check.response.jsonobject
Any JSON value.
check.response.statusobject
Any JSON value.
check.sendobject
Any JSON value.
enabledboolean
Specify whether the monitor is enabled. Defaults to true.
filter_journeysobject
Any JSON value.
filter_journeys.matchobject
Any JSON value.
filter_journeys.tagsobject
Any JSON value.
hoststring · max length: 4096
The host to monitor; it can be an IP address or a hostname.
idobject
Any JSON value.
ignore_https_errorsobject
Any JSON value.
inline_scriptstring · max length: 1000000
The inline script.
ipv4boolean
If true, ping using the ipv4 protocol. Defaults to true.
ipv6boolean
If true, ping using the ipv6 protocol. Defaults to true.
kerberosobject
Any JSON value.
labelsmapstring 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
locationsunionanyOf[] · 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 locations command with the deployment's Kibana URL, or go to Synthetics > Management and click Create monitor.
You can provide locations or private_locations or both. At least one is required.
Any of:
idstring · min length: 1 · max length: 1024required
maintenance_windowsstring[] · max items: 1000
The IDs of the maintenance windows to apply to the monitor.
max_redirectsunionstring | number
The maximum number of redirects to follow. Defaults to 0.
modeenum
The mode of the monitor. If it is all, the monitor pings all resolvable IPs for a hostname. If it is any, 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, use all. Defaults to any.
Values:anyall
namestring · max length: 4096
The monitor name.
namespacestring
The namespace field should be lowercase and not contain spaces. The namespace must not include any of the following characters: *, \, /, ?, ", <, >, |, whitespace, ,, #, :, or -. Defaults to default.
ntlmobject
Any JSON value.
paramsunionanyOf
The monitor parameters, as a JSON string or an object.
Any of:stringorKey-value object
passwordobject
Any JSON value.
playwright_optionsobject
Any JSON value.
playwright_text_assertionobject
Any JSON value.
private_locationsunionanyOf[] · max items: 1000
The private locations to deploy the monitor to.
These locations are hosted and managed by you, whereas locations are hosted by Elastic.
You can specify a private location using the location's name.
To list available private locations, run the elastic-synthetics locations command with the deployment's Kibana URL, or go to Synthetics > Settings and click Private locations.
Any of:
idstring · min length: 1 · max length: 1024required
proxy_headersobject
Any JSON value.
proxy_urlobject
Any JSON value.
proxy_use_local_resolverobject
Any JSON value.
responseobject
Any JSON value.
response.include_bodyobject
Any JSON value.
response.include_body_max_bytesobject
Any JSON value.
response.include_headersobject
Any JSON value.
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_failure can reduce noise related to transient problems.
scheduleunionanyOf
The monitor's schedule in minutes. Supported values are 1, 3, 5, 10, 15, 30, 60, 120, and 240. The default value is 3 minutes for HTTP, TCP, and ICMP monitors, and 10 minutes for browser monitors.
Any of:
numberunionstring | numberrequired
unitenumrequired
Values:ms
screenshotsobject
Any JSON value.
service.nameobject
Any JSON value.
sourceobject
Any JSON value.
source.inlineobject
Any JSON value.
source.inline.scriptobject
Any JSON value.
source.project.contentobject
Any JSON value.
spacesstring[] · max items: 1000
The IDs of additional spaces to make the monitor available in, besides the current space.
sslobject
Any JSON value.
ssl.certificateobject
Any JSON value.
ssl.certificate_authoritiesobject
Any JSON value.
ssl.keyobject
Any JSON value.
ssl.key_passphraseobject
Any JSON value.
ssl.supported_protocolsobject
Any JSON value.
ssl.verification_modeobject
Any JSON value.
synthetics_argsobject
Any JSON value.
tagsunionstring | string[]
An array of tags.
throttlingobject
Any JSON value.
timeoutunionstring | 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.