spong-network

Langue: en

Version: 2009-02-04 (debian - 07/07/09)

Section: 8 (Commandes administrateur)

NAME

spong-network - report network service information to spong server.

SYNOPSIS

spong-network [--debug n] [--kill|--restart|--nosleep|--refresh]
                 [config_file]

DESCRIPTION

This checks network connectivity and network service availability to various machines you want to monitor. It reports the status of the network services that it monitors to the spong server. Everything happens again after sleeping for a time period you have defined in your configuration file. This program typically runs on your spong server machine (although it can be run on any host - although I would suggest one with good network connectivity).

The program checks a series of network services that are configured separately for each host. spong-network also can be very aggressive in checking for network service that are down. You can configure multiple rechecks to guard against transitional failures.

Running the program

You should start this program in your system startup file, and it should be running constantly. If no parameters are specified, spong-network forks and detaches itself to run as a daemon.

If you provide the --debug n flag, then debugging information will be printed to stdout, otherwise output will only be produced if there is a problem. Where n is a number from 1 - 9. A higher number means more verbosity in the debugging output.

If you provide the --restart flag, a signal will be sent to the spong-network process that is currently running that will cause it to reload it's configuration files. If you provide the --kill flag, a signal will be sent to the running spong-network process causing it to exit.

The --nosleep or --refresh flag causes the program to cycle through all of the checks once then exit. These flags can be used to run spong-network as a cron job (depreciated), but it recommended that you run the program continuously.

Format of update messages

It sends a message for each check to the spong server and reports the following:
hostname (where is this report coming from)
service name (``disk'', ``cpu'', ``procs'', ``logs'', ``local'')
color (``red'', ``yellow'', ``green'')
a one line summary
a more detailed message providing additional detail.

The color is determined by comparing the current status of that service against thresholds defined in the configuration file. If they are greater then the level you have defined for a warning, then the color is yellow. If they are greater then the critical level you have defined then the color is red.

The one line summary provides information that might be useful at a glance when looking at the overall system status (such as a brief report on the load, number of users, and uptime).

The more detailed message contains information such as the output of the ping command from the check ping module or the data read after testing a network service.

Network Checks

The check are actually a setup of modules that are called in series by spong-network. Upon initialization, spong-network will load the all of the modules that will be used from the LIBDIR/Spong/Network/plugins directory. As each module is initialized, it registers itself with the plugins registry (see the Developer Guide).

The list of network checks and the order the are performed that are performed for a host are defined in the services attribute of the host's entry in the %HOST variable. The ping service is appended by default to all of the lists of services to be check for a host. If the meta-service name of noping is defined for a host, the ping check will no be done for the host.

CONFIGURATION

Configuration Files

spong.conf
By default this reads the spong.conf file on startup. You can specify an alternate config file via a command line option and it will read that file instead. If you change values in the configuration file you will need to restart this program for those changes to be re-read.
spong.conf.[hostname]
After reading the configuration file that you specify (or the default), it then reads the spong.conf.[hostname] file where [hostname] is the hostname of the machine that you are running on. Since these configuration files are just standard perl code that gets imported, the variables that you define in the host specific config file will take precedence over the standard configuration settings.
spong.hosts
spong-network reads all of the host that are to be check from the %HOSTS variable in the spong.hosts file. The list of services to be check for each host is already read from spong.hosts.

Configuration Variables

From spong.conf:
$SPONGSLEEP, $SPONGSERVER, $SPONG_UPDATE_PORT
Some basic spong configuration options that define how long to sleep (in seconds) before checking the status of a service again, the hostname of the spong server, and the port number that the spong server listens
$SPONGSLEEP{'DEFAULT'}, $SPONGSLEEP{'spong-network'}
This the new method for specifying the $SPONGSLEEP interval for Spong programs. If there is not $SPONGSLEEP{} entry for the program, it will use the $SPONGSLEEP{'DEFAULT'} value. If no value is then found, spong-client fall back to using $SPONGSLEEP.
$SPONGTMP
The directory that Spong programs use for temporary store and work files. It should be a different directory than /tmp for operation and security reasons.
$SPONG_LOG_FILE
If set to 1, spong-network will log errors to a log file in $SPONGTMP named spong-network.log.
$SPONG_LOG_SYSLOG
If set to 1, spong-network will log errors to the syslog using the USER facility and the ERR priority.

From spong.hosts:

%HOSTS
All of the host names defined in %HOSTS are the list of hosts that spong-network will check. The services defined in the services attribute are the list of services that will be checked for each host. The ping service is prepended to the list of services unless 'noping' is defined.

Another important attribute for a host is the skip_network_checks flag. If this flag is set for a host, the spong-network program will skip the check for the host.

FILES

spong.conf, spong.conf.hostname, spong.hosts

DEPENDENCIES

Perl v5.005_03 or greater is required.

BUGS

The check_dns module uses the Net::DNS Perl module. On some systems the Net::DNS module will fail and start reporting false DNS lookup failures. The cause is unknown at present. This will cause dns check for all hosts to fail and be reported as a critical status. The fix is to restart spong-network (i.e. spong-network --restart ),

A work-around is to regularly do restart spong-network, such as from a cron job.

SEE ALSO

spong-server, spong.conf, spong.hosts, developer-guide

AUTHOR

Ed Hill <ed-hill@uiowa.edu>, Unix System Administrator, The University of Iowa

Stephen L Johnson <sjohnson@monsters.org>

HISTORY

Based on code/ideas from Sean MacGuire (BB), and Helen Harrison (Pong). Ed Hill original converted Big Brother (http://www.bb4.com) into Perl which diverged from Big Brother to become Spong. Ed Hill continued Spong development until version 2.1. Stephen L Johnson took over development in October, 1999 with his changes which became Spong 2.5.