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`.
I do add labels in the recording rule:
```
stat: true
monitor: false
```
I believe this is because `last-update` already has all the labels that
`metric-name` has plus the labels that the recording rule adds, so when the
`or` is triggered `last-update` conflicts since it already has the labels.
How do I get around this? Thank you again for your creativity!
On Monday, March 30, 2020 at 10:23:20 AM UTC-4, Weston Greene wrote:
>
> 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, March 30, 2020 at 10:21:01 AM UTC-4, Weston Greene wrote:
>>
>>
>> I have the Recording rule pattern:
>> ```yaml
>> - record: last-update
>> expr: |
>> timestamp(changes(metric-name[450s]) > 0)
>> or
>> last-update
>> ```
>>
>> However, that doesn't work. The `or last-update` part doesn't return a
>> value.
>>
>> I have tried using an offset,
>> ` or (last-update offset 450s)`,
>> to no avail.
>>
>>
>> My evaluation frequency is 5 minutes (the frequency that prometheus runs
>> my Recording rules). I tried the 7.5 minutes offset because I theorized
>> that the OR was attempting to write last-update as last-update but
>> last-update was null in that second; if the OR were to attempt writing
>> last-update as the value it was during it's previous evaluation, then it
>> should find a value in last-update, but that returned no value as well.
>>
>>
>> This is what the metric looks like graphed:
>>
>> [choppy rather than a complete staircase][1] (I don't have enough
>> reputation to post pictures...)
>>
>>
>>
>> Thank you in advance for your help.
>>
>> Why I care:
>> If a time series plateaus for an extended period of time then I want to
>> know as that may mean it has begun to fail to return accurate data.
>>
>>
>> [1]: I think the image link is preventing me from posting
>>
>
--
You received this message because you are subscribed to the Google Groups
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/f50bb7cf-ba77-49a7-89b3-733b84703e41%40googlegroups.com.