Home > lemon

lemon

Lemon is a project mainly written in Ruby, based on the GPL-2.0 license.

Network monitor in Ruby

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 --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.

Previous:context-menu