inari

inari is a simple network monitoring tool, intended for use with web services. It uses a user-friendly configuration file in a similar manner to Rake and Capistrano.

inari is written in Ruby, can be extended through Ruby modules, and currently requires little external dependencies.

Usage

inari can be Run with:

inari.rb start/stop configuration_file

The configuration file is optional. If it isn’t supplied, $prefix/etc/inari.conf is assumed (this is likely to be /usr/local).

Configuration

inari‘s configuration files are created using a simple domain-specific language, allowing you to clearly express how you want your services monitored.

Server definition

A set of servers must be defined. Each server can have several hosts. This is intended to make monitoring a web server cluster or set of similar services simple.

Servers can be defined as follows:

server :local, ‘localhost’ server :blogs, ‘blog.helicoid.net’, ‘mmm.helicoid.net’

Task definitions

inari currently runs tasks as threaded processes, allowing them to run independently regardless of issues such as timeouts and software errors.

Tasks are a set of commands that allow you to define:

  • What you want monitored

  • How you want it monitored

  • What you want to happen on an event

You can also supply a description of the task to explain it more clearly.

For example, this task fetches a web page every 60 seconds and sends an email whenever the page is unreachable:

desc “Defaults example: email” task :example, :servers => [:local] do

get_web_page '/'
frequency '60 seconds'
email_on_events

end

The required servers have been specified using the task header definition:

task :example, :servers => [:local] do

Then a set of commands have been provided. get_web_page will fetch the required page. email_on_events is a standard command built into inari that will send an email whenever the state of the service changes.

Additional events

If you don’t want your inbox filling up with emails, you can use log_on_events. This writes event notifications to a log file, which you can monitor with tail -f in the command line.

Configuration settings

To configure where you want the emails to be sent, add this line to the top of the file:

config :email_to, ‘[email protected]