Metric for number of non-failed pending jobs


I’m running Zeebe workers using kubernetes and I’d like to scale their deployments by the number of pending jobs per job type. Currently I’m using the zeebe_pending_jobs_total prometheus metric that is provided as an external metric to scale the deployment, but my problem is that this metric also counts the jobs that are failed, which will cause the deployment to be scaled up even when there’s nothing to do. Is there any way to just get the number of pending jobs that have not failed?

Thank you !

1 Like

When you say “jobs that are failed”, do you mean workflows that have an incident raised?

Yeah that’s what I mean. My problem is that the jobs that have caused an incident are included in the zeebe_pending_jobs_total metric and I wondered if its possible to just get the number of jobs per job type that are activatable somehow.