Code Monkey home page Code Monkey logo

Comments (7)

kartikaysaxena avatar kartikaysaxena commented on May 26, 2024

Working on this, will try to come with a PR.

from thanos.

yeya24 avatar yeya24 commented on May 26, 2024

@KingRebo38 What's the query are you running in Ruler?
We are thinking about detecting the resolution rather than setting up the flag manually.
A ruler instance level flag might not work well if you have other rules which don't need 5m resolution

from thanos.

KingRebo38 avatar KingRebo38 commented on May 26, 2024

@yeya24 The Queries are something like this:

rules:
  - expr: increase(kong_http_requests_total[14d])
    record: kong_http_requests_total:rate:14d
  - expr: increase(kong_http_requests_total[30d])
    record: kong_http_requests_total:rate:30d
    ...
    and so on

I also think the instance level flag might cause some issues, but for now I would solve it by sharding the ruler instances.

from thanos.

douglascamata avatar douglascamata commented on May 26, 2024

@KingRebo38 you can optimize these rules by reusing data from others.

rules:
  - expr: increase(kong_http_requests_total[1d])
    record: kong_http_requests_total:rate:1d
  - expr: sum_over_time(kong_http_requests_total:rate:1d[14d]) # sum the 1d-rate over 14d
    record: kong_http_requests_total:rate:14d
  - expr: sum_over_time(kong_http_requests_total:rate:1d[28d]) # sum the 1d-rate over 28d
    record: kong_http_requests_total:rate:28d

With this you basically have your own downsampling. As long as they are part of the same rule group, evaluation order is respected.

Edit: Ah, if your raw resolution retention is 7 days it won't work :(

from thanos.

douglascamata avatar douglascamata commented on May 26, 2024

@KingRebo38 does it work if you set max resource resolution to auto?

from thanos.

KingRebo38 avatar KingRebo38 commented on May 26, 2024

@douglascamata If I set it to auto, it defaults to the raw data

from thanos.

douglascamata avatar douglascamata commented on May 26, 2024

You can try then setting --query-range.request-downsampled on your Query Frontend.

from thanos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.