Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

export/prometheus: metrics growing indefinitly, causing timeouts #80

Open
9er opened this issue Jun 29, 2024 · 1 comment · May be fixed by #85
Open

export/prometheus: metrics growing indefinitly, causing timeouts #80

9er opened this issue Jun 29, 2024 · 1 comment · May be fixed by #85

Comments

@9er
Copy link
Collaborator

9er commented Jun 29, 2024

Example

- segment: prometheus
  # collect and export peering statistics
  config:
    endpoint: ":8080"
    labels: "SrcAS,DstAS,SrcIfDesc,DstIfDesc,SamplerAddress,FlowDirection"

Problem

The prometheus segment will add every combination of labels it has seen to its promethues exporter. Over time, the cardinality will grow large enough that curl/prometheus jobs will at some point run into timeouts.

In one case we have running in production, this happens every few weeks. Currently, flowpipeline can simply be restarted to get rid of "old" label sets.

Possible Improvement

Vacuum/GC/evict label sets that haven't been touched for a while (probably a stupid idea, implementation wise) or vacuum/GC/evict all label sets every once in a while (probably pretty easy to implement).

This could be made configurable, maybe something like:

  config:
    vacuum_interval: 24h

Maybe also during a certain time of the day would be an option, but prometheus detecting counter resets should be making the vacuum hitless anyway.

@ynHuber
Copy link
Collaborator

ynHuber commented Nov 6, 2024

A possible solution to this, using the "evict all label sets every once in a while" strategy is implemented in #7a60d4a #

@ynHuber ynHuber linked a pull request Nov 22, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants