Github Rate Limit Prometheus Exporter

Share Your Love

In this post, you will learn on repository Github Rate Limit Prometheus Exporter 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 GitHub App credentials, alongside a type of authentication to use(pat/app)

The metrics can then be represented on a grafana dashboard:

Grafana panel example

Docker:

PAT

docker run -d \
    -e GITHUB_AUTH_TYPE=PAT \
    -e GITHUB_APP_NAME=name_of_my_app
    -e GITHUB_TOKEN=my_token \
    -p 2112:2112 \
    ghcr.io/kalgurn/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_APP_NAME=name_of_my_app
    -e GITHUB_PRIVATE_KEY_PATH=/tmp
    -v $PWD/path_to/key.pem:/tmp/key.pem
    -p 2112:2112 \
    ghcr.io/kalgurn/grl-exporter:latest

GitHub:

Source: View Github If you find anything incorrect then inform us.

Share Your Love
Avatar photo
Lingaraj Senapati

Hey There! I am Lingaraj Senapati, the Founder of lingarajtechhub.com My skills are Freelance, Web Developer & Designer, Corporate Trainer, Digital Marketer & Youtuber.

Articles: 429

Newsletter Updates

Enter your email address below to subscribe to our newsletter