Registered by Neil Coetzer

Script developed in bash for providing visual console output on Ubuntu Server after boot, regarding general server health. The script also keeps track of critical processes, hard drive usage, firewall and more, as well as automatically managing redundant links and traffic splitting by dynamically adding routes. In addition to automating certain processes, the Health Monitor also provides e-mail alerts to potential problems.

The main target area of this project was small to medium sized networks, where the functions of mail, proxy, routing, firewall, DHCP, DNS, etc. can all be combined on one single server. Since many such networks belong to small businesses and organisations with no in-house IT staff, the Health Monitor was developed to provide an on-screen display of the server's status and general health. Particularly since this was developed for the Zimbabwean market, where Internet connections are unreliable and prone to down-time, monitoring Internet connectivity and providing a simple means to handle redundant link switching, was also important.

Long-term goals will possibly include a complete re-write in a language that might be more efficient (and use less system resources) as well as tidying up code that is also inefficient and could be better written. The script was originally written in bash as a "quick solution" as well as being part of a bash learning exercise, but rapidly grew as more functionality was needed in different environments. However, even with its weaknesses, the script has proved invaluable in providing an early warning for problems on the servers already running it.

Historically, the script has been placed in /usr/sbin/ (which may not be the correct location) and has been called from rc.local, but it should be able to run from any location. It has been designed to be fairly plug-n-play, and will build its own configuration file if one does not exist. There are many additional features and options that could be added to the configuration file in future, to make it suited to almost any environment. The script obviously does not need to be called from rc.local in order to run, and can be executed manually once logged in, although it does require to be run by a user with root privileges. If not run by root, it will need to be run with sudo.

The script works by taking snapshots of certain values and file contents periodically (every 10 seconds by default). On most fairly up-to-date systems, the scripts runs through its periodic checks in about 1 second and then sleeps until the next run is due, or until a key is pressed. Limited interaction is allowed, using the keys shown on the help screen. These keys allow for mode changes (to display different output) and by default also allow for the system to be shut down or rebooted without logging in. This was done once again, because the main users to date have been organisations with no in-house IT staff and with unstable power, so it was necessary to simplify shut down and reboot for the end users. For less secure physical locations, this can be disabled from the configuration file.

There is also a lot more that is done by the script, but another of the goals is to provide detailed documentation that will cover all of this.

Configuration file is created at /etc/kmon-health.conf

Project information

Licence:
GNU GPL v3

RDF metadata

View full history Series and milestones

trunk series is the current focus of development.

All code Code

Version control system:
Bazaar
Programming languages:
bash

All blueprints Latest blueprints

Downloads

kmon-health does not have any download files registered with Launchpad.