My application has several jobs that return job_status gauge metric with values 0, 1, 2, 3, 4, 5. Status 1 - means 'running'. Jobs can be 'running' in parallel or not, sometimes with intersections (see blue lines):
job_status
I need to calculate how much time at least 1 job was in status 1 ('running') - it can be visualized as a sum of red lines. Additional problem is that I need to aggregate this by job_name label (there are several jobs with the same job_name, but different job_id).
job_name
job_id
2.1m questions
2.1m answers
60 comments
57.0k users