Skip to content

GitHub Rate Limits Prometheus exporter. Works with both App and PAT credentials

License

Notifications You must be signed in to change notification settings

gocardless/github-rate-limits-prometheus-exporter

 
 

Repository files navigation

Github Rate Limit Prometheus Exporter

A prometheus exporter which scrapes GitHub API for the rate limits used by PAT/GitHub App.

Helm Chart with values and deployment can be found here

For the exporter to run you need to supply either a GitHub Token or a set of a GitHub App credentials, alongside with a type of authentication to use(pat/app)

Fork of kalgurn/github-rate-limits-prometheus-exporter that adds a health_check endpoint for kubernetes.

The metrics can then be represented on a grafana dashboard

Grafana panel example

Docker

Building locally

 docker build . -t grl-exporter

PAT

docker run -d \
    -e GITHUB_AUTH_TYPE=PAT \
    -e GITHUB_ACCOUNT_NAME=name_of_my_app
    -e GITHUB_TOKEN=my_token \
    -p 2112:2112 \
    grl-exporter:latest

GitHub APP

docker run -d \
    -e GITHUB_AUTH_TYPE=APP \
    -e GITHUB_APP_ID=my_app_id \
    -e GITHUB_INSTALLATION_ID=my_app_installation_id \
    -e GITHUB_ACCOUNT_NAME=name_of_my_app
    -e GITHUB_PRIVATE_KEY_PATH=/tmp
    -v $PWD/path_to/key.pem:/tmp/key.pem
    -p 2112:2112 \
    grl-exporter:latest

About

GitHub Rate Limits Prometheus exporter. Works with both App and PAT credentials

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 78.9%
  • Smarty 15.5%
  • Dockerfile 3.2%
  • Shell 2.4%