Been around the internets, tried a thousand things, suspect it isn’t possible (or I’m out of my depth here), so last ditch is to seek out guidance on the forum…
Basically we have a counter that tracks successful job runs. What I am trying to do is
sum(increase(... within a 4h window every day over say, a 30d period.
For example, if a job ran between 9am and 12pm today, the counter would increase by 1. If it ran again today between 12pm and 4pm, the counter would increase by 1 again (2 job runs total for today).
The metrics I want are only the 12pm-4pm, ignoring the 9am-12pm resulting in a today’s total of 1. Ultimately I’m piping this into Grafana to show the higher-ups a nice graph per day that shows the number of jobs that are re-run in the afternoon. I can do this on the whole day no problem (i.e. 2 jobs ran today), and I have been experimenting with
and on() hour() > 12 and on() hour <= 16 but haven’t been able to get what I need.
First question should probably be: is this even possible?
Many thanks in advance!