Imagine having to create hundreds of synthetic monitors on a regular basis. Until now, such monitors had to be created manually via the Dynatrace web UI. Synthetic monitors, however, require ongoing maintenance after creation. So, with a sufficient volume of tests, it quickly becomes apparent that the UI isn’t the best management tool for this, simply because it isn’t the best interface for automation. Automation is required to scale your monitor management operations.
As much as we might optimize the UI for large operations, regularly performed tasks, and the tracking of vastly changing environments, it’s more efficient to use automation to manage high volumes of synthetic monitors. Typically, such automation is achieved through the API rather than the UI.
When is it best to use the Synthetic API?
In talking with our customers, we commonly get questions about the Synthetic API. Here are some of the possible uses of the API we’ve learned of based on these conversations:
- Monitoring the launch of some seasonal event or service—such services and/or pages are often based on templates or schemes that allow for automated monitor creation.
- Creating a large number of monitors, with small changes that can be introduced into monitor-creation calls through simple scripting—this way, a set of creation calls can be maintained externally to create and later edit and or delete the monitors
- When moving from a different monitoring solution, it’s convenient to parse the existing monitors from the old tool and recreate them through the API rather than go through manual UI creation for the new monitors, especially if the volume is high.
- Listing monitor details for display in automated reports.
- Dynatrace version 1.164
- API authorization token allowing for the creation and configuration of synthetic monitors
How do I use the Synthetic API?
To use the Dynatrace API, you need an authorization token. You can generate a token in any Dynatrace environment by going to Settings > Integration > Dynatrace API.
Once you’ve generated an API token, proceed to the Dynatrace API Explorer (see the link at the top of the token generation page), where you can begin using the API following authorization.
What exactly is available?
Starting with Dynatrace version 1.164, the Dynatrace Synthetic management public API is available as a Beta release. This API delivers a whole range of CRUD (Create, Read, Update, and Delete) operations. This means that it’s now possible to automate the entire creation and maintenance process for Dynatrace Synthetic monitors via the API.
Using the Synthetic management public API, it’s possible to:
- Push external synthetic events to Dynatrace.
- Modify the operation state of all external monitors.
- Push external synthetic monitors, locations, and results to Dynatrace.
- List all public locations available for your environment.
- List all synthetic monitors in your Dynatrace environment.
- Create a new synthetic monitor.
- Get the parameters of a synthetic monitor.
- Update the parameters of a synthetic monitor.
- Delete a synthetic monitor.
- New API endpoints that will extend the API by synthetic private monitoring locations management capabilities
- Extension of the Dynatrace Synthetic management public API for private, multi-request HTTP monitors, which will be in production soon
- General availability (GA) of the Dynatrace Synthetic management public API
- Synthetic private browser monitor functionality in Dynatrace Synthetic (already available as an EAP)