I would like to know the number of created jobs in Kubernetes based on a specific label. The following is what I came up with. Since there are gaps between certain intervals I would like to do a count over time.
kube_job_created * on(job_name)
group_left (label_cronjob_name)
kube_job_labels{label_cronjob_name="sf-synch-abn"}
Where do I place the range vector selector?
I think what you want is:
count(
count_over_time(kube_job_created[1h])
* on(job_name) group_left (label_cronjob_name)
count_over_time(kube_job_labels{label_cronjob_name="sf-synch-abn"}[1h])
)