CoffeeSaint

CoffeeSaint is a fully customizable Nagios status viewer. It grabs the status from a Nagios server and displays it in a fullscreen GUI.
It is written in Java so it should run on all platforms (tested on Linux, AIX 6.1 and windows xp) capable of running Java 5. Also works with OpenJDK. Please note that GCJ (that includes the java-gcj-compat packages found in some Linux distributions) is NOT Java-compatible enough (tested with GCJ v1.0.80) to run CoffeeSaint.
CoffeeSaint is compatible with Nagios version 1, 2, 3 and xi. It also works fine with Groundwork.

Main features

  • Can display an image on the background (this can be an URL so you can display webcam images as well)
  • Remotely configurable via built-in webserver
  • Handles all Nagios versions
  • Can retrieve remotely Nagios statuses (several methods)
  • Can play a sound if the status goes to error
  • Written in Java so should run on all systems (linux, microsoft windows, apple mac)
  • Font/font size/background color/number of rows displayed are configurable
  • Uses "least squares estimate" to predict error count
  • Can show the status of multiple Nagios servers in one screen
  • Sort-order fully configurable
  • Can run in fullscreen mode - can also span multiple screens
  • Can prioritize configurable hosts/services (using regular expression patterns)
  • Can filter hosts/services
  • Sparklines with performance data (plugin data as gathered by Nagios) and latency data
  • Can run standalone as well as a webbrowser applet
CoffeeSaint has been tested with a setup of 800 hosts and 5600 services.



Download

CoffeeSaint-4.0.jar - outbound proxy support, seperate colors for soft warnings/criticals, can show icon indicating if a problem-state is flapping
CoffeeSaint-3.9.jar - bugfixes for header/footer escape-strings, problems are now clickable and give a popup with details of that problem, improved webbased output
CoffeeSaint-3.8.jar - added LiveStatus support
CoffeeSaint-3.7.jar - can now read MJPEG (webcam) streams, can now run as a webbrowser applet
CoffeeSaint-3.6.jar - fixed 'EXEC', added Nagios-alive-check ('--max-check-age')
...
CoffeeSaint-0.1.jar - first version

Sourcecode available at request.

Example configuration file: bruin.conf. Use with: java -jar CoffeeSaint.jar --config bruin.conf
You need to add your own Nagios server either via the web-interface, via the commandline or by editting this file.

License

In short: it is released under GPLv2.
CoffeeSaint 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, version 2.

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.

Screenshots

Click on a picture to enlarge it
This picture shows CoffeeSaint displaying a couple of problems with a webcam behind them.

The following picture is CoffeeSaint displaying 9 webcams in one view.

As you may have noticed in the two images above: the header-line (with the counter, the time, the totals) looks different on these two screendumps. That is to show that this line is fully configurable to your needs.
The following image shows a regular error view with the duration added to each problem.

With lines between each row and multiple columns (for really large screens: version 1.9).

With transparency (version 2.1 and later). Of course, the amount of transparency (if you want it at all) is configurable.

With sparklines (version 2.3 and later) - sparklines are small inline graphs. In the case of CoffeeSaint they display the performance data collected by Nagios.

With fixed width host-field.

With a (user selectable) logo in the upper-right corner and a backgroundcolor fade-effect.

This screenshot has on the bottom the output of an external script (using a temperature-sensor made by Cleware) which determines the temperature (using the --footer switch / footer configurationfile parameter.

Screenshot showing the remote-configuration-web-interface with Nagios performancedata with sparklines.

Screenshot showing the configuration-menu of the web-interface.


Webbrowser applet demo

This is a demo of running CoffeeSaint in your webbrowser. Tested with chrome/firefox/internet explorer/safari/opera on linux/windows/macos.
click here

Webserver demo

This is a demo of the configuration-webserver.
click here



How to use it

Best to run it in full-screen mode ('--fullscreen undecorated').

The easy way!

Run it with the internal webserver enabled and configure it from there:
java -jar CoffeeSaint.jar --listen-port 12340
Now connect with your browser to the system on which CoffeeSaint is running.
For example on your local system connect to http://localhost:12340/
From there you can do all configuration. Do not forget to write the configuration to disk! (choose 'Select configuration file' and then 'Write config to...')

PLEASE NOTE: don't forget to configure your Nagios server to work with CoffeeSaint or else nothing will show up!

Tips

  • when invoking CoffeeSaint from a startup-folder on windows with multiple screens attached, you might need to add a sleep statement before CoffeeSaint as in some cases windows starts the program before the second screen is fully initialized; this causes the screen to be blank

Running CoffeeSaint as a webbrowser applet

How to do that is described here.

Invoking with commandline parameters

Please invoke it once every new version with command-line parameter --help to see a list of configurable items and features.

Status from a file

This way is used if you can reach the nagios status-file via either NFS or the local filesystem.
You might need to replace '/var/cache/nagios3/status.dat': see the file configured in nagios.cfg with the status_file-statement.
java -jar CoffeeSaint.jar --source file 3 /var/cache/nagios3/status.dat \
     --interval 30 --image http://198.92.142.133/jpg/image.jpg \
     --version 3 --nrows 10

Status via an URL

For this you need to make the Nagios status-file available via a webserver. E.g. ln -s /var/cache/nagios3/status.dat /var/www/htdocs.
java -jar CoffeeSaint.jar --source http 3 http://keetweej.vanheusden.com/status.dat \
     --interval 30 --image http://www.xs4all.nl/~gemgouda/stadhuis.jpg \
     --nrows 12
If you're retrieving the status data from a remote location with limited bandwidth, you can add "application/x-ns-proxy-autoconfig" to the following section in the apache configuration:
<IfModule mod_deflate.c>
          AddOutputFilterByType DEFLATE text/html text/plain ... application/x-ns-proxy-autoconfig
</IfModule>
This will speed up the transmission by first compressing the status data.
On Debian systems this section can be found at /etc/apache2/mods-enabled/deflate.conf.

Status via a network connection

java -jar CoffeeSaint.jar --source tcp 3 keetweej.vanheusden.com 33333 \
     --interval 30 --image http://pwa.sonologic.nl/cam/dvcam.jpg?ts=224937 \
     --nrows 12
Replace 'keetweej.vanheusden.com' with the host-address of your Nagios server, same thing for '33333'. Interval is in seconds. '--image' selects one or more webcams to view in the background (can be omitted to get a green/gray (depends on state) background). '--version' selects the Nagios version; this can be either 1, 2 or 3. '--nrows 10' will make the program show at must 9 statusses.

Configuring your Nagios server (for status via a network connection)

inetd

Add the following line to /etc/inetd.conf:
33333 stream tcp nowait root /usr/sbin/tcpd /bin/cat /var/cache/nagios3/status.dat
You might need to replace '/var/cache/nagios3/status.dat': see the file configured in nagios.cfg with the status_file-statement.
Then, restart inetd (on Debian that can be accomplished with: /etc/init.d/openbsd-inetd restart).
This configures inetd to serve the Nagios status on port 33333.
If you have a slow network-link between your Nagios server and CoffeeSaint you can use the following line in /etc/inetd.conf instead:
33336 stream tcp nowait root /usr/sbin/tcpd /bin/gzip -c9 /var/cache/nagios3/status.dat
You then need to set the source-type to 'ztcp' (instead of tcp). E.g.:
java -jar CoffeeSaint.jar --source ztcp 3 keetweej.vanheusden.com 33336

xinetd

Create the file /etc/xinetd.d/nagios with the following contents:
service nagios
{
	disable     = no
	socket_type = stream
	protocol    = tcp
	wait        = no
	user        = nagios
	server      = /bin/cat
	server_args = /var/cache/nagios3/status.dat
}
Add the following line to /etc/services:
nagios             33333/tcp
Then, restart xinetd (e.g. /etc/init.d/xinetd restart).

Status via Livestatus

Configure LiveStatus.
Please note that you need to know where the UNIX domain socket is located. E.g. in this example (from nagios.cfg) it is at /var/lib/nagios3/rw/live:
broker_module=/usr/local/mk-livestatus/lib/mk-livestatus/livestatus.o /var/lib/nagios3/rw/live event_broker_options=-1
Now add the following to /etc/inetd.conf and run killall -HUP inetd:
6557  stream tcp nowait root /usr/sbin/tcpd /usr/local/mk-livestatus/bin/unixcat /var/lib/nagios3/rw/live
Please note that you probably need to change the paths for 'unixcat' as well as the socket ('/var/lib/nagios3/rw/live').
You can now invoke CoffeeSaint with for example the following commandline-parameter:
--source ls 3 mynagioshost.myintranet.company.com 6557

Locating the Nagios status-file

Look for 'status_file' in the Nagios configuration-file nagios.cfg.

Common places

When you've installed Nagios from source tar-file into the default locations, that file is located at /usr/local/nagios/var/status.dat.
On Debian the file to read from is normally /var/cache/nagios3/status.dat.
On Groundwork you'll find the file at /usr/local/groundwork/nagios/var/status.log.
Nagios from the EPEL repository (for Fedora and RedHat Enterprise Linux) has the file at /var/log/nagios/status.dat.

Configuration file

The configuration-file consists of "key = value"-pairs. E.g. "counter = true". To get a list of possible settings (keys), invoke the program with --help. The list of commandline switches can be used in the configuration-file as well, that is: remove the '--'. So, if you would use '--row-border' on the commandline, use 'row-border = true' in the configuration-file.
If that's too complicated, just use the web-interface!

General usage info

When the program is loading the current status, a blue block is displayed in the upper-right corner. If there was a problem loading the status, a red block will appear.
The values in the row at the top tell you the number of critical-, warning-, ok-, up-, down-, unreachable- and pending- statusses.
Invoke with '--help' to see a complete list of options.
Note that you can add multiple '--source'-switches to view the status of multiple Nagios servers!

Meaning of upper row values

Please note that this line is fully configurable (use '--header' at the commandline or 'header =' in the configuration-file. run CoffeeSaint with '--help' to see a list of escapes).


Support


Send in your photographs!

Got CoffeeSaint running in your sysadmins room? Send in a picture! I'll add a link underneath it to your website.

 

 

 

Technocon.com

www.hro.nl

www.squareup.com





Last updated: 2010/8/06