Giter Club home page Giter Club logo

bk-webhook-exporter's Introduction

Build Status codecov

Buildkite-webhook-exporter

A project that generates prometheus metrics from webhooks received from buildkite.

Requirements

Docker and docker-compose installed and working.

How To Run

After cloning the project, create a .env file in the project root with the value from the buildkite token, in the format TOKEN=YOURTOKENHERE.

The file will be read automatically by docker-compose during the docker-compose up -d command and will start the application.

You can view the metrics page by acessing the localhost:500/metrics page.

The project is configured to listen on port 5000 by default and the endpoint that will receive the buildkite webhooks is /webhook-receiver.

Warning: The configuration defined in the default docker-compose.yml file is suited to developmented only. If you plan to use the project in production deactivate the DEBUG env var by setting it to 0 in the environment section.

Configuring Buildkite to send Notifications Through Webhooks

You going to need a server that is acessible trough the internet and to deploy the application on it.

Go to https://buildkite.com/organizations/<YOUR COMPANY>/services/webhook/new site and create a new webhook pointing to one of your public servers running the project, using the value:

    http://<YOUR_SERVER_ADDR>:5000//webhook-receiver

In the example above, is assumed that you are using the docker-compose or at least the port 5000 redirect to provide the endpoint.

After that, retry some builds and check the /metrics page. If you want to protect the metrics endpoint, I recommend the use of a NGINX in front of the app (More info at the #Production Mode Topic Bellow).

Production Mode

It is recommended to use a NGINX with a WSGI Container to make the project available to the world but the scenario with gunicorn+nginx configured in the docker-compose is on the roadmap.

RoadMap

Some good stuff that I thought for now:

  • Add support for nginx+gunicorn on docker-compose.yml example;
  • Add Metrics per job name.

Something else that be in the issues tab.

Author

Author: Gabriel Abdalla Cavalcante Silva ([email protected])

bk-webhook-exporter's People

Contributors

gcavalcante8808 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.