GitXplorerGitXplorer
c

github_releases_exporter

public
26 stars
5 forks
0 issues

Commits

List of commits on branch master.
Verified
afad9c3f5f401530b50a0a45b52035b3e8c81053

chore(deps): bump golang.org/x/oauth2 from 0.16.0 to 0.17.0 (#62)

ddependabot[bot] committed 10 months ago
Verified
fbce4b4da020f57e8fd4abb3abc2d03956f1ed0e

chore(deps): bump golang.org/x/oauth2 from 0.15.0 to 0.16.0 (#61)

ddependabot[bot] committed a year ago
Verified
7aae496a6eed26ac844a60c85eb106daab90faf8

chore(deps): bump golang.org/x/oauth2 from 0.13.0 to 0.15.0 (#60)

ddependabot[bot] committed a year ago
Verified
c620f0bc5f45f4dbcb2cd958b642edd2a4ad4dde

chore(deps): bump golang.org/x/oauth2 from 0.12.0 to 0.13.0 (#58)

ddependabot[bot] committed a year ago
Verified
2ad3fd28e538f4c5e481f9afd86c219a39dd59b1

chore(deps): bump golang.org/x/oauth2 from 0.11.0 to 0.12.0 (#57)

ddependabot[bot] committed a year ago
Verified
0a991feab64838068e0ef11c0c0a899fc31ddd1e

chore(deps): bump golang.org/x/oauth2 from 0.10.0 to 0.11.0 (#56)

ddependabot[bot] committed a year ago

README

The README file for this repository.

github_releases_exporter

Exports GitHub release metrics to the Prometheus format.

Release Software License Build Status Coverage Status Go Doc Go Report Card SayThanks.io Powered By: GoReleaser

Running

./github_releases_exporter

Or with docker:

docker run -p 127.0.0.1:9222:9222 caarlos0/github_releases_exporter

Configuration

You can set it up on docker compose like:

version: '3'
services:
  releases:
    image: caarlos0/github_releases_exporter:v1
    restart: always
    volumes:
    - /path/to/releases.yml:/etc/releases.yml:ro
    command:
    - '--config.file=/etc/releases.yml'
    ports:
    - 127.0.0.1:9222:9222
    env_file:
    - .env

The releases.yml file should look like this:

repositories:
- goreleaser/goreleaser
- caarlos0/github_releases_exporter

On the prometheus settings, add the releases job like this:

- job_name: 'releases'
  static_configs:
  - targets: ['releases:9222']

And you are done!

Configuration Reload

You can reload the configuration at any time by sending a SIGHUP to the process.

Grafana Dashboard

I have a dashvboard like this:

You can get it from the grafana website or just import the dashboard 6328.

Building locally

Install the needed tooling and libs:

make setup

Run with:

go run main.go

Run tests with:

make test