Prometheus Metrics Types

Sysdig Monitor transforms Prometheus metrics into usable, actionable entries in two ways:

Calculated Metrics

The Prometheus metrics that are scraped by the Sysdig agent and transformed into the traditional StatsD model are called calculated metrics. In calculated metrics, the delta is stored with the previous value. This delta is what Sysdig uses on the classic backend for metrics analyzing and visualization. While generating the calculated metrics, the gauge metrics are kept as they are, but the counter metrics are transformed.

Prometheus calculated metrics cannot be used in PromQL.

The Histogram and Summary metrics are transformed into a different format called Prometheus histogram and summary metrics respectively. The transformations include:

  • All of the quantiles are transformed into a different metric, with the quantile added as a suffix.

  • The count and sum of these summary metrics are exposed as different metrics with names slightly changed. _ (underscore) in the name is replaced with a period .. For more information, see Mapping Between Classic Metrics and PromQL Metrics.

Prometheus calculated metrics (legacy metrics) are scheduled to be deprecated in the coming months.

Raw Metrics

In Sysdig parlance, the Prometheus metrics that are scraped (by the Sysdig agent), collected, sent, stored, visualized, and presented exactly as Prometheus exposes them are called raw metrics. Raw metrics are used with PromQL.

Sysdig counter is a StatsD type counter, where the difference in value is kept, but not the raw value of the counter, whereas Prometheus raw metrics are counters that are always monotonically increasing. A rate function needs to be applied on Prometheus raw metrics to make sense of it.

Time Aggregations Over Prometheus Metrics

The following time aggregations are supported for both the metric types:

  • Average: Returns an average of a set of data points, keeping all the labels.

  • Maximum and Minimum: Returns a maximal or minimal value, keeping all the labels.

  • Sum: Returns a sum of the values of data points, keeping all the labels.

  • Rate (timeAvg): Returns a sum of changes to the counter across data points in a given time period and divides by time, keeping all the labels as they are. For Prometheus raw metrics, timeAvg is calculated by taking the difference and dividing it by time.

Prometheus Calculated Metrics

Prometheus calculated metrics are treated as gauges by Sysdig, and there the following time aggregations are available:

  • Average

  • Sum

  • Minimum

  • Maximum

Rate (timeAvg) is not available because they are not applicable to gauge metrics.

Prometheus Raw Metrics

For the gauge type, the following types are available:

  • Average

  • Minimum

  • Maximum

For the counter type, the following types are available:

  • Rate: Calculates the first derivative of the counter (change over time).

  • Sum: Calculates a complete change of the counter over a period of time.



Last modified July 17, 2021: Aliases to old site urls (#98) (917a9be2)