Integrate monitoring insights via Dynatrace API

With the new Dynatrace API, you can access Dynatrace availability monitoring via a simple HTTP REST interface. Monitoring data can then easily be shared and repurposed in numerous ways.

Dynatrace analyzes the performance of your application environment in real time to identify slow response times, errors, and other customer-facing issues. To achieve this, Dynatrace continuously compares the normal performance and behavior of your applications to the current, performance and behavior of your applications, in real-time.

With access to the Dynatrace intelligent monitoring and correlation engine you can:

  • Access specific metrics and problems to assist you in intelligently scaling your infrastructure and conserving expenses during periods of low traffic.
  • Automatically retrieve metrics for 3rd-party availability reports, SLA reports, and KPI reports.
  • Share system status via company-specific health indicators (see photos below).
  • Build a custom integration that enables direct communication with your Dynatrace monitoring system to chat bots, messaging channels, incident-management systems, and more.

Dynatrace API

An earlier release of the Dynatrace API allowed you to access a large collection of metrics such as CPU, response times, traffic, error rates, and more. The API didn’t however previously include our synthetic availability-monitoring offering or availability time series data for hosts and processes. The current release includes these availability-related time series measures in the list of accessible time series.

So by creating a query to the newly defined com.ruxit.builtin:webcheck.availability time series a consuming service can query Dynatrace about the state of all active web checks. Using the available filters and query options, you can even limit your request to any specific web check.

To query Dynatrace about the state of a web check during the last two hours, the API consumer simply calls:

https://umsaywsjuo.live.ruxit.com/api/v1/timeseries/?relativeTime=2Hours&timeseriesId=com.ruxit.builtin:webcheck.availability&entity=SYNTHETIC_TEST-000000000000625D&api-token=oV2Kf5CCSkaslm5a7q4IG

To re-purpose this example for use within your own Dynatrace environment:

  1. Replace the environment ID umsaywsjuo with your own environment ID.
  2. Replace the web check ID (SYNTHETIC_TEST-000000000000625D) with one of your own unique web check IDs.
  3. Replace the API token with your own secret token.

The returned JSON result contains the list of data points for each synthetic test location, as shown in the screenshot below:

Dynatrace API

There isn’t much to change to query Dynatrace about the availability state of your hosts and process groups. Use the com.ruxit.builtin:host.availability time series for host availability and the com.ruxit.builtin:pgi.availability time series for process-group availability. The screenshot below shows the Dynatrace response for a sample environment:

Dynatrace API

The Dynatrace API enables you to integrate Dynatrace intelligence into a wide range of intelligent systems, including chat bots that provide immediate feedback regarding system health. You can now maintain an intuitive dialog directly with your infrastructure!

Thanks to our great engineers here at Dynatrace we operate our own unique (hand crafted) system health indicator UFO:

Dynatrace API

Stay tuned to this blog; more Dynatrace API enhancements are already in the queue!

Wolfgang is a Technical Product Manager at Dynatrace. He has a long record of research in software analytics and mobile computing. At Dynatrace, he's responsible for baseline calculation and event correlation in performance analytics. He also drives the topic of mobile app monitoring.

Looking for answers?

Start a new discussion or ask for help in our Q&A forum.

Go to forum