How do I read all configured plugin and custom event thresholds?

The thresholds REST endpoint enables 3rd party tools to read all configured plugin and custom event thresholds within a monitored environment.

The following HTTP GET request returns the details of all plugin and custom event thresholds:

https://{id}.live.dynatrace.com/api/v1/thresholds/

Result

The query result returns a JSON object that contains an array of defined thresholds. Each event threshold contains the following attributes:

  • thresholdId: Unique identifier that is used to update or delete the threshold.
  • timeseriesId: Unique identifier of the metric that the threshold applies to; use to find the metric IDs within our timeseries export API.
  • threshold: The actual threshold that should be checked.
  • alertCondition: Alert if actual metric value is either ABOVE or BELOW the defined threshold.
  • samples: Number of minute samples that defines the sliding window.
  • violatingSamples: Number of minute sliding window samples that have to violate within the sliding window before the event is raised.
  • dealertingSamples: Number of minute samples that have to return to normal before the event is closed again.
  • eventType: Semantic event type which can be either 'ERROR_EVENT', 'PERFORMANCE_EVENT', 'AVAILABILITY_EVENT'.
  • eventName: The human readable name of the event.
  • filter: Shows the source of the threshold that can either be API or a PLUGIN.
  • description: A placeholder filled human readable description of the event. Placeholder are: {severity} representing the actual metric value, {alert_condition} represents the above or below condition and the threshold {threshold}.

The following example shows the result of a successful call to an environment's thresholds endpoint:

[
  {
    thresholdId: "newthreshold",
    timeseriesId: "ruxit.jmx.Hadoop.yarn:AllocatedMB",
    threshold: 4,
    alertCondition: "ABOVE",
    samples: 5,
    violatingSamples: 2,
    dealertingSamples: 3,
    eventType: "ERROR_EVENT",
    eventName: "High allocated memory",
    filter: "API",
    description: "My own description of the event"
  },
  {
    thresholdId: "ruxit.python.haproxy:be_susage:be_usage_alert_high_generic",
    timeseriesId: "ruxit.python.haproxy:be_susage",
    threshold: 80,
    alertCondition: "ABOVE",
    samples: 5,
    violatingSamples: 3,
    dealertingSamples: 5,
    eventType: "PERFORMANCE_EVENT",
    eventName: "High HAProxy backend session usage",
    filter: "PLUGIN",
    description: "The backend session usage is {alert_condition} the threshold of {threshold}"
  }
]