github-workflow-exporter

command module
v0.0.0-...-314c893 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 22 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Github Workflows exporter

license DockerHub Quay.io Artifact 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]
      --github.workflows.run_running.status=        workflow statuses for github_workflow_run_running metric (others will be ignored, *
                                                    allows all) (default: in_progress, queued, waiting, pending)
                                                    [$GITHUB_WORKFLOWS_RUN_RUNNING_STATUS]
      --github.workflows.latest_run.status=         workflow statuses for github_workflow_run_running metric (others will be ignored, *
                                                    allows all) (default: completed, expected, failure, startup_failure)
                                                    [$GITHUB_WORKFLOWS_LATEST_RUN_STATUS]
      --github.workflows.consecutive_failed.status= workflow statuses for github_workflow_consecutive_failed_runs metric (others will be
                                                    ignored, * allows all) (default: completed, expected, failure, startup_failure)
                                                    [$GITHUB_WORKFLOWS_CONSECUTIVE_FAILED_STATUS]
      --github.workflows.consecutive_runs.status=   workflow statuses for github_workflow_consecutive_runs metric (others will be ignored,
                                                    * allows all) (default: completed, expected, failure, startup_failure, queued, waiting,
                                                    pending) [$GITHUB_WORKFLOWS_CONSECUTIVE_RUNS_STATUS]
      --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 var Description
AUTOMEMLIMIT=off Disabling auto memlimit
GOMEMLIMIT=0.9 Limits golang memory to 90% of system/cgroup memory (keep some mem available to system; default is 0.9)

Metrics

Metric Description
github_repository_info Repository info metric
github_workflow_info Workflow info metric
github_workflow_latest_run Latest workflow run with conclusion as label
github_workflow_latest_run_timestamp_seconds Latest workflow run with timestamp as value
github_workflow_consecutive_failed_runs Count of consecutive failed runs per workflow
github_workflow_consecutive_runs Count of consecutive runs per workflow and status

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL