Mapping Prometheus Metrics to Datadog Metrics

이 페이지는 아직 한국어로 제공되지 않으며 번역 작업 중입니다. 번역에 관한 질문이나 의견이 있으시면 언제든지 저희에게 연락해 주십시오.

Overview

This page walks you through how Prometheus or OpenMetrics check metrics map to existing Datadog metric types.

Prometheus and OpenMetrics metric types

  • counter: A cumulative metric that represents a single monotonically increasing counter, whose value can only increase—or be reset to zero.
  • gauge: A metric that represents a single numeric value, which can arbitrarily go up and down.
  • histogram: Samples observations and counts them in configurable buckets; also provides a sum of all observed values.
  • summary: Similar to histogram; samples observations, provides a sum of all observed values, and calculates configurable quantiles over a sliding time window.

How Prometheus/OpenMetrics metrics map to Datadog metrics

For more information, see OpenMetrics Metric Types and Datadog Metric Types.

Gauge

Prometheus/OpenMetrics gauge maps to Datadog’s gauge.

Counter

Prometheus/OpenMetrics counter maps to Datadog’s count.

Histogram

For Prometheus/OpenMetrics histogram, the _count, _sum, and _bucket values of the histogram are each mapped to Datadog’s count type and include a .count, .sum, and .bucket suffix in their names, respectively.

If the histogram_buckets_as_distributions parameter is true, _bucket samples are aggregated into a Datadog distribution. Datadog distribution metrics are based on the DDSketch algorithm and allow for more advanced statistical aggregations such as quantiles. For more information, see the Datadog Engineering Blog post on OpenMetrics and distribution metrics.

collect_counters_with_distributions can be used to send _count and _sum values as counts alongside the distribution.

Summary

For Prometheus/OpenMetrics summary, _count and _sum values are mapped to Datadog’s count type and include a .count and .sum suffix in their name, respectively. Quantile samples are mapped to a metric of type gauge with the .quantile suffix.

Counter

By default, Prometheus/OpenMetrics counter maps to Datadog’s count.

However, if the parameter send_monotonic_counter is false, then this metric is sent as gauge.

Gauge

Prometheus/OpenMetrics gauge maps to Datadog’s gauge.

Histogram

For Prometheus/OpenMetrics histogram, the _count and _sum values of the histogram are each mapped to Datadog’s gauge type and include a .count and .sum suffix in their name, respectively.

If the send_histograms_buckets parameter is true, _bucket samples are sent to Datadog with a .bucket suffix, and are also mapped to Datadog’s gauge by default.

Setting the send_distribution_counts_as_monotonic parameter to true causes the _count and _bucket metrics to be sent as type count instead. Setting send_distribution_sums_as_monotonic does the same for _sum metrics.

If the send_distribution_buckets parameter is true, _bucket samples are aggregated into a Datadog distribution. Datadog distribution metrics are based on the DDSketch algorithm, and allow for more advanced statistical aggregations such as quantiles. For more information, see the Datadog Engineering Blog post on OpenMetrics and distribution metrics.

Summary

For Prometheus/OpenMetrics summary, _count and _sum values are mapped to Datadog’s gauge type by default, and include a .count and .sum suffix in their names, respectively. Quantile samples are mapped to a metric of type gauge with the .quantile suffix.

Setting the send_distribution_counts_as_monotonic parameter to true causes the _count and _sum metrics to be sent as type count instead. Setting send_distribution_sums_as_monotonic does the same for _sum metrics.

All count metrics are processed by the Agent as monotonic counts, meaning the Agent actually sends the difference between consecutive raw values. For more information, see Metric Submission: Custom Agent Check.

Further Reading