What's new? | Help | Directory | Sign in
Google
                
Search
for
Updated Jul 22, 2008 by bernie.skipole
Labels: Phase-Deploy, Featured
AboutSkipoleMonitor  
Pings hosts and displays their status by inbuilt web server.

Version : 0.80 Date : 20080722

Introduction

This program is a network monitor

Via a gui, it allows the user to input host IP addresses, it then pings these hosts at user defined intervals and displays their status on a built-in web server.

Optionally alert emails and syslog messages can be sent as hosts (or groups of hosts) change status.

As default the web server listens on port 8000 - this can be changed if required.

So calling http://your_pc_address:8000 will display pages showing green, yellow or red host or group symbols.

Each host is pinged four times every interval, and symbols are displayed as:

green : if three or four pings are successful

yellow : if only one or two are successful

red : if all four fail

As well as hosts, group symbols are displayed, and can be opened to show hosts, or sub-groups nested within. The operator can create groups, and sub-groups via the gui.

Further information, including screen views can be found at: http://www.skipole.net

INSTALLATION

It has been tested on Windows XP and Linux platforms.

Windows users - download the windows installation file, run it, and a windows installer will open, and install the program for you. An icon will appear in your All Programs list, and one can optionally be placed on your desktop. Choose the icon to run the program.

Installing on Linux: pull down and untar the file in a directory of your choice, you will also need WxPython and the Python Imaging Library (PIL) installed on your system. Make sure monitor.pyw is executable and run it.

As a Linux user, you will almost certainly already have Python installed, but it is likely you will need to install wxPython and PIL which should be available via your distribution.

With Debian/Ubuntu these are packages:

python-wxtools

python-imaging

Simply use the synaptic package manager to install them, and any dependencies, and their functions will be available for Skipole Monitor to use.

See LinuxUsers for further details.

The aim of this application is to provide a simple network monitor, trivial to install and set-up, which can then be viewed via a browser from anywhere. As the program is free, any number of installations can be made throughout a network.

There are no passwords or user authentication - anyone can view the web display, but as the hosts are input and edited via a gui, only those with access to the PC running the program can set up the network.

USAGE

On running the program, the web server and the polling will start (if a network of hosts has previously been defined) and a gui interface will be displayed.

Initially, the web server will show the hosts as white symbols (meaning unknown status) until the first poll is completed.

The gui displays a window with a row of tab buttons.

To input hosts and groups, choose the "Hosts and Groups" tab button.

This opens a further editing window, on the left is a tree display of groups and hosts. If no groups or hosts have been added, then only the default 'top' group will be shown.

Select any group on the tree, and you will be able to add hosts or sub-groups, and also set their descriptions.

Selecting a host on the tree will allow you to set its IP address.

The "Hosts and Groups" page also has buttons to save or load the network to an external file - this is useful if you wish to set up several monitors on different PC's, you can create the network on one, save it, and then load it on the other PC's.

Any changes input will appear on the web site at the next poll.

The "Email setup" tab, allows you to enable email alert messages, and to input email parameters, such as destination email address and SMTP relay server. Email alerts can then be sent as hosts change status.

Similarly the "Syslog Setup" tab allows you to enable syslog messaging, and to specify the syslog server.

The 'Options' tab allows you to set the ping frequency, enable or disable the built-in web server, and set the web server port.

ADVANCED

On first being run, the program creates a config file 'monitor.cfg' within the application folder, this stores parameters such as the http root folder where web pages are placed, and email and syslog parameters. These could be hand edited, but are normally set by options from within the gui.

If monitor.cfg is deleted, the program will create a new one, with original defaults again, when it is re-started.

monitor.cfg also specifies the folder holding images to be used for the web pages. As default this is 'images1' under the same folder as the application.

You could change this to point to a folder of your choice, if you wish to use your own symbols on the web pages. Create png images with the same size (40 x 40) and names, and they will be happily displayed.

Folders called images2 and images3 are provided as examples.

A file called style.css is held within the application folder and is used as the style sheet for all web pages, feel free to edit it if you are adventurous!

As group and host data is input via the gui, it is held in the file 'path-to-application-folder/data/network.dat'.

The gui allows you to save this file elsewhere, and load it into other computers if required. You should save it somewhere safe if you have created a large list of hosts to be pinged - simply as a backup precaution.

IMPORT CSV FILE (new from version 0.7)

If you have a list of hosts you wish to import, and you can put them into a csv file, the 'Import' button allows you to add them to the current network.

The csv file should have the following format - one line for each host, each line consisting of the comma separated fields:

1st field: The short name of the group this host will be added to.

2nd field: The IP address of the host.

3rd field: The short name of the host, 12 characters maximum.

4th field: The host description, 80 characters maximum.

The short name and description should not contain commas. If the group does not exist, a new group with that short name will be created. (12 characters maximum)

Example of a CSV file:

Top,192.168.1.1,First host,This host is in the top group
Top,192.168.1.8,Second host,This host is also in the top group
Subgroup,192.168.1.9,Third host,This host is in this subgroup
Subgroup,192.168.1.10,Fourth host,Another host in the subgroup
Top,192.168.1.11,Fifth host,This host is in the top group

PING LANGUAGE (new from version 0.42)

The following applies to windows users only, not Linux users.

Skipole monitor uses the Operating System's ping command, and parses the result. Under windows, in some countries the output of the ping command may not be in English, therefore the file language.csv contains a line for each language to help Skipole Monitor. Feel free to add your own language, and if successfull, let me have a copy so I can extend the language.csv.

As an example, the line for english is:

"en",": bytes=32 time","Received = "," Average = "

This is used to parse the output of a ping command, such as:

Pinging 192.168.2.1 with 32 bytes of data:

Reply from 192.168.2.1: bytes=32 time=2ms TTL=128
Reply from 192.168.2.1: bytes=32 time=2ms TTL=128
Reply from 192.168.2.1: bytes=32 time=2ms TTL=128
Reply from 192.168.2.1: bytes=32 time=2ms TTL=128

Ping statistics for 192.168.2.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 2ms, Maximum = 2ms, Average = 2ms

The first element "en" is a label for the language. It does'nt particularly matter what this is, as long as every language in the file has a unique label here.

The second element ": bytes=32 time" is searched for in the ping output, and if found, identifies that a successful ping has been made, and also identifies the language, you should use the equivalent text from the ping command in your own language.

The third element "Received = " is searched for, and indicates that the number of received packets follows.

The fourth element " Average = " is searched for, and indicates that the average round trip time follows.

So inspect the output of the ping command on your own computer and add an equivalent new line to the language.csv file, and hopefully it should work.

WINDOWS AND SOURCE PYTHON FILES

If you are a Windows user familiar with Python, and you have Python already installed, you may wish to just use the Python source files, rather than download the executable with built-in interpreter.

This is possible; download the tar file, and unpack to a folder of your choice. Like the Linux users, you will also need to install WxPython and the Python Imaging libraries - see the web sites given in the acknowledgements section below.

You will need to associate the .pyw extension with python, and then clicking on the monitor.pyw file should run Skipole Monitor.

BUGS

Please send any bug reports, or comments (as I would like to know if it is being successfully used) to bernie@skipole.co.uk

ACKNOWLEDGEMENTS

Python : www.python.org

wxPython : www.wxpython.org

rrdpython : oss.oetiker.ch/rrdtool

py2exe : www.py2exe.org

Inkscape : www.inkscape.org

IcoFX : icofx.xhost.ro

Inno Setup : www.jrsoftware.org/isinfo.php

PIL : www.pythonware.com/products/pil

UPDATES

Version 0.80

Bug fixed in the language parsing routine - affects Windows users only. Now parses ok and Italian has been added to language.csv

Version 0.70

The Export and Import buttons have been re-labelled as Save and Load, with a further 'Import' button added. This gives the option of importing a CSV file.

The python file creating the gui was over large, so it is now split into multiple files containing classes all held in a package structure under folder sm_gui

Graph scaling bug fix.

Version 0.60

From the gui the user can now set ping frequency, and enable or disable the web server, and set the web server root folder to which html files are saved.

rrdtool.exe is no longer required, the graphs are now produced by the Python Image library.

Version 0.50

Some code re-working. The alert email subject field can now be set in the gui, which may be useful with some mail to SMS services.

12 hour history graphs for each host now appears in the gui.

Version 0.45

Program adapted to work with Windows - by including the windows rrdtool.exe binary in the Skipole Monitor directory. 24 hour history graphs are now available in both Windows and Linux.

Several bugfixes, improving behaviour when hosts are added or deleted.

Version 0.44

Linux only - Host pages now show 24 hour history graphs, created with rrdtool, this requires the rrdpython bindings to be installed.

Version 0.43

Improvement in the language checking routine.

Version 0.42

When parsing the Windows ping output, non-english ping commands could not be parsed; added a 'language.csv' file that can have lines added to aid parsing other languages.

Changed the file monitor.py to monitor.pyw - so it is the same under both linux and windows.

Bugfixes: If the python source files were installed in Windows, as opposed to the bundled executable, an image error would appear - this is now fixed.

Under Linux, some of the GUI input fields were too short, in particular the host IP address field, these have been cleaned up.

Under Linux, on importing a network, or choosing New, the top level group menu did not appear - now fixed.

Version 0.41

Bugfix, affects Linux installations only, and does not add further functionality.

The monitor.png image file which appears in the top corner of the window was accessed by a relative address, and if the program was run from a launcher which did not change working directory, the image could not be accessed. This is now fixed.

Version 0.4

Syslog reporting added, with other improvements

Pre - 0.4

Development versions

LICENSE

Author : Bernard Czenkusz

Email : bernie@skipole.co.uk

Skipole Monitor - A simple network monitor

Copyright (c) 2007 Bernard Czenkusz

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 2 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, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA


Sign in to add a comment