Skip to content

Repository files navigation

Github Workflows exporter

licenseDockerHubQuay.ioArtifact Hub

Prometheus exporter for GitHub workflow runs

Usage

Usage:
github-workflow-exporter [OPTIONS]
Application Options:
--log.level=[trace|debug|info|warning|error] Log level (default: info) [$LOG_LEVEL]
--log.format=[logfmt|json] Log format (default: logfmt) [$LOG_FORMAT]
--log.source=[|short|file|full] Show source for every log message (useful for debugging and bug reports) [$LOG_SOURCE]
--log.color=[|auto|yes|no] Enable color for logs [$LOG_COLOR]
--log.time Show log time [$LOG_TIME]
--github.enterprise.url= GitHub enterprise url (self hosted) [$GITHUB_ENTERPRISE_URL]
--github.organization= GitHub organization name [$GITHUB_ORGANIZATION]
--github.token= GitHub token auth: PAT [$GITHUB_TOKEN]
--github.app.id= GitHub app auth: App ID [$GITHUB_APP_ID]
--github.app.installationid= GitHub app auth: App installation ID [$GITHUB_APP_INSTALLATION_ID]
--github.app.keyfile= GitHub app auth: Private key (path to file) [$GITHUB_APP_PRIVATE_KEY]
--github.repository.customprops= GitHub repository custom properties as labels for repos and workflows (space delimiter) [$GITHUB_REPOSITORY_CUSTOMPROPS]
--github.workflows.timeframe= GitHub workflow timeframe for fetching (default: 168h) [$GITHUB_WORKFLOWS_TIMEFRAME]
--scrape.time= Scrape time (default: 30m) [$SCRAPE_TIME]
--cache.path= Cache path (to folder, file://path... or azblob://storageaccount.blob.core.windows.net/containername or k8scm://{namespace}/{configmap}}) [$CACHE_PATH]
--server.bind= Server address (default: :8080) [$SERVER_BIND]
--server.timeout.read= Server read timeout (default: 5s) [$SERVER_TIMEOUT_READ]
--server.timeout.write= Server write timeout (default: 10s) [$SERVER_TIMEOUT_WRITE]
Help Options:
-h, --help Show this help message

Authentication

Supports either PAT token auth via env var GITHUB_TOKEN or GitHub App auth with env vars GITHUB_APP_ID (id), GITHUB_APP_INSTALLATION_ID (id) and GITHUB_APP_PRIVATE_KEY (file path).

GOMEMLIMIT

automemlimit is used for automatically detecting GOMEMLIMIT inside containers.

Env varDescription
AUTOMEMLIMIT=offDisabling auto memlimit
GOMEMLIMIT=0.9Limits golang memory to 90% of system/cgroup memory (keep some mem available to system; default is 0.9)

Metrics

MetricDescription
github_repository_infoRepository info metric
github_workflow_infoWorkflow info metric
github_workflow_latest_runLatest workflow run with conclusion as label
github_workflow_latest_run_timestamp_secondsLatest workflow run with timestamp as value
github_workflow_consecutive_failed_runsCount of consecutive failed runs per workflow

About

Prometheus exporter for GitHub workflow stats

Resources

Stars

1 star

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages