Skip to content

[API] api/v1/series with only non-empty matcher killing the memory #8286

@ahurtaud

Description

@ahurtaud

What did you do?

Calling the api Series with only an empty matcher increases by A LOT the memory (and cpu) usage.
One of my user basically OOM Killed my prometheus with a label_values on grafana on a label which does not exist.

curl -g 'http://<prometheus>/api/v1/series?match[]={foo=%22%22}'

Screen Shot 2020-12-14 at 17 36 39

What did you expect to see?

I would like prometheus to reject the matcher like it is with the query UI with the following query:

{foo=""}

Screen Shot 2020-12-14 at 17 39 56

  • Prometheus version:
    v2.23.0 (happen on most releases)

Something else to add

Weirdly this API call answer instantly an empty success:

curl -g 'http://<prometheus>/api/v1/series?match[]={}'

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions