Git Product home page Git Product logo

jenkins-monitor's Introduction

jenkins-monitor

A Jenkins monitor for the Mesosphere office. This application assumes your Jenkins server is reachable and that you are running a 32x32 display.

Inspired by sloth.

Jenkins monitor in action

Assembly

The following components are used in the monitor:

The Adafruit tutorial is comprehensive.

monitor

Setup

  1. Clone this repo:
    git clone [email protected]:ssk2/jenkins-monitor.git && cd jenkins-monitor
    
  2. Initialise the submodule:
    git submodule init
    
  3. Update the module:
    git submodule update
    
  4. Make the Adafruit shared object file:
    cd adafruit && make clean rgbmatrix.so && cd ../
    
  5. Create an __init__.py file so we can import the newly created file:
    touch adafruit/__init__.py
    
  6. Run the script:
    sudo python jenkins-monitor.py
    

Cron

You may like to set up a cron job to start this process up every day at a certain time. (It will exit itself at a specified UTC hour.)

First, open the crontab as root:

sudo crontab -e

Then add the line below to the end, changing the schedule and file path to point to where you've cloned the repo. In this configuration, the script starts at 2pm UTC (or 8am Californian time):

0 14 * * 1-5 python /home/pi/jenkins-monitor/jenkins-monitor.py 2>&1 | /usr/bin/logger -t jenkins-monitor

Configuration

Jenkins URL

Set JENKINS_URL to point to the View you want this script to monitor.

Images

The BAD_IMAGES, GOOD_IMAGES and NEUTRAL_IMAGES arrays each point to local assets that should be shown when one or more builds are failing, no builds are failing or a build is running respectively.

Font

You may need to specify a different font by setting FONT_PATH to point to a font available on your system.

Misc

Resizing Images

Images must be 32x32 in size. You can use imagemagick to resize them from the command line:

sudo apt-get install imagemagick
mogrify -resize 32x32 image.jpg

jenkins-monitor's People

Contributors

ssk2 avatar

Watchers

 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.