[prometheus-users] Re: Monitor number of seconds since metric change as prometheus time series

2020-09-13 Thread Weston Greene
I feel like this answer gives directly what you need minus one step, so forgive me if I'm misunderstanding. The one step it doesn't explicitly say is a second rule for `time() - stat__change__timestamp`. Here is an example directly from my working solution: ```rules.yaml - record:

[prometheus-users] Re: Monitor number of seconds since metric change as prometheus time series

2020-09-09 Thread t1hom7as
I am actually trying to do something very similar, but I can't really tell if it is the same or not. Basically, I have a metric that gives me the status of up or down, being 1 or 0 respectively in the value field. I would like to somehow find out from when the value went FROM 0 TO 1, so how lo

[prometheus-users] Re: Monitor number of seconds since metric change as prometheus time series

2020-04-03 Thread Weston Greene
ANSWERED! >From Stackoverflow: Summing up our discussion: the evaluation interval is too big; after 5 minutes, a metric becomes [stale][1]. This means that when the expression is evaluated, the right hand side of your `OR` expression is no longer considered by Prometheus and thus is always emp

[prometheus-users] Re: Monitor number of seconds since metric change as prometheus time series

2020-04-01 Thread Weston Greene
In the stackoverflow post about this same topic, I was encouraged to reduce my evaluation frequency since `last-update` was likely going stale by the default TTL (Time To Live) of 5 minutes. Now I can't get passed the `vector contains metrics with the same labelset after applying rule labels`.

[prometheus-users] Re: Monitor number of seconds since metric change as prometheus time series

2020-03-30 Thread Weston Greene
This was already partially answered in https://stackoverflow.com/questions/54148451 But not sufficiently, so I'm asking here and in the Stack Overflow: https://stackoverflow.com/questions/60928468 Here is the image of the graph: [image: Screen Shot 2020-03-30 at 06.18.07.png] On Monday, Ma

[prometheus-users] Re: Monitor number of seconds since metric change as prometheus time series

2020-03-30 Thread Weston Greene
This was already partially answered in https://stackoverflow.com/questions/54148451 But not sufficiently, so I'm asking here and in the Prometheus Google Group: https://groups.google.com/d/topic/prometheus-users/JxepDL9eosQ/discussion Here is the image of the graph: [image: Screen Shot 2020-0