在Debian上監控GitLab運行狀態可通過以下方式:
系統服務監控
使用systemctl查看GitLab服務狀態:
sudo systemctl status gitlab
啟動/停止服務:
sudo systemctl start/stop gitlab
GitLab自帶工具
gitlab-rake gitlab:monitor:check:檢查實例健康狀況。gitlab-ctl tail:實時查看GitLab日志。第三方監控工具
http://服務器IP:19999查看。日志監控
查看GitLab相關日志(路徑:/var/log/gitlab/):
sudo tail -f /var/log/gitlab/gitlab-rails/production.log
說明:Prometheus+Grafana適合詳細指標監控,GitLab自帶工具適合快速查看狀態,可根據需求選擇組合使用。