- Heartbeat Reference: other versions:
- Heartbeat overview
- Quick start: installation and configuration
- Set up and run
- Configure
- Monitors
- Task scheduler
- General settings
- Project paths
- Output
- Kerberos
- SSL
- Index lifecycle management (ILM)
- Elasticsearch index template
- Processors
- Define processors
- add_cloud_metadata
- add_cloudfoundry_metadata
- add_docker_metadata
- add_fields
- add_host_metadata
- add_id
- add_kubernetes_metadata
- add_labels
- add_locale
- add_network_direction
- add_nomad_metadata
- add_observer_metadata
- add_process_metadata
- add_tags
- community_id
- convert
- copy_fields
- decode_base64_field
- decode_json_fields
- decode_xml
- decode_xml_wineventlog
- decompress_gzip_field
- detect_mime_type
- dissect
- dns
- drop_event
- drop_fields
- extract_array
- fingerprint
- include_fields
- rate_limit
- registered_domain
- rename
- script
- translate_sid
- truncate_fields
- urldecode
- Autodiscover
- Internal queue
- Logging
- HTTP endpoint
- Regular expression support
- Instrumentation
- heartbeat.reference.yml
- How to guides
- Exported fields
- Beat fields
- Cloud provider metadata fields
- Common heartbeat monitor fields
- Docker fields
- ECS fields
- Host fields
- HTTP monitor fields
- ICMP fields
- Jolokia Discovery autodiscover provider fields
- Kubernetes fields
- Process fields
- Host lookup fields
- SOCKS5 proxy fields
- Monitor summary fields
- Synthetics types fields
- TCP layer fields
- TLS encryption layer fields
- Monitor
- Secure
- Troubleshoot
- Get help
- Debug
- Common problems
- Heartbeat uses too much bandwidth
- Error loading config file
- Found unexpected or unknown characters
- Logstash connection doesn’t work
- Publishing to Logstash fails with "connection reset by peer" message
- @metadata is missing in Logstash
- Not sure whether to use Logstash or Beats
- SSL client fails to connect to Logstash
- Monitoring UI shows fewer Beats than expected
- Contribute to Beats
Browser options
editBrowser options
editWant to get started with synthetic monitoring? See the quick start guide.
The options described here configure Heartbeat to run the synthetic monitoring test suites via Synthetic Agent on the Chromium browser. Additional shared options are defined in Common monitor options. Example configuration:
- type: browser id: synthetic-inline-suites name: Elastic website schedule: '@every 1m' source: inline: script: |- step("load homepage", async () => { await page.goto('https://www.elastic.co'); }); step("hover over products menu", async () => { await page.hover('css=[data-nav-item=products]'); });
source
editContains information on how to run the synthetic test suites.
inline
editRuns the Synthetic test scripts that are defined inline in the configuration. See Synthetics syntax for more information.
This is the most convenient way to get Synthetic tests up and running, however, it becomes harder to maintain and share code as the number of test files increases. The recommended way to run Synthetic suites is to create an NPM project and start writing individual tests for all the user journeys and save them as JavaScript or TypeScript files. Once the project is created, the tests can be invoked either by Zip Url or Local directory method.
Heartbeat will use the latest compatible version(^1.0.0) of the Synthetics NPM library to run the inline journeys.
Zip URL
editRemote zip endpoint configuration allows users to specify the location of a synthetics test project ZIP file.
Under zip_url
, specify these options:
-
url
- Location of the synthetics project repository.
-
folder
- Relative directory path where the synthetic journey files are located in the repository.
-
username
- The username for authenticating with the zip endpoint. This setting is optional.
-
password
- The password for authenticating with the zip endpoint. This setting is optional.
If username
and password
are provided, they will be sent as HTTP Basic Authentication
headers to the remote zip endpoint.
Example configuration:
- type: browser id: todos-suites name: Todos Journeys schedule: '@every 1m' source: zip_url: url: "https://github.com/elastic/synthetics/archive/refs/heads/master.zip" folder: "examples/todos" username: "" password: ""
Local directory
editLocal directory where the synthetic test files are located.
Example configuration:
- type: browser id: local-journeys name: Local journeys schedule: '@every 1m' source: local: path: "/path/to/synthetics/journeys"
params
editSet this option to add user defined parameters for your scripts. This value takes
arbitrary YAML that is then converted to JSON which is then passed into synthetics
via the --params
option. See Working with Params
for more information.
Example:
- type: browser id: local-journeys name: Local journeys schedule: '@every 1m' source: # Omitted in this example for brevity params: root_url: http://example.net my_custom_object: a_key: ["a value"]
screenshots
editSet this option to manage the screenshots captured by the synthetics agent.
Under screenshots
, specify one of these options:
-
on
- capture screenshots for all steps in a journey (default)
-
off
- do not capture any screenshots
-
only-on-failure
- capture screenshots for all steps when a journey fails (any failing step marks the whole journey as failed)
Example configuration:
- type: browser id: local-journeys name: Local journeys schedule: '@every 1m' screenshots: "on" source: local: path: "/path/to/synthetics/journeys"
sandbox
editSet this option to true
to enable the normally disabled chromium sandbox. Defaults to false.
synthetics_args
editExtra arguments to pass to the synthetics agent package. Takes a list of strings.