Giter Club home page Giter Club logo

build_executor_exporter's Introduction

build_executor_exporter

Prometheus exporter for Jenkins Build executors metrics. Use this with AlertManager to build alerting for your remote executors/agents/slaves.

  • online_status

Whether a node has become disconnected

  • temporarily_offline_status

Whether a node is deliberately marked as offline for maintenance

Options for running:

The default port for the exporter is TCP/9001 and the metrics endpoint is /metrics.

  • As a long running daemon inside a Docker container
docker run -p 9001:9001 -d alexellis2/build_executor_exporter:0.2-faas ./build_executor_exporter -urls http://site1,http://site2
  • As a native Golang binary

Run go install and use with -urls http://site1,http://site2

  • As a serverless / one-shot Docker image:

This wil run once and then output to stdout and can be used with FaaS as a serverless function.

docker run -ti alexellis2/build_executor_exporter:0.2-faas ./build_executor_exporter -urls http://site1,http://site2

Sample alert.rules

This is an example of alerting rules which can be configured with AlertManager:

ALERT AgentOffline 
  IF online_status == 0 
  FOR 60s
  LABELS {
    service = "build_executor_exporter",
    severity = "major",
    value = "{{$value}}"
  }
  ANNOTATIONS {
    summary = "Agent down on {{ $labels.instance }}",
    description =  "High invocation total on {{ $labels.instance }} {{ $value }}"
  } 

You may want to combine this with the temporarily_offline_status flag if you have build agents which are kept offline for long periods of maintenance.

Todo:

[-] Configure basic auth through CLI arguments

License

MIT

build_executor_exporter's People

Contributors

alexellis avatar

Stargazers

peace_data avatar 阳光下的草 avatar Robert Ștefan Stănescu avatar  avatar Bret Fisher avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

ad22 peacedata0

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.