Skip to content

Commit

Permalink
[8.9](backport #3326) [synthetics] Add locations and `private_locat…
Browse files Browse the repository at this point in the history
…ions` lightweight options (#3338)

* [synthetics] Add `locations` and `private_locations` lightweight options (#3326)

* add locations and private_locations lightweight options

* address feedback

* apply suggestions from code review

Co-authored-by: DeDe Morton <[email protected]>

* update link

---------

Co-authored-by: DeDe Morton <[email protected]>
(cherry picked from commit a2f6d5e)

# Conflicts:
#	docs/en/observability/synthetics-reference/lightweight-config/common.asciidoc

* resolve merge conflict

---------

Co-authored-by: Colleen McGinnis <[email protected]>
  • Loading branch information
mergify[bot] and colleenmcginnis authored Nov 6, 2023
1 parent aaee729 commit 93d4ce1
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 2 deletions.
5 changes: 4 additions & 1 deletion docs/en/observability/synthetics-configuration.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -219,4 +219,7 @@ Enable monitor status alerts.
Enable TLS certificate alerts.
// end::monitor-config-options[]

For information on configuring monitors individually, refer to <<synthetics-monitor-use>>.
For information on configuring monitors individually, refer to:

* <<synthetics-monitor-use>> for browser monitors
* <<synthetics-lightweight>> for lightweight monitors
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ name
(<<synthetics-lightweight-data-string,string>>)
a| Human readable name for this monitor.

*Examples*:
*Examples*:

[source,yaml]
----
Expand Down Expand Up @@ -218,6 +218,78 @@ Enable TLS certificate alerts on this monitor.
alert.tls.enabled: true
----

////////////////////////
locations
////////////////////////
| [[monitor-locations]] *`locations`*
(list of https://github.com/elastic/synthetics/blob/{synthetics_version}/src/locations/public-locations.ts#L28-L37[`SyntheticsLocationsType`])
a| Where to deploy the monitor. You can deploy monitors in multiple locations to detect differences in availability and response times across those locations.

To list available locations you can:

* Run the <<elastic-synthetics-locations-command,`elastic-synthetics locations` command>>.
* Go to *Synthetics* -> *Management* and click *Create monitor*. Locations will be listed in _Locations_.
*Examples*:

[source,yaml]
----
locations: ["japan", "india"]
----

[source,yaml]
----
locations:
- japan
- india
----

[NOTE]
====
This can also be set using
<<synthetics-configuration-monitor,`monitor.locations` in the project configuration file>>
or via the CLI using the <<elastic-synthetics-push-command,`--location` flag on `push`>>.
The value defined via the CLI takes precedence over the value defined in the lightweight monitor configuration,
and the value defined in the lightweight monitor configuration takes precedence over the value defined in _project_ configuration file.
====

////////////////////////
private_locations
////////////////////////
| [[monitor-private_locations]] *`private_locations`*
(list of <<synthetics-lightweight-data-string,string>>s)
a| The <<synthetics-private-location,{private-location}s>> to which the monitors will be deployed. These {private-location}s refer to locations 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-location}s you can:

* Run the <<elastic-synthetics-locations-command,`elastic-synthetics locations` command>> and specify the {kib} URL of the deployment. This will fetch all available private locations associated with the deployment.
* Go to *Synthetics* -> *Management* and click *Create monitor*. {private-location}s will be listed in _Locations_.
*Examples*:

[source,yaml]
----
private_locations: ["Private Location 1", "Private Location 2"]
----

[source,yaml]
----
private_locations:
- Private Location 1
- Private Location 2
----

[NOTE]
====
This can also be set using
<<synthetics-configuration-monitor,`monitor.privateLocations` in the project configuration file>>
or via the CLI using the <<elastic-synthetics-push-command,`--privateLocations` flag on `push`>>.
The value defined via the CLI takes precedence over the value defined in the lightweight monitor configuration,
and the value defined in the lightweight monitor configuration takes precedence over the value defined in _project_ configuration file.
====

|===

:!hardbreaks-option:

0 comments on commit 93d4ce1

Please sign in to comment.