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).
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
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
You can find a helm chart to install the exporter here.