README.md 1.58 KB
Newer Older
Stan Hu's avatar
Stan Hu committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
## Introduction

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

1. Collects GitLab production metrics via custom probes defined in a YAML 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 4567) that delivers these metrics to a Prometheus scraper.

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

### Supported Probes

1. Database
Ahmad Sherif's avatar
Ahmad Sherif committed
16
    * Per-table tuple stats
Stan Hu's avatar
Stan Hu committed
17
18
    * Slow queries
    * Blocked queries
Paco Guzman's avatar
Paco Guzman committed
19
    * Vacuum queries
20
    * Row count queries
Ahmad Sherif's avatar
Ahmad Sherif committed
21
    * CI builds
Stan Hu's avatar
Stan Hu committed
22
23
1. Git
    * git pull/push timings
Ahmad Sherif's avatar
Ahmad Sherif committed
24
    * git processes stats (see Process below)
Stan Hu's avatar
Stan Hu committed
25
26
1. Process
    * Age
Ahmad Sherif's avatar
Ahmad Sherif committed
27
    * Count
Stan Hu's avatar
Stan Hu committed
28
    * Memory usage
Ahmad Sherif's avatar
Ahmad Sherif committed
29
1. Sidekiq
Stan Hu's avatar
Stan Hu committed
30

31
32
33
34
35
36
37
38
39
40
41
42
43
### Setup with GitLab Development Kit

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

`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 config yaml. An
example can be found under `config/gitlab-monitor.yml.example`. For each probe
which has to connect to the database, set the connection_string to:
`dbname=gitlabhq_development host=/Users/<user>/gitlab-development-kit/postgresq`

Stan Hu's avatar
Stan Hu committed
44
[Prometheus Web exporter]: https://prometheus.io/docs/instrumenting/exporters/
45
[GitLab Development Kit]: https://gitlab.com/gitlab-org/gitlab-development-kit