G

gitlab-monitor

Tooling used to monitor some aspects of GitLab.com

Name Last Update
bin Loading commit data...
config Loading commit data...
lib Loading commit data...
spec Loading commit data...
.gitignore Loading commit data...
.gitlab-ci.yml Loading commit data...
.rubocop.yml Loading commit data...
Gemfile Loading commit data...
Gemfile.lock Loading commit data...
LICENSE Loading commit data...
README.md Loading commit data...
gitlab-monitor.gemspec Loading commit data...

Introduction

gitlab-monitor is a Prometheus Web exporter that does the following:

  1. Collects GitLab production metrics via custom probes defined in a YAML configuration file.
  2. Custom probes gather measurements in the form of key/value pairs.
  3. For each probe, gitlab-monitor creates an HTTP endpoint /<probe_name> (by default on port 9168) that delivers these metrics to a Prometheus scraper.

A central Prometheus process is configured to poll exporters at a specified frequency.

Supported Probes

Below is a list of probes added by this exporter, and their corresponding metrics.

  1. Database
  2. Git
    • git pull/push timings -- git_pull_time_milliseconds, git_push_time_milliseconds
    • git processes stats (see Process below)
  3. Process
    • Age -- process_age_seconds
    • Count -- process_count
    • Memory usage -- process_memory_bytes
  4. Sidekiq -- sidekiq_queue_size, sidekiq_queue_latency, sidekiq_enqueued_jobs_count, sidekiq_running_jobs_count, sidekiq_jobs_to_be_retried_count

Setup with GitLab Development Kit

gitlab-monitor can be setup with the GitLab Development Kit for development. When using the gitlab-monitor CLI, you'll need to set the --db-conn flag to connect to the PostgreSQL instance in your GDK folder. For example:

bin/gitlab-mon row-counts --db-conn="dbname=gitlabhq_development host=/Users/<user>/gitlab-development-kit/postgresql"

When serving the pages on localhost, you'll need to edit the YAML configuration file. An example can be found under config/gitlab-monitor.yml.example. For each probe that has to connect to the database, set the connection_string to dbname=gitlabhq_development host=/Users/<user>/gitlab-development-kit/postgresql