Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/whyeasy/gitlab-extra-exporter

This is a Prometheus exporter for Gitlab to get information via the API
https://github.com/whyeasy/gitlab-extra-exporter

gitlab golang observability prometheus prometheus-exporter

Last synced: 16 days ago
JSON representation

This is a Prometheus exporter for Gitlab to get information via the API

Awesome Lists containing this project

README

        

![build](https://github.com/Whyeasy/gitlab-extra-exporter/workflows/build/badge.svg)
![status-badge](https://goreportcard.com/badge/github.com/Whyeasy/gitlab-extra-exporter)
![Github go.mod Go version](https://img.shields.io/github/go-mod/go-version/Whyeasy/gitlab-extra-exporter)

# gitlab-extra-exporter

This is a Prometheus exporter for Gitlab to get information via the API.

Currently this exporter retrieves the following data:

- All projects within Gitlab
- Retrieves all Merge Request from the last 7 days with:
- When the MR is opened.
- When the MR is merged.
- When the MR is closed.
- Last update done to the MR.
- Amount of changes within the MR.
- Amount of assignees.

Because of the amount of API request done to get the amount of changes on a MR, limit this exporter to be only requested once per 5 minutes for example, with a Service Monitor time out of 30 sec (depending on the amount of MRs).

## Requirements

### Required

Provide your Gitlab URI; `--gitlabURI ` or as env variable `GITLAB_URI`.

Provide a Gitlab API Key with access to projects and merge requests; `--gitlabAPIKey ` or as env variables `GITLAB_API_KEY`

### Optional

Change listening port of the exporter; `--listenAddress ` or as env variable `LISTEN_ADDRESS`. Default = `8080`

Change listening path of the exporter; `--listenPath ` or as env variable `LISTEN_PATH`. Default = `/metrics`

Change the interval of retrieving data in the background; `--interval ` or as env variable `INTERVAL`. Default is `60`

## Helm

You can find a helm chart to install the exporter [here](https://github.com/Whyeasy/helm-charts/tree/master/charts/gitlab-extra-exporter).