Metric ingestion

Metric ingestion provides you a simple way to push any custom metrics to Dynatrace.

Metric ingestion

You can fine-grain your metrics into categories with up to 50 dimensions per data point. Dimensions come very handy for future use of metric, like analysis or charting.

Prerequisites

Ingestion methods

You can easily push metrics to Dynatrace using a unified ingestion protocol shared among the following channels:

You can also ingest metrics into Dynatrace using:

Local ingestion interface

OneAgent is equipped with the Extension Execution Controller (EEC) module, which provides a secure interface for ingesting metrics from multiple data sources running on the same host. EEC automatically adds the host ID and host name context to each metric. Note that we're already working on more automatic metric enrichments.

Setup

EEC is installed with OneAgent automatically. If your data sources send metrics over default ports, you're all set. Enable metric ingestion, set up your data source, and OneAgent starts ingesting your metrics automatically.

For details, see:

Security

The EEC interface is only available to the localhost addresses and cannot be reached from remote hosts. It uses a channel provided by OneAgent that is fully secure.

Metrics API v2

Unlike the local ingestion interface, which adds the topology context automatically (each metric is assigned to a respective host), metrics pushed through the public Metrics API v2 are flat by default. This is especially beneficial for business-related metrics that don't have any relation to the topology entities in your environment. However, you can still configure your app to add the dt.entity.host dimension to have events raised for a selected host and have Davis perform causation analysis based on your metrics. For more information, see Metrics API - POST ingest data points.

Metric metadata

The ingestion protocol enables you to directly push custom metrics without any upfront registration and enrich your data with dimensions. However, contextual information (for example, unit of measurement) is missing. You can provide this information with metric metadata via Settings API.

Metric data points and metadata exist independently of each other and are paired by the metric key. You can create them in any order. For more information, see Custom metric metadata.

Access ingested metrics

You can access your ingested metrics via the Metric API v2 and in the Data explorer for custom charting.

Metrics API

Use the GET metric data points call of the Metrics API v2 to retrieve ingested data points.

Data explorer

Select Create custom chart and then select Try it out in the top banner. For more information, see Data explorer.

You can search the metric keys of all available metrics, select the metrics you want to chart, define how you’d like to analyze and chart them, and then pin your charts to a dashboard.

Events

The custom metric ingest channel allows for ingestion of all types of metric measurements, regardless of the number of entities they relate to. The way an event is raised depends on whether there's no entity, a single entity, or multiple entities assigned to a custom metric. For more information, see Topology awareness.

Metric alerts

You can also create custom alerts based on the ingested metrics. From the navigation menu, select Settings > Anomaly detection > Custom events for alerting and select Create custom event for alerting. In the Create custom event for alerting page, search for a metric using its key and define your alert. For more information, see Metric events for alerting.

Custom metric ingestion affects your DDU consumption

Only limited custom metric ingestion and analysis is included in out-of-the-box Dynatrace technology support. Custom metrics typically consume Davis data units, but custom metrics from OneAgent-monitored hosts are first deducted from your quota of included metrics per host unit, so they won't necessarily consume DDUs. This applies to metrics that are assigned to a host either automatically or by adding the dt.entity.host dimension.

For details, see Metric consumption (DDUs).

  • Each ingested metric that is subject to DDU consumption (in other words, not assigned to a host) generates one or more metric data points. These data points consume DDUs with weight of 0.001. Therefore a simple metric reported once each minute for a full year will consume 526 DDUs (525,600 minutes * 0.001526 DDUs).

  • To check the DDU consumption of an environment, go to Settings > Accounting > Davis data units overview.

Metric dimensions also affect DDU Consumption

There are two additional factors to consider in determining which ingested metrics will consume DDUs and when:

  • Tuples: Unique combinations of metric-dimension pairs (see examples below). Each environment can support a maximum of 20,000,000 unique tuples monthly.
  • Timeframe: When the same metric is ingested with unique dimension tuples within a 1-minute timeframe, each additional tuple results in the consumption of another metric data point.

Examples

For the following examples, assume that all metrics are ingested once per minute.

  • In this first example, the same distinct dimension tuple is reported twice within a one-minute interval. Therefore, only one (aggregated) data point is consumed (1 data point x 0.001 DDUs).
    cpu.temp,cpu=cpu1,cpu_type="INTEL" 55
    cpu.temp,cpu=cpu1,cpu_type="INTEL" 75
    
  • Here two distinct dimension pairs are reported within a 1-minute interval. Therefore two data points are consumed (2 x 0.001 DDUs). From a consumption perspective, this is effectively two different metrics. A two-dimension tuple like this consumes 526 * 2 = 1,052 DDUs per year.
    cpu.temp,cpu=cpu1,cpu_type="INTEL" 55
    cpu.temp,cpu=cpu2,cpu_type="INTEL" 75
    
  • Here, four distinct dimension pairs are reported within a 1-minute interval. Therefore, four data points are consumed (4 x 0.001 DDUs). From a consumption perspective, this is effectively four different metrics. A four-dimension tuple like this consumes 526 * 4 = 2,104 DDUs per year.
    cpu.temp,cpu=cpu1,cpu_type="INTEL" 55
    cpu.temp,cpu=cpu2,cpu_type="INTEL" 75
    cpu.temp,cpu=cpu3,cpu_type="INTEL" 55
    cpu.temp,cpu=cpu4,cpu_type="INTEL" 75
    

Limits

The following limits apply to metric ingestion using a common ingestion channel. For API ingested metrics, if any limit is exceeded, the API call returns the 400 response code, with details in the response body.

Entity Limit Description
Metric key length, characters 250 The total length of the metric key, including the prefix.
Dimension key length, characters 100 The total length of the dimension key.
Dimension value length, characters 250 The total length of the dimension value.
Number of dimensions per line 50 The number of dimensions in a single line of the payload.
Number of metrics per minute 1,000 The maximum number of metrics Dynatrace can ingest in every 1-minute interval.
Total number of possible metric keys. 10,000 The maximum number of metric keys that can be registered in Dynatrace.
Number of tuples per month 20,000,000 The maximum number of tuples (unique metric-dimension key-dimension value-payload type combinations) per calendar month.
Length of line, characters 2,000 The maximum length of a single line of the payload.