Exposes basic metrics for your repositories from the Gitee API, to a Prometheus compatible endpoint.
( Most of the inspiration comes from github-exporter
, thanks to the infinityworks team for bringing us such wonderful examples. )
This exporter is setup to take input from environment variables:
ORGS
If supplied, the exporter will enumerate all repositories for that organization. Expected in the format "org1, org2".REPOS
If supplied, The repos you wish to monitor, expected in the format "user/repo1, user/repo2". Can be across different Gitee users/orgs.USERS
If supplied, the exporter will enumerate all repositories for that users. Expected in
the format "user1, user2".At least one of those 3 options should be provided.
GITEE_TOKEN
If supplied, enables the user to supply a gitee authentication token that allows the API to be queried more often. Optional, but recommended.GITEE_TOKEN_FILE
If supplied instead of GITEE_TOKEN
, enables the user to supply a path to a file containing a gitee authentication token that allows the API to be queried more often. Optional, but recommended.API_URL
Gitee API URL, shouldn't need to change this. Defaults to https://gitee.com/api/v5
LISTEN_PORT
The port you wish to run the container on, the Dockerfile defaults this to 9190
METRICS_PATH
the metrics URL path you wish to use, defaults to /metrics
LOG_LEVEL
The level of logging the exporter will run with, defaults to debug
Run manually from Docker Hub:
docker run -d --restart=always -p 9190:9190 -e REPOS="oscstudio/gitee-exporter, atompitestorg/testrepo" oscstudio/gitee-exporter
Build a docker image:
docker build -t <image-name> .
docker run -d --restart=always -p 9190:9190 -e REPOS="oscstudio/gitee-exporter, atompitestorg/testrepo" <image-name>
gitee-exporter:
tty: true
stdin_open: true
expose:
- 9190
ports:
- 9190:9190
image: oscstudio/gitee-exporter:latest
environment:
- REPOS=<REPOS you want to monitor>
- GITEE_TOKEN=<your gitee api token>
Metrics will be made available on port 9190 by default
An example of these metrics can be found in the METRICS.md
markdown file in the root of this repository
There is a set of blackbox behavioural tests which validate metrics endpoint in the test
directory.
Run as follows
make test
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
Activity
Community
Health
Trend
Influence
:Code submit frequency
:React/respond to issue & PR etc.
:Well-balanced team members and collaboration
:Recent popularity of project
:Star counts, download counts etc.