Skip to content

Metric Processing

ilan-anodot edited this page Jun 4, 2020 · 1 revision

General concept

A Prometheus metric is composed of several fields:

  • Metric name
  • Any number of labels (can be 0), represented as a key-value array
  • Current metric value
  • Optional metric timestamp

Prometheus label example:

http_requests_total{method="post",code="200"} 1027 1395066363000

The preceding Prometheus metric will be converted to an Anodot 2.0 metric :

{
  "properties": {
    "code": "200",
    "method": "post",
    "what": "http_requests_total"
  },
  "timestamp": 1395066363,
  "value": 1027,
  "tags": {}
}

Limitations

Escape chars

“.” (dot), “=” (equal sign), and space characters are not permitted in property names and values. They will be replaced with the “_” (underscore) character.

Max property length

  • property name will be trimmed to 50 chars.
  • property value will be trimmed to 150 chars.

Number of properties

Between 1 and 20 properties per metric are permitted. If a metric has more than 20 properties, it will be dropped, and not sent to Anodot. This can be fixed by applying write_relabel_configs, with a labeldrop configuration.

Next

See this article on how to set Anodot metrics tags from Prometheus labels