Buildkite-agent-metrics

Team,

We enabled buildkite-agent-metrics for our buildkite setup and we use the backend as prometheus to scrape it.
What are considered as jobs in the metrics ? Are those the different tasks in each build ?

Can we get some more info on these metrics definition:

  • buildkite_total_scheduled_jobs_count
  • buildkite_total_waiting_jobs_count
  • buildkite_total_unfinished_jobs_count
  • buildkite_total_running_jobs_count

We only have got these attached metrics available in prometheus. Are only these supposed to come ?

We got agent specific busy or idle metric, and then we have job specific as the above mentioned. Can we also get pipeline or build specific metrics, like for each pipeline how many builds ran, how long it took, how many got failed, how many got success, cancelled etc.

Thanks

Hey @surajthakur! :wave:

Yup, those are all the available metrics. The tool only provides agent metrics — how many agents are connected, and how many jobs are available to be run by them. The purpose of the tool is to facilitate autoscaling agent capacity.

What are considered as jobs in the metrics?

A Buidlkite jobs; in a buildkite pipeline you create builds with steps, each step gets a job, so that’s what jobs is in the metric.

Can we get some more info on these metrics definition:

Those metrics are across the entire Buildkite organization, so across all queues in your organization, every job running, waiting, unfinished, and scheduled.

We got agent specific busy or idle metric, and then we have job-specific as the above mentioned. Can we also get pipeline or build specific metrics, like for each pipeline how many builds ran, how long it took, how many got failed, how many got success, cancelled etc.

This doesn’t exist today, sorry!, it’s out of scope for that tool, but it’s an interesting use case. I’ll pass it along to our Product Manager.

In the meantime, there are other things you could try. For example, using webhooks or eventbridge to consume events from buildkite and generate the metrics they want.
Here is a tool that consumes buildkite webhooks and exports them to Prometheus
Not sure about the details but maybe it could help you.

Thank you!

Cheers,

Hey @paula !

Thanks for the answers to all my queries.
We will try that tool or build a custom one.

1 Like