Next: spong-server-mod-template | Previous: spong-network-mod-template | [Table of Contents] | [Index] |
spong-server - save status information reported by spong programs
spong-server [--debug n] [--kill|--restart] [---test]
[config_file
]
The spong-server is the central core program of Spong. The program received status reports from various spong clients (specifically spong-network and various spong-client program running). If the message is worth notifying someone about, it calls the spong-message program. The status messages messages are stored into an internal database with significant changes being logged into a history event log. Queries from spong interface programs (like spong and www-spong) seeking to display the data in the spong-server database.
You should start this program in you system startup file, and it should be running constantly. If no parameters are provided, spong-server will fork and detach itself from the console to run as a daemon.
If you provide the --debug n flag then debugging information will be printed to stderr. The n is an integer from 1 to 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-server process that is currently running. It will release reload it's configuration and restart. If the --kill flag if provided, a signal will be sent to the running spong-server process causing it to exit.
The --test parameter has no effect in the spong-server program itself. If specified on the comment line, the --test parameter will be passed to the spong-message program when it is called. The <--test> paramter will cause spong-message to skip the actual send of notifications.
An alternate configuration file can be specified on the command line. This
file will be read instead of the default spong.conf
configuration file.
The spong-server has a main process that spawns a number of child processes to handle all of the work. There are a query process which handles queries into the Spong database, an update process which handles Spong formatted update messages (see the developer-guide/"SPONG PROTOCOL" entry elsewhere in this document), a BBSERVER update process which handled Big Brother client update messages, and possibly other process are more feature are added in the future. The main process monitors each of the child processes. It will restart any child process that dies for any reason.
Each time a connection comes in, the child process is forks off to handle the the above tasks. The main child process goes back to waiting for more connections.
The spong-server has a plug-in module facility similar to the other
Spong programs. One or more modules can be installed in the
LIBDIR/Spong/plugins/
directory. The modules are loaded are run-time by
spong-server. As each module is initialized is registers itself with
the plug-ins registry.
Each module is called in turn after all of the normal processing is done for incoming status messages. This allows you access to data of a status message that will eventually be discarded. Data modules can do virtually anything that you desire with the incoming data. The data can be written to a log or database or feed to another application for further filter or processing.
Two sample data modules are located in the contrib/plugins/spong-server
directory of the Spong distribution. The two modules (data_rrd_disk and
data_rrd_la work in conjunction with a software package named RRD Tool to
log disk and cpu information into Round Robin Databases. The modules are
included as examples. They are not of must use by themselves. See the
Spong-RRD package (http://spong.sourceforge.net/downloads.html) for a
complete package that utilizes data modules.
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.
From spong.conf
:
Yes there are a lot of variables. But all of the variables have defined default values. Most of these variables are used customizing the client web and text interfaces.
/tmp
for operation and security reasons.
spong-network.log
.
From spong.hosts
:
From spong.groups
:
spong.conf
, spong.conf.hostname
, spong.hosts
, spong.groups
Perl v5.005_03 or greater is required.
No know bugs.
the spong.conf manpage, the spong.hosts manpage, the spong.groups manpage, the spong-server-mod-template entry elsewhere in this document, the developer-guide entry elsewhere in this document
Ed Hill <ed-hill@uiowa.edu
>, Unix System Administrator, The University of
Iowa
Stephen L Johnson <sjohnson@monsters.org
>
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.