gitlab-extra-exporter

module
v0.0.0-...-936b271 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 13, 2025 License: GPL-3.0

README

build Go Report Card Go Version

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 <string> or as env variable GITLAB_URI.

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

Optional

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

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

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

Helm

You can find a helm chart to install the exporter here.

Directories

Path Synopsis
cmd
lib
client
Package client contains all the files to extract the information from gitlab
Package client contains all the files to extract the information from gitlab
collector
Package collector contains all the go files needed to export metrics.
Package collector contains all the go files needed to export metrics.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL