How to fetch Bamboo Agent utilization report for Builds and Deployments using Database queries


アトラシアン コミュニティをご利用ください。


プラットフォームについて: サーバーと Data Center のみ。この記事は、サーバーおよび Data Center プラットフォームのアトラシアン製品にのみ適用されます。

The steps outlined on this article are provided AS-IS. This means we've had reports of them working for some customers — under certain circumstances — yet are not officially supported, nor can we guarantee they'll work for your specific scenario — though you may try them out.

You may follow through and validate them on your own non-prod environment prior to production or fall back to supported alternatives if they don't work out.

We also invite you to reach out to our Community for matters that fall beyond Atlassian's scope of support! (smile)


This KB helps in generating a report for Bamboo agent utilization across Builds and Deployments. 

If we are looking for a report which contains what Builds and Deployments were triggered for each Individual agents we can use the below SQL queries mentioned on this KB.

Below SQL queries are covered here:

  • Agent utilization report for Builds.
  • Agent utilization report for Deployment.


Tested the query in Bamboo 8.1.3 with PostgreSQL DB.


  • SQL to list all the Builds and which agent ran that build and it's completed time.
select q.agent_type, q.title, bs.build_key, bs.plan_name, bs.build_completed_date from queue q left join buildresultsummary bs 
on q.queue_id=bs.build_agent_id order by q.agent_type,q.title,bs.plan_name

  • SQL to list all the Deployments and which agent ran that deployment and it's completed time.
select q.agent_type, q.title, dr.version_name,dr.environment_id,dr.finished_date from queue q left join deployment_result dr 
on q.queue_id=dr.agent_id order by q.agent_type,q.title
最終更新日 2022 年 5 月 6 日


Powered by Confluence and Scroll Viewport.