How to view more details on Bamboo Elastic agent history

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

In order to view more details on Bamboo Elastic agent history, please use the solutions mentioned below.

Environment

Bamboo 8+

Solution

Solution 1

You can use the Bamboo user interface to view your Elastic agent usage history. From the top navigation bar, select   > Elastic Bamboo > Agent history.

Solution 2

Use the below SQL query to run it against the Bamboo database to get the Elastic agent's history. This SQL is tested against a Postgres Database.

Elastic Agent history : tested in Postgres
SELECT EI.NAME AS IMAGE,
       Q.ELASTIC_INSTANCE_ID,
       Q.CREATED_DATE,
       Q.LAST_START_TIME,
       Q.LAST_STOP_TIME
FROM   QUEUE Q
JOIN   ELASTIC_IMAGE EI
  ON   Q.ELASTIC_IMAGE = EI.ELASTIC_IMAGE_ID
ORDER BY Q.CREATED_DATE DESC

Example output:

imageelastic_instance_idcreated_datelast_start_timelast_stop_time
XXXX-bamboo-agent-linuxi-0ce472cb9bc4dbf102022-11-09 01:20:03.562022-11-09 01:20:03.5592022-11-09 04:12:35.76
XXXX-bamboo-agent-linuxi-0f15154fbddb8e3922022-11-08 23:22:34.6022022-11-09 00:56:59.1892022-11-09 01:12:35.764
XXXX-bamboo-agent-windowsi-05ab4de2bdea736612022-11-05 00:05:34.7852022-11-05 00:05:34.7832022-11-05 01:05:47.982


Solution 3

To get more details about the IP addresses of the Elastic agent that has been created, you can get the information from the Bamboo application logs <BAMBOO_HOME>/logs/atlassian-bamboo.log files.

grep details from Bamboo application logs
$grep -i 'Bamboo has detected that EC2 instance' logs/atlassian-bamboo*
logs/atlassian-bamboo.log:2022-11-17 14:12:30,794 INFO [elastic-pool-2-thread-1] [RemoteEC2InstanceImpl] Bamboo has detected that EC2 instance i-0bcc14a5b3ed2739d is now running at XX.XXX.XX.XXX.XXX
logs/atlassian-bamboo.log:2022-11-17 14:50:05,324 INFO [elastic-pool-2-thread-1] [RemoteEC2InstanceImpl] Bamboo has detected that EC2 instance i-09a5a5bbfa643fb2c is now running at XX.XXX.XX.XXX.XXX
logs/atlassian-bamboo.log:2022-11-17 14:50:05,324 INFO [elastic-pool-2-thread-5] [RemoteEC2InstanceImpl] Bamboo has detected that EC2 instance i-03cef9363944f1d95 is now running at XX.XXX.XX.XXX.XXX



Last modified on Apr 10, 2023

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.