{"id":13563318,"url":"https://github.com/githubexporter/github-exporter","last_synced_at":"2026-02-21T00:18:35.531Z","repository":{"id":41258133,"uuid":"67989490","full_name":"githubexporter/github-exporter","owner":"githubexporter","description":":octocat: Prometheus exporter for github metrics","archived":false,"fork":false,"pushed_at":"2025-10-22T19:26:02.000Z","size":2185,"stargazers_count":449,"open_issues_count":22,"forks_count":129,"subscribers_count":10,"default_branch":"master","last_synced_at":"2026-01-12T14:35:41.175Z","etag":null,"topics":["exporter","github","metrics","monitoring","prometheus","prometheus-exporter"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/githubexporter.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2016-09-12T08:12:46.000Z","updated_at":"2025-12-31T00:16:58.000Z","dependencies_parsed_at":"2023-09-25T04:52:16.739Z","dependency_job_id":"410efcbb-b6b8-4dc7-8dfc-d86d819903f2","html_url":"https://github.com/githubexporter/github-exporter","commit_stats":{"total_commits":108,"total_committers":35,"mean_commits":3.085714285714286,"dds":0.8240740740740741,"last_synced_commit":"7f31ba978c87e1b55cd613f41c9dc138c2264988"},"previous_names":["githubexporter/github-exporter","infinityworks/github-exporter"],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/githubexporter/github-exporter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/githubexporter%2Fgithub-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/githubexporter%2Fgithub-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/githubexporter%2Fgithub-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/githubexporter%2Fgithub-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/githubexporter","download_url":"https://codeload.github.com/githubexporter/github-exporter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/githubexporter%2Fgithub-exporter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28428325,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T16:38:47.836Z","status":"ssl_error","status_checked_at":"2026-01-14T16:34:59.695Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["exporter","github","metrics","monitoring","prometheus","prometheus-exporter"],"created_at":"2024-08-01T13:01:17.762Z","updated_at":"2026-02-21T00:18:35.513Z","avatar_url":"https://github.com/githubexporter.png","language":"Go","readme":"# Prometheus GitHub Exporter\n\nExposes basic metrics for your repositories from the GitHub API, to a Prometheus compatible endpoint.\n\n## Configuration\n\nThis exporter is configured via environment variables. All variables are optional unless otherwise stated. Below is a list of supported configuration values:\n\n| Variable                      | Description                                                                        | Default                  |\n|-------------------------------|------------------------------------------------------------------------------------|--------------------------|\n| `ORGS`                        | Comma-separated list of GitHub organizations to monitor (e.g. `org1,org2`).        |                          |\n| `REPOS`                       | Comma-separated list of repositories to monitor (e.g. `user/repo1,user/repo2`).    |                          |\n| `USERS`                       | Comma-separated list of GitHub users to monitor (e.g. `user1,user2`).              |                          |\n| `GITHUB_TOKEN`                | GitHub personal access token for API authentication.                               |                          |\n| `GITHUB_TOKEN_FILE`           | Path to a file containing a GitHub personal access token.                          |                          |\n| `GITHUB_APP`                  | Set to `true` to authenticate as a GitHub App.                                     | `false`                  |\n| `GITHUB_APP_ID`               | The App ID of the GitHub App. Required if `GITHUB_APP` is `true`.                  |                          |\n| `GITHUB_APP_INSTALLATION_ID`  | The Installation ID of the GitHub App. Required if `GITHUB_APP` is `true`.         |                          |\n| `GITHUB_APP_KEY_PATH`         | Path to the GitHub App private key file. Required if `GITHUB_APP` is `true`.       |                          |\n| `GITHUB_RATE_LIMIT_ENABLED`   | Whether to fetch GitHub API rate limit metrics (`true` or `false`).                | `true`                   |\n| `GITHUB_RATE_LIMIT`           | Core API quota threshold for proactive GitHub App token refresh. When the remaining `core` requests drop below this value, a new installation token is requested. `0` disables this behaviour. | `0` |\n| `GITHUB_RESULTS_PER_PAGE`     | Number of results to request per page from the GitHub API (max 100).               | `100`                    |\n| `FETCH_REPO_RELEASES_ENABLED` | Whether to fetch repository release metrics (`true` or `false`).                   | `true`                   |\n| `FETCH_ORGS_CONCURRENCY`      | Number of concurrent requests to make when fetching organization data.             | `1`                      |\n| `FETCH_ORG_REPOS_CONCURRENCY` | Number of concurrent requests to make when fetching organization repository data.  | `1`                      |\n| `FETCH_USERS_CONCURRENCY`     | Number of concurrent requests to make when fetching user data.                     | `1`                      |\n| `FETCH_USERS_CONCURRENCY`     | Number of concurrent requests to make when fetching repository data.               | `1`                      |\n| `API_URL`                     | GitHub API URL. You should not need to change this unless using GitHub Enterprise. | `https://api.github.com` |\n| `LISTEN_PORT`                 | The port the exporter will listen on.                                              | `9171`                   |\n| `METRICS_PATH`                | The HTTP path to expose Prometheus metrics.                                        | `/metrics`               |\n| `LOG_LEVEL`                   | Logging level (`debug`, `info`, `warn`, `error`).                                  | `info`                   |\n\n### Credential Precedence\n\nWhen authenticating with the GitHub API, the exporter uses credentials in the following order of precedence:\n\n1. **GitHub App credentials** (`GITHUB_APP=true` with `GITHUB_APP_ID`, `GITHUB_APP_INSTALLATION_ID`, and `GITHUB_APP_KEY_PATH`): If enabled, the exporter authenticates as a GitHub App and ignores any personal access token or token file.\n2. **Token file** (`GITHUB_TOKEN_FILE`): If a token file is provided (and GitHub App is not enabled), the exporter reads the token from the specified file.\n3. **Direct token** (`GITHUB_TOKEN`): If neither GitHub App nor token file is provided, the exporter uses the token supplied directly via the environment variable.\n\nIf none of these credentials are provided, the exporter will make unauthenticated requests, which are subject to very strict rate limits.\n\n## Install and deploy\n\nRun manually from Docker Hub:\n```\ndocker run -d --restart=always -p 9171:9171 -e REPOS=\"infinityworks/ranch-eye, infinityworks/prom-conf\" githubexporter/github-exporter\n```\n\nRun manually from Docker Hub (With GitHub App):\n```\ndocker run -d --restart=always -p 9171:9171 --read-only -v ./key.pem:/key.pem -e GITHUB_APP=true -e GITHUB_APP_ID= -e GITHUB_APP_INSTALLATION_ID= -e GITHUB_APP_KEY_PATH=/key.pem \u003cIMAGE_NAME\u003e\n```\n\nBuild a docker image:\n```\ndocker build -t \u003cimage-name\u003e .\n```\n\n## Docker compose\n\n```\ngithub-exporter:\n    tty: true\n    stdin_open: true\n    expose:\n      - 9171\n    ports:\n      - 9171:9171\n    image: githubexporter/github-exporter:latest\n    environment:\n      - REPOS=\u003cREPOS you want to monitor\u003e\n      - GITHUB_TOKEN=\u003cyour github api token\u003e\n```\n\n## Docker compose (GitHub App)\n\n```\ngithub-exporter-github-app:\n  tty: true\n  stdin_open: true\n  expose:\n    - 9171\n  ports:\n    - 9171:9171\n  build: .\n  environment:\n    - LOG_LEVEL=debug\n    - LISTEN_PORT=9171\n    - GITHUB_APP=true\n    - GITHUB_APP_ID=\n    - GITHUB_APP_INSTALLATION_ID=\n    - GITHUB_APP_KEY_PATH=/key.pem\n  restart: unless-stopped\n  volumes:\n    - \"./key.pem:/key.pem:ro\"\n\n```\n\n## Metrics\n\nMetrics will be made available on port 9171 by default\nAn example of these metrics can be found in the `METRICS.md` markdown file in the root of this repository\n\n## Tests\n\nThere is a set of blackbox behavioural tests which validate metrics endpoint in the `test` directory.\nRun as follows\n\n```bash\nmake test\n```\n\n## Version Release Procedure\nOnce a new pull request has been merged into `master` the following script should be executed locally. The script will trigger a new image build in docker hub with the new image having the tag `release-\u003cversion\u003e`. The version is taken from the `VERSION` file and must follow semantic versioning. For more information see [semver.org](https://semver.org/).\n\nPrior to running the following command ensure the number has been increased to desired version in `VERSION`:\n\n```bash\n./release-version.sh\n```\n\n## Metadata\n[![](https://images.microbadger.com/badges/image/infinityworks/github-exporter.svg)](http://microbadger.com/images/infinityworks/github-exporter \"Get your own image badge on microbadger.com\") [![](https://images.microbadger.com/badges/version/infinityworks/github-exporter.svg)](http://microbadger.com/images/infinityworks/github-exporter \"Get your own version badge on microbadger.com\")\n","funding_links":[],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithubexporter%2Fgithub-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgithubexporter%2Fgithub-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithubexporter%2Fgithub-exporter/lists"}