Code Monkey home page Code Monkey logo

moreon's Introduction

MoreOn

travis ci Codacy Badge Code Climate bitHound Score Join the chat at https://gitter.im/deltreey/moreon

  • MoreOn your data
  • MoreOn your server load
  • MoreOn your disk space
  • MoreOn your RAM
  • MoreOn your CPU Usage
  • MoreOn your Bandwidth

Just do it MoreOn!

With this tool you can easily add monitoring to any server in your network with SSH enabled. You can run it locally, or host it on a server and gather historical data over time.

It uses node.js, so it's extremely light weight, storing it's data in MongoDB. It runs remote bash script commands via simple-ssh to execute it's actions, offering the option to store your own custom scripts and run them at a configurable cadence.

The default scripts are:

  • Disk usage is found via df -lh | awk 'FNR == 2 {print substr($5, 1, length($5)-1)}'
  • RAM usage is found via free | grep Mem | awk '{print ($3 / ($3 + $4)) * 100}'
  • CPU usage is found via ps aux | awk {'sum+=$3;print sum'} | tail -n 1

The commands used and duration between checks are completely configurable to further allow you to tweak that delicate balance between the information you want and the server resources you need. You can even add your own scripts to run regularly and see further information about your data.

Display your MoreOn proudly!

The data is displayed in chats using the angular directive for google-charts. You can display any data from scripts in graph form, as long as it returns a number. For this reason, you may want to do a bit of parsing with grep or awk or the like. If you keep the system running, then the historical data will create beautiful line graphs.

This is not only a great tool for monitoring, but also for running regular jobs. For example: you could run daily builds and return the percentage of code coverage.

If you are coding locally and want to deploy it, try grunt build and just copy the contents of the dist/ directory to where you want to deploy. To run the server with a minimal install on localhost:8080

export SSH_KEY="$(cat ~/.ssh/id_rsa)"
npm install --production
npm start --production

There are already lots of MoreOns

Yes, there are other tools for monitoring, but I wanted something that

  • I didn't have to install on every server, taking up resources
  • Was super lightweight, using almost no resources itself
  • Could run on a Raspberry Pi

MoreOn does all of that and more, so I just had to share it with the world. I have it running internally on a Raspberry Pi monitoring servers on my network, so I know it works. Let's see how you use it!

So what does a MoreOn look like?

On a normal screen, it spreads out to display lots of data at once.

moreon on wide screen

But thanks to bootstrap, it scales well and looks good on lots of screen sizes.

moreon on medium screen

moreon on small screen

moreon on tiny screen

Want to contribute and help this MoreOn?

This tool is generated using yeoman with the generator-angular-fullstack. That means that building and testing is easy. Make sure you have MongoDB running and nodejs installed, and then:

git clone https://github.com/deltreey/moreon.git
npm install
# npm install -g bower # if you don't have it
bower install # only needed when pulling
# npm install -g grunt-cli # if you don't have it
grunt serve

Then just let the server sit there while you change files, updating automatically. Please make sure jshint and the tests pass before you put in a pull request.

moreon's People

Contributors

gitter-badger avatar

Stargazers

 avatar Trevor Brindle avatar

Watchers

Ted Coderman avatar James Cloos avatar

Forkers

gitter-badger

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.