Skip to content

Commit

Permalink
Add documentation clarification (#3382)
Browse files Browse the repository at this point in the history
* Update how hosts and ports are configured
* Add that monitors cannot be run headful

(cherry picked from commit 3271331)
  • Loading branch information
paulb-elastic authored and mergify[bot] committed Nov 28, 2023
1 parent 6fba017 commit 5a50244
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 34 deletions.
5 changes: 5 additions & 0 deletions docs/en/observability/synthetics-configuration.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ Read more in <<synthetics-params-secrets>>.

For all available options, refer to the https://playwright.dev/docs/test-configuration[Playwright documentation].

[NOTE]
====
Do not attempt to run in headful mode (using `headless:false`) when running through Elastic's global managed testing infrastructure or Private Locations as this is not supported.
====

Below are details on a few Playwright options that are particularly relevant to Elastic Synthetics including timeouts, timezones, and device emulation.

[discrete]
Expand Down
5 changes: 5 additions & 0 deletions docs/en/observability/synthetics-create-test.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,11 @@ user workflows including tasks like:

Visit the https://playwright.dev/docs[Playwright documentation] for information.

[NOTE]
====
Do not attempt to run in headful mode (using `headless:false`) when running through Elastic's global managed testing infrastructure or Private Locations as this is not supported.
====

However, not all Playwright functionality should be used with Elastic Synthetics.

In some cases, there are alternatives to Playwright functionality built into the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

// hosts
| [[monitor-http-hosts]] *`hosts`*
(list of <<synthetics-lightweight-data-string,string>>s)
a| *Required*. A list of URLs to ping.
(<<synthetics-lightweight-data-string,string>>)
a| *Required*. The URL to ping.

////////////////////////
max_redirects
Expand Down Expand Up @@ -70,7 +70,7 @@ a| The TLS/SSL connection settings for use with the HTTPS endpoint. If you don't
- type: http
id: my-http-service
name: My HTTP Service
hosts: ["https://myhost:443"]
hosts: "https://myhost:443"
schedule: '@every 5s'
ssl:
certificate_authorities: ['/etc/ca.crt']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@

// hosts
| [[monitor-icmp-hosts]] *`hosts`*
(list of <<synthetics-lightweight-data-string,string>>s)
a| *Required*. A list of hosts to ping.
(<<synthetics-lightweight-data-string,string>>)
a| *Required*. The host to ping.

*Example*:

[source,yaml]
----
hosts: ["myhost"]
hosts: "myhost"
----

////////////////////////
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,50 +6,27 @@

// hosts
| [[monitor-tcp-hosts]] *`hosts`*
(list of <<synthetics-lightweight-data-string,string>>s)
a| *Required*. A list of hosts to ping. The entries in the list can be:

* *A plain host name, such as `localhost`, or an IP address.*
If you specify this option, you must also specify a value for <<monitor-tcp-ports,`ports`>>. If the monitor is {heartbeat-ref}/configuration-ssl.html[configured to use SSL], Synthetics establishes an SSL/TLS-based connection. Otherwise, it establishes a plain TCP connection.
(<<synthetics-lightweight-data-string,string>>)
a| *Required*. The host to ping. The value can be:

* *A hostname and port, such as `localhost:12345`.*
Synthetics connects to the port on the specified host. If the monitor is {heartbeat-ref}/configuration-ssl.html[configured to use SSL], Synthetics establishes an SSL/TLS-based connection. Otherwise, it establishes a TCP connection.
* *A full URL using the syntax `scheme://<host>:[port]`*, where:
** `scheme` is one of `tcp`, `plain`, `ssl` or `tls`. If `tcp` or `plain` is specified, Synthetics establishes a TCP connection even if the monitor is configured to use SSL. If `tls` or `ssl` is specified, Synthetics establishes an SSL connection. However, if the monitor is not configured to use SSL, the system defaults are used (currently not supported on Windows).
** `host` is the hostname.
** `port` is the port number. If `port` is missing in the URL, the <<monitor-tcp-ports,`ports`>> setting is required.
** `port` is the port number.
*Examples*:

[source,yaml]
----
hosts: ["localhost"]
----

[source,yaml]
----
hosts: ["localhost:8000"]
----

[source,yaml]
----
hosts: ["tcp://localhost:8000"]
hosts: "localhost:8000"
----

////////////////
ports
////////////////
| [[monitor-tcp-ports]] *`ports`*
(list of <<synthetics-lightweight-data-string,string>>s)
a| A list of ports to ping if the host specified in <<monitor-tcp-hosts,`hosts`>> does not contain a port number. It is generally preferable to use a single value here, since each port will be monitored using a separate `id`, with the given `id` value, used as a prefix in the Synthetics data, and the configured `name` shared across events sent via this check.

*Example*:

[source,yaml]
----
hosts: ["localhost"]
ports: [80, 9200, 5044]
hosts: "tcp://localhost:8000"
----

////////////////
Expand Down

0 comments on commit 5a50244

Please sign in to comment.