- Elastic Cloud Serverless
- Elasticsearch
- Elastic Observability
- Get started
- Observability overview
- Elastic Observability Serverless billing dimensions
- Create an Observability project
- Quickstart: Monitor hosts with Elastic Agent
- Quickstart: Monitor your Kubernetes cluster with Elastic Agent
- Quickstart: Monitor hosts with OpenTelemetry
- Quickstart: Unified Kubernetes Observability with Elastic Distributions of OpenTelemetry (EDOT)
- Quickstart: Collect data with AWS Firehose
- Get started with dashboards
- Applications and services
- Application performance monitoring (APM)
- Get started with traces and APM
- Learn about data types
- Collect application data
- View and analyze data
- Act on data
- Use APM securely
- Reduce storage
- Managed intake service event API
- Troubleshooting
- Synthetic monitoring
- Get started
- Scripting browser monitors
- Configure lightweight monitors
- Manage monitors
- Work with params and secrets
- Analyze monitor data
- Monitor resources on private networks
- Use the CLI
- Configure a Synthetics project
- Multifactor Authentication for browser monitors
- Configure Synthetics settings
- Grant users access to secured resources
- Manage data retention
- Scale and architect a deployment
- Synthetics Encryption and Security
- Troubleshooting
- Application performance monitoring (APM)
- Infrastructure and hosts
- Logs
- Inventory
- Incident management
- Data set quality
- Observability AI Assistant
- Machine learning
- Reference
- Get started
- Elastic Security
- Elastic Security overview
- Security billing dimensions
- Create a Security project
- Elastic Security requirements
- Elastic Security UI
- AI for Security
- Ingest data
- Configure endpoint protection with Elastic Defend
- Manage Elastic Defend
- Endpoints
- Policies
- Trusted applications
- Event filters
- Host isolation exceptions
- Blocklist
- Optimize Elastic Defend
- Event capture and Elastic Defend
- Endpoint protection rules
- Identify antivirus software on your hosts
- Allowlist Elastic Endpoint in third-party antivirus apps
- Elastic Endpoint self-protection features
- Elastic Endpoint command reference
- Endpoint response actions
- Cloud Security
- Explore your data
- Dashboards
- Detection engine overview
- Rules
- Alerts
- Advanced Entity Analytics
- Investigation tools
- Asset management
- Manage settings
- Troubleshooting
- Manage your project
- Changelog
Configure individual browser monitors
editConfigure individual browser monitors
editThis is only relevant for monitors that are created and managed using a Synthetics project. For more information on configuring browser monitors added in the UI, refer to Create monitors in the Synthetics UI.
After writing synthetic journeys, you can use monitor.use
to configure the browser monitors that will run your tests.
You’ll need to set a few configuration options:
- Give your monitor a name. Provide a human readable name and a unique ID for the monitor. This will appear in your Observability project where you can view and manage monitors after they’re created.
- Set the schedule. Specify the interval at which your tests will run.
- Specify where the monitors should run. You can run monitors on Elastic’s global managed testing infrastructure or create a Private Location to run monitors from your own premises.
- Set other options as needed. There are several other options you can set to customize your implementation including params, tags, screenshot options, throttling options, and more.
Configure each monitor directly in your journey
code using monitor.use
.
The monitor
API allows you to set unique options for each journey’s monitor directly through code.
For example:
import { journey, step, monitor, expect } from '@elastic/synthetics'; journey('Ensure placeholder is correct', ({ page, params }) => { monitor.use({ id: 'example-monitor', schedule: 10, throttling: { download: 10, upload: 5, latency: 100, }, }); step('Load the demo page', async () => { await page.goto('https://elastic.github.io/synthetics-demo/'); }); step('Assert placeholder text', async () => { const placeholderValue = await page.getAttribute( 'input.new-todo', 'placeholder' ); expect(placeholderValue).toBe('What needs to be done?'); }); });
For each journey, you can specify its schedule
and the locations
in which it runs.
When those options are not set, Synthetics will use the default values in the global configuration file.
For more details, refer to Configure a Synthetics project.