Prometheus Exporter for Github Issues
Copy .envrc.sample and load it.
$ cp .envrc.sample .envrc
$ # edit .envrc
$ # source .envrc
The target repositories are specified by GITHUB_REPOSITORIES environment varibales, that should be written in org/reponame, separated by commas.
export GITHUB_REPOSITORIES="chaspy/github-issue-prometheus-exporter,chaspy/favsearch"
Specify GITHUB_LABEL
to get issues.
export GITHUB_LABEL="SRE"
$ go run main.go
Get the binary file from Releases and run it.
$ docker run -e GITHUB_TOKEN="${GITHUB_TOKEN}" -e GITHUB_REPOSITORIES="${GITHUB_REPOSITORIES}" chaspy/github-issue-prometheus-exporter:v0.1.0
$ curl -s localhost:8080/metrics | grep github_issue_prometheus_exporter_issue_count
# HELP github_issue_prometheus_exporter_issue_count Number of issues
# TYPE github_issue_prometheus_exporter_issue_count gauge
github_issue_prometheus_exporter_issue_count{author="chaspy",label="SRE",number="27193",repo="quipper/quipper"} 1
If you use Datadog, you can use Kubernetes Integration Autodiscovery feature.