github_releases_exporter

command module
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2021 License: MIT Imports: 11 Imported by: 0

README

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

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

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