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

Option to generate sloth yaml - using 5m record rule chaining #504

Open
jkutes opened this issue May 19, 2023 · 0 comments
Open

Option to generate sloth yaml - using 5m record rule chaining #504

jkutes opened this issue May 19, 2023 · 0 comments

Comments

@jkutes
Copy link

jkutes commented May 19, 2023

We have some metrics with very high cardinality, which causing recording rules for longer periods (2h+ to timeout or simply run our Prometheus instance very high on CPU.
I would like to chain recording rules all based on 5m rule, without overwriting every record rule manually in the yaml.

example for 30m record rule to be based on 5 min rule (al lthe others 1h, 2h,6h,1d,3d,1w would follow the same pattern).

  - record: slo:sli_error:ratio_rate30m
    expr: |
      sum_over_time(slo:sli_error:ratio_rate5m{sloth_id="frontend-requests-latency", sloth_service="frontend", sloth_slo="requests-latency"}[30m])
      / ignoring (sloth_window)
      count_over_time(slo:sli_error:ratio_rate5m{sloth_id="frontend-requests-latency", sloth_service="frontend", sloth_slo="requests-latency"}[30m])
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

No branches or pull requests

1 participant