Software distribution

Nagios plug-in

At GEOFON we have developed a plug-in for monitoring Seedlink and Arclink servers from Nagios. Although it is somewhat experimental, you are welcome to try it out. Send comments, criticisms, requests for features, and flowers to me, pevans -at- gfz-potsdam.de.

Operation and implementation

The plug-in is implemented as a bash script. For Seedlink it uses the 'slinktool' utility, while for Arclink it telnets to the Arclink server to perform its check. It then prepares the output expected of a Nagios plug-in:

  • A single line of text (normally) on STDOUT of the form
    SERVICE OUTPUT | OPTIONAL PERFDATA
    
    where
    • SERVICE is either "SEEDLINK" or "ARCLINK";
    • OUTPUT is the result of the test, e.g. "OK - {HOSTNAME}:{PORT}:({SERVER RESPONSE} with X station(s))"; and
    • PERFDATA is a list of quantities measured by the test. This can be used by add-ons to Nagios such as PNP4Nagios and Nagiosgraph for graphing changes in these quantities over time.
  • A return code 0, 1, 2, etc. indicating one of the Nagios service states OK, WARNING, CRITICAL etc.

Probably this could be easily modified to work with Xymon (Hobbit) or other network monitoring systems. Please let me know if you do this!

Ref: "Nagios plug-in development guidelines" Nagios Plugins Development Team.

Requirements

  1. The monitoring machine must have access to the host and port on which the Seedlink/Arclink server is running.
  2. slinktool and bc must be installed on the monitoring machine.
  3. The utils.sh script which came with the Nagios plugins distribution.

Installation

Download check_seedlink_ping and put it where your Nagios plugins live e.g. /usr/local/nagios/libexec. Make sure it is executable. Adjust the path to the local slinktool binary as necessary, by editting the plugin, e.g.

slinktool=/home/sysop/bin/slinktool
if slinktool was installed by user "sysop" on the Nagios machine. You should now be able to run the plugin from the command line:

pevans> ./check_seedlink_ping -H geofon-open.gfz-potsdam.de
SEEDLINK OK - geofon-open.gfz-potsdam.de:18000: (SeedLink v3.1 (2010.345) GEOFON DC with 854 station(s))|seedsta=854sta;900;;1; time=.05732s;15;60;; version=3.1;;1.0; release=2010.345;;2011.000;

pevans> ./check_seedlink_ping --arclink -H eida.gfz-potsdam.de -P 18002
ARCLINK OK eida.gfz-potsdam.de:18002(0:'ArcLink v1.2 (2012.317)//GFZ')|time=.03220s;5;9;; version=1.2;;1.0; release=2012.317;;2011.000;

To use this from Nagios, you will need to set up some configuration. This will vary depending on your set-up. At a minumum, you will need to define some services and commands. For querying a Seedlink server, this may look something like this:

define service{
   use                   MY_SERVICE_TEMPLATE
   host                  MY_SEEDLINK_SERVER
   service_description   Seedlink
   check_command         check_seedlink
}

define command{
   command_name    check_seedlink
   command_line    $USER1$/check_seedlink_ping --seedlink -v -H $HOSTADDRESS$
}

and similarly for Arclink. You'll need to replace MY_SERVICE_TEMPLATE and MY_SEEDLINK_SERVER with something appropriate.

Files