From: Stephen L Johnson Date: Wed, 29 May 2002 03:32:34 +0000 (+0000) Subject: added hash format for all Spong messages and created a new predata example X-Git-Tag: spong-2_7_7~3 X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=18b0230c6eb69b6b2c7369e13a812d1ddf6321a6;p=spong.git added hash format for all Spong messages and created a new predata example module --- diff --git a/pod/spong-server-mod-template.pod b/pod/spong-server-mod-template.pod index f9d5066..2f71f0d 100755 --- a/pod/spong-server-mod-template.pod +++ b/pod/spong-server-mod-template.pod @@ -1,56 +1,248 @@ =head1 NAME -spong-server-mod-template - how to build a spong-server data module +spong-server-mod-template - how to build a spong-server data modules =head1 DESCRIPTION -This template will be a simple example that will write incoming 'cpu' -status updates into a queueing directory. Each file will have the -host's name plus the current time are it's file name. +The old data spong-server plugin modules are now deprecited in favor of predata +and postdata modules. Spong Server data modules will continue to be supported +for the future. But you are encouraged to convert any custom modules to the new +format, and update any old data plugin to their new pre- or post-data +equivalent. -The file name of the module must begin with 'data_'. The registry key can -be anything, but it should be consistent with the procedure's name. And the -registry must be unique among the other loaded modules; otherwise, one -module will overlay the other. +The file name of the module must begin with 'predata_' or 'postdata_'. +'predata_' is for a predata module. The module will be called immediately after +an incoming message is received, but before normal processing. 'postdata_' is +for a postdata module. The module is called after the normal processing is done +for the message. + +Modules are called in the order of their registry key in alphabetical order. +The registry key can be anything, but it should be consistent with the +module's name. And the registry must be unique among the other loaded +modules; otherwise, one module will overlay the other. The line that has the assignment to C<$DATAFUNCS{'registry-name'}> is the key to the registry mechanism. It's what ties the registry name to the your data module. -data_cpu_queue: +=head1 Message Formats + +The fields of messages are passed to the module in the form of a Perl hash. +This hash is the only parameter passed to the module when it is called. + +=head2 Status Message + +This is the most common type of message received by the Spong Server. A status +message reports the current status of Spong Client and Spong Network +checks and tests. + +=over + +=item C
+ +The field contains the first line of a status message. If consists the C, +C, C (aka status), C