Code Monkey home page Code Monkey logo

os-health-check's Introduction

OS-health-check

Python lib that provides an easy way to check the health of an *nix OS

How it works?

OS-health-check has been designed to provide a quick way for monitoring the health of a set of *nix based OS.

Doesn't need any agent on each node to be monitorized, just share pubkey based credentials thorugh SSH

Takes care about:

  • CPU
  • Mem
  • Swap
  • Disks (ocupation and inodes)
  • Processes (creation)
  • Network I/O, transfer stats
  • All block dev
  • Interrupts

How to use it?

Just call it

$ os-health-check.py -h HOST -c CHECKSlist

, and reach a status line for each check

check1 status detail
check2 status detail
...
checkn status detail

, where

 -H define the hostname/IP address to check

 -C the set of checks to be performed comma (,) separated (without spaces!)
    OPTIONS: cpu mem disk net

 -m set the metrics pair warning,critical to analyze the status of the tests comma (,) separated (without spaces!)
    //-m 75,90 will set status = warning if range >75 and critial if >90
    
 -d define a delay for the execution of the checks
    //-d5 will wait 5sec and trigger al the checks

 -D define a delay for the execution of **each** check
    //-D5 will wait 5secs between the execution of each check

 -c get the results from cache (last execution results)

Examples

$ os-health-check.py -h GNUites -c cpu,disk,mem,swap -m 75,90
cpu ok "la 1,0,0"
disk ok "all devices ok"
mem warning "85% used"
swap ok ""

os-health-check's People

Contributors

xavitorello avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

os-health-check's Issues

Enhace CPU check :: take care about #procs for LA monitoring

Currently the metric is hardcoded

Will be great if the check takes care about the number of processors of the destination host to apply the metric.

A possible threshold initial definition can be:

(Avg 5', 10', 15')
Warning: 90%, 75%, 50%
Critical: 100%, 80%, 60%

each % * number of cpus

ie 2cpu:
Warning: 180%, 150%, 100%
Critical: 200%, 160%, 60%

New check - Swap

Create new check to review the swap status.

Indicator: percentage amount of swap used

100 * (swap_used / swap_total)

Standarize check phases

... to reuse code

All checks have similarities, generical check phases must be developed

(preCommad)* -> Command+ -> Parse Output -> Extract metrics -> Return result indicator

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.