Exposes basic metrics for your repositories from the GitHub API, to a Prometheus compatible endpoint.
This exporter is setup to take input from environment variables:
ORGSIf supplied, the exporter will enumerate all repositories for that organization. Expected in the format "org1, org2". Can be ommited if usingREPOSand not requiredREPOSIf supplied, The images you wish to monitor, expected in the format "user/repo1, user/repo2". Can be across different Github users/orgs. Can be ommited if usingORGSand not required
GITHUB_TOKENIf supplied, enables the user to supply a github authentication token that allows the API to be queried more often. Optional, but recommended.GITHUB_TOKEN_FILEIf supplied instead ofGITHUB_TOKEN, enables the user to supply a path to a file containing a github authentication token that allows the API to be queried more often. Optional, but recommended.API_URLGithub API URL, shouldn't need to change this. Defaults tohttps://api.github.comLISTEN_PORTThe port you wish to run the container on, the Dockerfile defaults this to9171METRICS_PATHthe metrics URL path you wish to use, defaults to/metricsLOG_LEVELThe level of logging the exporter will run with, defaults todebug
Run manually from Docker Hub:
docker run -d --restart=always -p 9171:9171 -e REPOS="infinityworks/ranch-eye, infinityworks/prom-conf" infinityworks/github-exporter
Build a docker image:
docker build -t <image-name> .
docker run -d --restart=always -p 9171:9171 -e REPOS="infinityworks/ranch-eye, infinityworks/prom-conf" <image-name>
github-exporter:
tty: true
stdin_open: true
expose:
- 9171:9171
image: infinityworks/github-exporter:latest
Metrics will be made available on port 9171 by default
An example of these metrics can be found in the METRICS.md markdown file in the root of this repository