Coder Social home page Coder Social logo

promql2logql's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

promql2logql's Issues

sum by ()

% node index.js 'sum by (http) (cpu_percent_value)' 
sum({ __name__="cpu_percent_value"} | unwrap_value [false]) by (http)

Could be as an approximation:

sum by (__name__, http) (sum_over_time({__name__="cpu_percent_value"} | unwrap_value [1m]))

sum()

% node index.js 'sum(cpu_percent_value)'
sum({ __name__="cpu_percent_value"} | unwrap_value [false])

Could be as an approximation

sum by (__name__) (sum_over_time({__name__="cpu_percent_value"} | unwrap_value [1m]))

tag filtering not transpiled

% node index.js 'cpu_percent_value{ltype="ram_mb"}'
ast: {"name":"cpu_percent_value","label_matchers":[{"op":"Equal","name":"ltype","value":"ram_mb"}],"offset":false,"range":false}
logql: rate({__name__="cpu_percent_value"} | unwrap_value [1s])

Should be

rate({__name__="cpu_percent_value", ltype="ram_mb"} | unwrap_value [1s])

count_over_time

% node index.js 'count_over_time(cpu_percent_value[5s])'              
count_over_time({ __name__="cpu_percent_value"} | unwrap_value [5s])

Count does not how to handle unwrap_value, should be:

count_over_time({ __name__="cpu_percent_value"} [5s])

absent_over_time([])

% node index.js 'absent_over_time(cpu_percent_value [5s])'
absent_over_time({ __name__="cpu_percent_value"} | unwrap_value [5s])

absent_over_time does not handle unwrap_value, should use

absent_over_time({ __name__="cpu_percent_value"} [5s])

sum without ()

% node index.js 'sum without (http) (cpu_percent_value)'
sum({ __name__="cpu_percent_value"} | unwrap_value [false]) by (http)

Could be as approximation:

sum without (filterNumber) (sum_over_time({__name__="cpu_percent_value"} | unwrap_value [1m]))

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.