Victoriametrics: Regex should match both with and without a label

Created on 30 Mar 2020  路  3Comments  路  Source: VictoriaMetrics/VictoriaMetrics

Describe the bug
Query metric_name{foo~="bar|"} doesn't return metrics with no label at all (notice | in regex)

To Reproduce

  1. There is a metric that's scrapped both with and without a label, e.g.
metric_name 1.2345
metric_name{foo="bar"} 2.345
metric_name{foo="baz"} 3.456
  1. Query metric_name{foo~="bar|"

Expected behavior
Should return:

metric_name
metric_name{foo="bar"}

but not

metric_name{foo="baz"}
bug

Most helpful comment

The bugfix is available starting from v1.34.5

All 3 comments

Confirmed the bug. It will be fixed soon

The bug should be fixed in the following commits:

  • single-node version - 318326c309b7cf24ddd1b4be05968e6add81ac98
  • cluster version - d45024995537c84822c8cc32e10b5828f52ad243

These commits will be included into the next release.

The bugfix is available starting from v1.34.5

Was this page helpful?
0 / 5 - 0 ratings

Related issues

valyala picture valyala  路  4Comments

genericgithubuser picture genericgithubuser  路  4Comments

ozn0417 picture ozn0417  路  3Comments

localpref picture localpref  路  3Comments

jelmd picture jelmd  路  3Comments