Git Product home page Git Product logo

Comments (6)

samber avatar samber commented on August 28, 2024

Hi @youpai, thanks for reporting this issue.

I tested the initial query, and I got the following error:

Error executing query: parse error at char 107: range specification must be preceded by a metric selector, but follows a *promql.AggregateExpr instead

Regarding this message, I think min_over_time does not support subquery.

Adding ':' does not work either, on my Prometheus instance.

What version of Prometheus are you using ?

from awesome-prometheus-alerts.

yydance avatar yydance commented on August 28, 2024

The version of Prometheus is 2.16.0。
Maybe there are some differences between different versions,but I think min_over_time does support subquery,the ref "https://prometheus.io/blog/2019/01/28/subquery-support/"

from awesome-prometheus-alerts.

samber avatar samber commented on August 28, 2024

Ok, my Prometheus server was too old then.

I'll prepare a PR ;)

from awesome-prometheus-alerts.

lgg42 avatar lgg42 commented on August 28, 2024

Hi! I think this expression query still needs some love. We just began using it and we're getting false positives. That means, short-lived pods that go trough the following phases: Pending, Running, Succeeded, Failed, Unknown get marked as unhealthy even if they did their work. Example:

trafficdatalakeingestionespdrivingsensor-12de660039ef47959b6b90046c978ff2                0/1     Pending             0          0s
trafficdatalakeingestionespdrivingsensor-12de660039ef47959b6b90046c978ff2                0/1     ContainerCreating   0          1s
trafficdatalakeingestionespdrivingsensor-12de660039ef47959b6b90046c978ff2                1/1     Running             0          3s
trafficdatalakeingestionespdrivingsensor-12de660039ef47959b6b90046c978ff2                0/1     Completed           0          16s
trafficdatalakeingestionespdrivingsensor-12de660039ef47959b6b90046c978ff2                0/1     Terminating         0          17s

From: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase

Failed | All containers in the Pod have terminated, and at least one container has terminated in failure. That is, the container either exited with non-zero status or was terminated by the system.

In our case they are terminated by the system, but everything was correct. I'll be thinking on a better expression but if you have any ideas I'm all eyes!

from awesome-prometheus-alerts.

djhoese avatar djhoese commented on August 28, 2024

@lgg42 I'm running into this too. I have gitlab CI runners and unit tests running on my cluster and they all trigger this because they are short lived. Did you ever come up with a better query?

from awesome-prometheus-alerts.

lgg42 avatar lgg42 commented on August 28, 2024

@djhoese Nope, hadn't the time yet. But is good to see I'm not the only one, sorry you're also suffering it 🙃

from awesome-prometheus-alerts.

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.