synthetics

Update a monitor

Changed on

Spaces method and path for this operation:

<div><span class="operation-verb put">put</span>&nbsp;<span class="operation-path">/s/{space_id}/api/synthetics/monitors/{id}</span></div>

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.<br/><br/>[Required authorization] Route required privileges: uptime-read AND uptime-write.

put/api/synthetics/monitors/{id}

Request

  • Base URL
    https://localhost:5601
  • URL
    https://localhost:5601/api/synthetics/monitors/{id}
  • Auth
    • API key in header Authorization
    • or HTTP basic

Path parameters

idstring required

The identifier for the monitor that you want to update.

Headers

kbn-xsrfstring required
Example:true

A required header to protect against CSRF attacks

Request body

certificate_error_spki_allowlistunknown
checkunknown
check.receiveunknown
check.request.bodyunknown
check.request.headersunknown
check.request.methodunknown
check.response.body.negativeunknown
check.response.body.positiveunknown
check.response.headersunknown
check.response.jsonunknown
check.response.statusunknown
check.sendunknown
enabledboolean

Specify whether the monitor is enabled. Defaults to true.

filter_journeysunknown
filter_journeys.matchunknown
filter_journeys.tagsunknown
hoststring

The host to monitor; it can be an IP address or a hostname.

idunknown
ignore_https_errorsunknown
inline_scriptstring

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.

kerberosunknown
labelsobject

Key-value pairs of labels to associate with the monitor. Labels can be used for filtering and grouping monitors.

maintenance_windowsstring[]

The IDs of the maintenance windows to apply to the monitor.

mode'any' | 'all'

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.

namestring

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.

ntlmunknown
passwordunknown
playwright_optionsunknown
playwright_text_assertionunknown
proxy_headersunknown
proxy_urlunknown
proxy_use_local_resolverunknown
responseunknown
response.include_bodyunknown
response.include_body_max_bytesunknown
response.include_headersunknown
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.

screenshotsunknown
service.nameunknown
sourceunknown
source.inlineunknown
source.inline.scriptunknown
source.project.contentunknown
spacesstring[]

The IDs of additional spaces to make the monitor available in, besides the current space.

sslunknown
ssl.certificateunknown
ssl.certificate_authoritiesunknown
ssl.keyunknown
ssl.key_passphraseunknown
ssl.supported_protocolsunknown
ssl.verification_modeunknown
synthetics_argsunknown
throttlingunknown
type'http' | 'tcp' | 'icmp' | 'browser' | 'api'
urlstring

The URL to monitor.

usernameunknown
waitunknown

Response

A successful response. The response may include a warnings array when the monitor configuration has non-critical issues.

Changes

    • info

      added the new optional request property //