gitlab-monitor is a Prometheus Web exporter that does the following:
- Collects GitLab production metrics via custom probes defined in a YAML configuration file.
- Custom probes gather measurements in the form of key/value pairs.
- 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.
Below is a list of probes added by this exporter, and their corresponding metrics.
Per-table tuple stats --
Slow queries --
Stuck queries in idle in transaction --
Blocked queries --
Vacuum queries --
Row count queries --
CI builds --
- Per-table tuple stats --
git pull/push timings --
- git processes stats (see Process below)
- git pull/push timings --
- Age --
- Count --
- Memory usage --
- Age --
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"
Running gitlab-monitor as a Web exporter
When serving the pages on
localhost, you'll need to edit the YAML
configuration file. An example can be found under
each probe that has to connect to the database, set the
Once you have this configured, you can then run:
bin/gitlab-mon web -c config/gitlab-monitor.yml
Once running, you can point your browser or curl to the following URLs: