What Bamboo URL should I use for HTTP healthchecks?


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

Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles 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

Administrators may wish to monitor if Bamboo Server is up and running at any given time. This can also be used as a health check status endpoint for load balancers or proxies. This article suggests a simple approach to address this requirement.

Solution

Bamboo Server 7.0 or later provides two endpoints that can be used to report the status of the server. These are /rest/api/latest/status and /rest/api/latest/server. To effectively return the server status the REST API plugin needs to be enabled and working. 


For example, the following command:

$ curl <Bamboo_Base_URL>/rest/api/latest/status


Will return one of the following responses, depending on the current status of your Bamboo Server:

ResponseHTTP response codeMeaning

curl: (52) Empty reply from server

OtherTomcat/Bamboo Server is too busy to respond to this request.
curl: (7) Failed to connect to : Connection refused
OtherTomcat/Bamboo Server is not running or has not yet started listening for requests.
curl hangs waiting for responseOtherTomcat/Bamboo Server has started and listening but not responding.
{"state":"RUNNING"}200

Bamboo is up and running Ready to receive in-coming requests.

{"state":"PAUSED"}200Bamboo has been paused from the UI or rest API.


The /rest/api/latest/server endpoint can also be used to return the server status. Prior to Bamboo 7.0 this was the only endpoint. The response provides a little more detail and also indicates whether a reindex is currently running. e.g.

$ curl <Bamboo_Base_URL>/rest/api/latest/server
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?><restServerStatusInfo><state>RUNNING</state><reindexInProgress>false</reindexInProgress></restServerStatusInfo>


See also https://docs.atlassian.com/atlassian-bamboo/REST/7.2.1/




Last modified on Jan 7, 2025

Was this helpful?

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