- 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
Manage monitors
editManage monitors
editAfter you’ve created a synthetic monitor, you’ll need to manage that monitor over time. This might include updating or permanently deleting an existing monitor.
If you’re using a Synthetics project to manage monitors, you should also set up a workflow that uses best practices for managing monitors effectively in a production environment.
Update a monitor
editYou can update a monitor’s configuration, for example, changing the interval at which the monitor runs a test.
You can also update the journey used in a browser monitor. For example, if you update the UI used in your application, you may want to update your journey’s selectors and assertions.
If you set up the monitor using a Synthetics project,
you’ll update the monitor in the Synthetics project and then push
changes to your Observability project.
For lightweight monitors, make changes to the YAML file.
For browser monitors, you can update the configuration of one or more monitors:
-
To update the configuration of an individual monitor, edit the journey directly in
the JavaScript or TypeScript files, specifically the options in
monitor.use
. - To update the configuration of all monitors in a Synthetics project, edit the global synthetics configuration file.
To update the journey that a browser monitor runs, edit the journey code directly and test the updated journey locally to make sure it’s valid.
After making changes to the monitors, run the push
command
to replace the existing monitors with new monitors using the updated
configuration or journey code.
Updates are linked to a monitor’s id
. To update a monitor you must keep its id
the same.
If you set up the monitor using the UI, you can update the monitor configuration of both lightweight and browser monitors in the UI:
- In your Observability project, go to Synthetics → Management.
- Click the pencil icon next to the monitor you want to edit.
-
Update the Monitor settings as needed.
- To update the journey used in a browser monitor, edit Inline script.
- Make sure to click Run test to validate the new journey before updating the monitor.
- Click Update monitor.
Delete a monitor
editEventually you might want to delete a monitor altogether. For example, if the user journey you were validating no longer exists.
If you set up the monitor using a Synthetics project, you’ll delete the monitor from the Synthetics project and push changes.
For lightweight monitors, delete the monitor from the YAML file.
For browser monitors, delete the full journey from the JavaScript or TypeScript file.
Then, run the push
command.
The monitor associated with that journey that existed in your Observability project will be deleted.
If you set up the monitor using the Synthetics UI, you can delete a lightweight or browser monitor in the UI:
- In your Observability project, go to Synthetics → Management.
- Click the trash can icon next to the monitor you want to delete.
Alternatively, you can temporarily disable a monitor by updating the monitor’s configuration in your journey’s code or in the Synthetics UI using the Enabled toggle.
Implement best practices for Synthetics projects
editThis is only relevant to monitors created using a Synthetics project.
After you’ve set up a Synthetics project, there are some best practices you can implement to manage the Synthetics project effectively.
Use version control
editFirst, it’s recommended that you version control all files in Git. If your Synthetics project is not already in a version controlled directory add it and push it to your Git host.
Set up recommended workflow
editWhile it can be convenient to run the push
command directly from your workstation,
especially when setting up a new Synthetics project, it is not recommended for production environments.
Instead, we recommended that you:
- Develop and test changes locally.
- Create a pull request for all config changes.
-
Have your CI service automatically verify the PR by running
npx @elastic/synthetics .
Elastic’s synthetics runner can output results in a few different formats, including JSON and JUnit (the standard format supported by most CI platforms).
If any of your journeys fail, it will yield a non-zero exit code, which most CI systems pick up as a failure by default.
- Have a human approve the pull request.
- Merge the pull request.
-
Have your CI service automatically deploy the change by running
npx @elastic/synthetics push
after changes are merged.
The exact implementation details will depend on the CI system and Git host you use.
You can reference the sample GitHub configuration file that is included in the .github
directory when you create a new Synthetics project.
On this page