Git Product home page Git Product logo

spot's Introduction

Spot - The Watchdog for your Build Agents

spot

Spot is a watchdog for build agents in Jenkins and Bamboo

Building

You need dep. The easiest way to build is to run make, which will generate linux and windows binaries in dist/.

If you don't have make, you can build manually:

# linux
dep ensure
go build -o dist/spot -v ./cmd/spot

# windows
dep ensure
go build -o dist/spot.exe -v ./cmd/spot

You can also build the docker container if you do not have go / make / dep installed:

docker build . -t spot

Usage

alerts for disconnected build agents
Usage: main.exe [--bamboo BAMBOO] [--jenkins JENKINS] [--slack SLACK] [--template TEMPLATE] [--verbosity VERBOSITY] [--period PERIOD] [--once] [--warmup] [--jenkinsclasswhitelist JENKINSCLASSWHITELIST]

Options:
  --bamboo BAMBOO, -b BAMBOO
                         Bamboo Url & credentials in the form of https://bamboo/,username,password
  --jenkins JENKINS, -j JENKINS
                         Jenkins Url & credentials in the form of https://jenkins/,username,password
  --slack SLACK, -s SLACK
                         Slack-Compatible Incoming Webhook URL
  --template TEMPLATE, -t TEMPLATE
                         Path to template for notifications
  --verbosity VERBOSITY, -v VERBOSITY
                         Verbosity [panic, fatal, error, warn, info, debug] [default: info]
  --period PERIOD, -p PERIOD
                         How long to wait between checks
  --once, -o             Run checks once and exit
  --warmup, -w           Run checks without notifications once before starting the watchdog
  --jenkinsclasswhitelist JENKINSCLASSWHITELIST, -c JENKINSCLASSWHITELIST
                         Only consider jenkins agents with the specified class(es)
  --help, -h             display this help and exit

Example

$ docker run -it --rm hcr.io/nlowe/spot:latest --jenkins "https://devops.jenkins.hylandqa.net,username,password" --jenkins "https://csp.jenkins.hylandqa.net/" --once --verbosity debug
INFO[0000] Hello, World!
DEBU[0000] Trying to parse jenkins instance              jenkins="https://devops.jenkins.hylandqa.net,username,password"
DEBU[0000] Trying to parse jenkins instance              jenkins="https://csp.jenkins.hylandqa.net/"
INFO[0000] Running Watchdog Task
DEBU[0000] Checking for offline agents                   detector="[jenkins] https://devops.jenkins.hylandqa.net"
DEBU[0001] Node is online                                agent=master detector="[jenkins] https://devops.jenkins.hylandqa.net"
DEBU[0001] Node is online                                agent=RDV-003960.hylandqa.net detector="[jenkins] https://devops.jenkins.hylandqa.net"
DEBU[0001] Node is online                                agent=RDV-004063.hylandqa.net detector="[jenkins] https://devops.jenkins.hylandqa.net"
DEBU[0001] Check Complete                                detector="[jenkins] https://devops.jenkins.hylandqa.net"
DEBU[0001] Checking for offline agents                   detector="[jenkins] https://csp.jenkins.hylandqa.net"
DEBU[0001] Node is online                                agent=master detector="[jenkins] https://csp.jenkins.hylandqa.net"
DEBU[0001] Node is online                                agent="RDV-004097.hylandqa.net (QAV Performance)" detector="[jenkins] https://csp.jenkins.hylandqa.net"
DEBU[0001] Node is online                                agent="Ubuntu-Docker (10.40.0.120)" detector="[jenkins] https://csp.jenkins.hylandqa.net"
DEBU[0001] Node is online                                agent=Windows-Server-1709-Docker-0 detector="[jenkins] https://csp.jenkins.hylandqa.net"
DEBU[0001] Node is online                                agent=Windows-Server-1709-Docker-1 detector="[jenkins] https://csp.jenkins.hylandqa.net"
DEBU[0001] Node is online                                agent=Windows-Server-1709-Docker-2 detector="[jenkins] https://csp.jenkins.hylandqa.net"
DEBU[0001] Node is online                                agent=Windows-Server-1709-Docker-3 detector="[jenkins] https://csp.jenkins.hylandqa.net"
DEBU[0001] Node is online                                agent=Windows-Server-1709-Docker-4 detector="[jenkins] https://csp.jenkins.hylandqa.net"
DEBU[0001] Check Complete                                detector="[jenkins] https://csp.jenkins.hylandqa.net"
INFO[0001] Goodbye

License

Spot is licensed under the MIT License. See LICENSE for details.

Spot makes use of dep for package management. Packages restored by dep have their own license which may differ from the terms of the MIT license that we use.

Dog logo by Buena Buena from the Noun Project, licensed under the Creative Commons CC BY License.

spot's People

Contributors

nlowe avatar rbutcher avatar

Watchers

 avatar James Cloos 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.