WIP: gitlab-ctl statuses
1 unresolved thread
1 unresolved thread
this MR gives output like
gitlab_service_up{name="gitlab-workhorse"} 1 1476646371941
gitlab_service_up{name="logrotate"} 1 1476646371941
gitlab_service_up{name="mailroom"} 1 1476646371941
gitlab_service_up{name="mattermost"} 0 1476646371941
gitlab_service_up{name="postgresql"} 1 1476646371941
gitlab_service_up{name="redis"} 1 1476646371941
gitlab_service_up{name="sidekiq"} 1 1476646371941
gitlab_service_up{name="unicorn"} 1 1476646371941
but there is requirements to obtain this information:
-
gitlab-monitor
must be run under root (or prometheus user must be in sudoers) - data obtained via
sudo gitlab-ctl status
Merge request reports
Activity
Reassigned to @pcarranza
Mentioned in issue gitlab-com/infrastructure#536 (closed)
- lib/gitlab_monitor/services.rb 0 → 100644
4 class Services 5 def write_to(target) 6 @metrics = PrometheusMetrics.new 7 8 out = `gitlab-ctl status` 9 out.each_line do |line| 10 vars = line.split(":") 11 status = vars[0].strip 12 name = vars[1].strip 13 value = 14 if status == "run" 15 1 16 else 17 0 18 end 19 @metrics.add "gitlab_service_up{name=\"#{name}\"}", value Added 5 commits:
- 0f87a6f5...b3052878 - 4 commits from branch
master
- 2833dc17 - Merge branch 'master' into gitlab-ctl-statuses
- 0f87a6f5...b3052878 - 4 commits from branch
@maratkalibek please rebase or fix the conflicts and resolve the comments
Reassigned to @maratkalibek
Please register or sign in to reply