tobijk / lemon

Network monitor in Ruby

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

INTRODUCTION

This is the first prototype of the Lemon Network Monitor.


INSTALLATION

You need a working Ruby installation (1.8.7 or 1.9). Unpack the tarball. Lemon
is relocatable, so you can start it right there from the source folder.


CONFIGURATION

The configuration is stored in INSTALL_DIR/etc/lemon.xml.


USING THE COMMAND LINE INTERFACE

You can use the command line interface to execute individual checks manually for
debugging purposes. Type

  #> bin/lemon

without any arguments to see a list of available commands. Currently only an
http check is included.

To see what options you can pass to a check type

  #> bin/lemon <command> --help

In order to check if Google is up and that it's displaying the search page, say

  #> bin/lemon http --content-check 'haku' http://www.google.fi

You should get a response like

  "Established connection in 192ms and completed HTTP request in 270ms"


RUNNING THE DAEMON

To start the daemon, say

  #> bin/lemond --daemonize

It will write it's PID to run/lemond.pid and logs to log/lemond.log

To stop the daemon in a controlled way, send a SIGTERM or SIGINT (Ctrl+C).

In order to run lemond in the foreground and make it log to stderr, say

  #> bin/lemond --log-file='-'


BUGS

The scheduler is very basic. It doesn't do any rate limiting and does sleep/poll
instead of using select to wait for events on the local pipe ends of the tasks.

The http check doesn't care about document encoding. So content checks on exotic
UTF-8 incompatible encodings may not do what the user expected.

No validation or consistency check is performed while loading the configuration.

The source code is mostly undocumented.

There are no tests.

About

Network monitor in Ruby

License:GNU General Public License v2.0


Languages

Language:Ruby 100.0%