Skip to content

Commit

Permalink
[synthetics] Add locations and private_locations lightweight opti…
Browse files Browse the repository at this point in the history
…ons (#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)
  • Loading branch information
colleenmcginnis authored and mergify[bot] committed Nov 6, 2023
1 parent 66a5abd commit b419a10
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docs/en/observability/synthetics-configuration.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -227,4 +227,7 @@ Then the monitor will resume running according to the defined schedule.
Using `retestOnFailure` can reduce noise related to transient problems.
// 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 @@ -234,6 +234,78 @@ By default, monitors are automatically retested if the monitor goes from "up" to
retest_on_failure: false
----

////////////////////////
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 b419a10

Please sign in to comment.