Coder Social home page Coder Social logo

Comments (3)

valyala avatar valyala commented on May 22, 2024 2

Fixed the issue at v1.12.1.

from victoriametrics.

hagen1778 avatar hagen1778 commented on May 22, 2024

Hi @isality!

Is this the query you sent to VM? Could you try following query instead:

WITH (
 allFilters = {instance="host", cpu="All",mode!~"(total|idle|user|system|wait|steal)"},
 cpu3Filters = {instance="host",cpu="cpu3",mode!~"(idle|user|system|wait|steal)"}
)

clamp_max( 
sum by (instance) (
  avg by (mode) (
   (clamp_max(rate(node_cpu{cpu3Filters}[5m]),1)) 
   or (clamp_max(irate(node_cpu{cpu3Filters}[5m]),1) *100) 
   or sum(avg_over_time(node_cpu_average{allFilters}[5m]))
)),100)

from victoriametrics.

valyala avatar valyala commented on May 22, 2024

@isality, thanks for the bug report. The following minimal query reproduces it:

sum(a) or sum(b)

The bug should be fixed in the next release.

As for the original query, it looks really complicated and, as @hagen1778 already noted, it may be significantly simplified with CTE expressions supported by VictoriaMetrics. Read more about CTE and try them here.

from victoriametrics.

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.