Sentinel - Self healing application monitor
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
COPYING
README
sentinel.rb

README

#################################################################
#
#   Sentinel - Self healing application monitor
#
#   Author:         Matthew Smith <soimafreak@gmail.com>
#   Site:           http://sentinel.soimafreak.co.uk/
#   Purpose:        Check health of a process through various means and keep said process operating correctly
#   Date:           27th March 2012
#   Explination:    Sentinel will carry out a number of checks on the health of the application / system 
#                   based on the outcome of these checks certain actions will be taken
#   Requires:       gem install -r log4r
#   Thanks:         http://angrez.blogspot.co.uk/2006/12/log4r-usage-and-examples.html
#
#   Copyright:      Copyright (C) 2012, Matthew Smith 
#   License:
#   This program is free software: you can redistribute it and/or modify
#   it under the terms of the GNU General Public License as published by
#   the Free Software Foundation, either version 3 of the License, or
#   (at your option) any later version.
#
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
#
#   You should have received a copy of the GNU General Public License
#   along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
#################################################################

#
#   ABOUT
#

Sentinel was concieved as an idea after contemplating some "quick fix" work carried out
on some production systems to ensure the application remained operational as much as possible.
The concept was orignially discussed on http://soimasysadmin.wordpress.com/2012/04/04/self-healing-systems/ 
and more information about the future of the application can be found on the site above.

#
#   Versioning
#

Major.Minor(Character increment) For example:

0.1     - Final release of 0.1
0.1(a)  - First feature release of final 0.1
0.1(aa) - Twenty seventh feature release of final 0.1

Non-character suffixed releases should be stable.

#
#   Release
#

0.1(a)      -	This is the initial comit to the GitHub with minimal functionality as described below
0.1(b)      -   Added some Application memory metrics
0.1(c)      -   Added URL Grab / search
0.1(d)      -   Added process kill for dead / zombie processes

#
#   Features
#

* Basic check of a *nix process state
** Is there a process running?
** Is it in a running or sleep state (or other healthy state)?
* Basic check of system health
** Check disk usage with DF
** If the disk usage is high, Log the offending disk info to the system log
** Check memory usage of system
* Basic Application health
** Perform basic URL grab / scrape for search string
* Basic actions
** If process Zombied / Dead, start it
** If diskspace is 100% utilised, check list of "safe" to delete files in affected file system and delete
** If application check fails X times restart application
* Run as a cron job
* Log output
* Take options from CLI where appropriate

#
#   Coding standard
#

* Whitespace - 4 spaces for indenting, for vim use the following in ~/.vimrc:
set tabstop=4
set shiftwidth=4
set expandtab
set autoindent
set smarttab

#
#   Notes
#

- In Addition to the features above It is becomming increasingly necessary to start considering some better
structures for storing the scores in.
- Also need to start splitting out the code into a bit of a structure or something... Not sure what this
will involve or best way toa chieve but something is needed...