How to monitor if Bitbucket Server is up and running

お困りですか?

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

コミュニティに質問

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

目的

Administrators may wish to monitor if Bitbucket 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.

ソリューション

For monitoring if your Bitbucket Server is up, you can periodically send the <Bitbucket_Base_URL>/status request and interpret the response received to such request.
For example, the following command:

curl <Bitbucket_Base_URL>/status

will return one of the following responses, depending on the current status of your Bitbucket Server:

ResponseHTTP response code意味

curl: (52) Empty reply from server

その他Tomcat/Bitbucket Server is too busy to respond to this request.
{"state":"STARTING"}503The application is starting up, but not yet available Not yet ready to receive in-coming requests. It is optional to forward requests in this state. Users will see the Starting Bitbucket with the progress bar and Git requests will be queued until Bitbucket is ready for them. Requests could time out.
{"state":"FIRST_RUN"}200

The application is running for the first time and has not yet been configured. All requests to the web UI will be redirected to the First Run Wizard. Not ready to receive in-coming requests but request should still be forwarded to Bitbucket.

{"state":"RUNNING"}200Bitbucket is up and running Ready to receive in-coming requests.
{"state":"MAINTENANCE"}200The application is currently not available because the application is under maintenance. Blocking with the Load Balancer or proxy could block Bitbucket from coming out of maintenance mode. Should allow in-coming requests.
{"state":"ERROR"}500The application is currently not available because of an error. Not ready to receive in-coming requests.
{"state":"STOPPING"}503The application is shutting down.

注意

説明Monitor Bitbucket Server
製品Bitbucket Server, Bitbucket Data Center

最終更新日: 2019 年 12 月 20 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.