Sign inSign up

szevez/prometheus-gitlab-license-exporter

By szevez

•Updated 4 months ago

Prometheus Exporter for retrieving GitLab License information.

Image
0

2.1K

szevez/prometheus-gitlab-license-exporter repository overview

⁠prometheus-gitlab-license-exporter

ci

⁠Requirements

  • GitLab API Token (to interact with license endpoints, you need to authenticate yourself as an administrator, read_api is sufficient)
  • GitLab URL

⁠Exported Metrics

NameDescription
gitlab_license_active_usersCurrent active users that consume a license
gitlab_license_expiredExpiry status of the license
gitlab_license_expires_atDate the license expires at
gitlab_license_historical_maxThis is the highest peak of users on your installation since the license started
gitlab_license_idID of the license
gitlab_license_maximum_user_countThis is the highest peak of users on your installation since the license started
gitlab_license_overageThe difference between the number of billable users and the licensed number of users
gitlab_license_starts_atDate the license starts at
gitlab_license_user_limitThe number of users the license is licensed for

⁠Docker

$ docker pull szevez/prometheus-gitlab-license-exporter:latest
$ docker run -p 9191:9191 \
    -e GITLAB_TOKEN=YOURTOKEN \
    -e GITLAB_URL=https://YOURURL \
    szevez/prometheus-gitlab-license-exporter:latest

⁠Local Development

  • Requires go >= 1.18
$ export GITLAB_TOKEN=YOURTOKEN
$ export GITLAB_URL=https://YOURURL
$ go run main.go

Access exporter at localhost:9191/metrics

Tag summary

Content type

Image

Digest

sha256:e5200e0a8…

Size

6.7 MB

Last updated

4 months ago

docker pull szevez/prometheus-gitlab-license-exporter