Categorygithub.com/borisputerka/github_billing_exporter
repositorypackage
0.2.0
Repository: https://github.com/borisputerka/github_billing_exporter.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# README

GitHub billing exporter

This expoter exposes Prometheus metrics from GitHub billing API endpoint.

Building and running

Token privileges

Token needs to have access to read billing data.

Build

make

Running

Running using an environment variable:

export GITHUB_ORGS="ORG1,ORG2,..."
export GITHUB_TOKEN="example_token"
./github_billing_exporter

Running using args:

./github_billing_exporter \
--github-orgs="ORG1,ORG2,..." \
--github-token="example_token"

Collectors

There are three collectors (actions, packages and storage) all enabled by default. Disabling collector(s) can be done using arg --no-collector.<name>.

List of collectors

NameDescriptionEnabled
actionsExposes billing statistics from /orgs/{org}/settings/billing/actionstrue
packagesExposes billing statistics from /orgs/{org}/settings/billing/packagestrue
storageExposes billing statistics from /orgs/{org}/settings/billing/shared-storagetrue

Environment variables / args reference

VersionEnvArgDescriptionDefault
=0.1.0DISABLED_COLLECTORS--disabled-collectorsCollectors to disable""
>=0.1.0GITHUB_ORGS--github-orgsGitHub organizations to scrape metrics for""
>=0.1.0GITHUB_TOKEN--github-tokenGitHub token with billind read privileges""
>=0.1.0LISTEN_ADDRESS--web.listen-addressAddress on which to expose metrics.:9776
>=0.1.0METRICS_PATH--web.telemetry-pathPath under which to expose metrics./metrics