- Report modules must be reentrant. That is, if a
module is run more than once simultaneously, all instances
must run to completion without interference.
- Report modules must not change their process group by any
means, including via setsid(), setpgid(),
setpgrp(), or any similar function.
- Each module must place its source code in a directory
underneath survivor/src/modules/report/ with the following
conventions:
- The name of the directory must be
report/modulename/.
- A Makefile.in must be present, with directives for
clean, veryclean, all,
install, and install-remote.
The install should, except in exceptional
circumstances, install the module into
@prefix@/mod/report, owned by @INST_USER@
and @INST_GROUP@, mode 555.
The install-remote directive should be the
same as install, except where it does not make sense
for the module to be installed as part of a remote
distribution. (Report modules typically do not need to be
installed remotely.)
- Documentation describing the module should be in
doc/rm-modulename.html
- Report modules receive their required data via a SurvivorReportRequest element
provided in an XML document on stdin.
- Report modules may write temporary output files only if a
TmpDir element is provided within the
Formatting element and only in the location provided by
the TmpDir element. Temporary files should be named in
such a way as to avoid conflict with other modules. The form
$TmpDir/rm-$modname-$random.ext is recommended.
- Report modules must generate output on stdout consisting
of a document of the format specified by the Style
attribute of the Formatting element. If no appropriate
input is received, a suitable error should be provided.
Defined styles are:
- check: Plain text document suitable for parsing by a check
module. Output must consist of a line of the form
service host output
where output is well defined and consistent on a
per-module basis.
- html: HTML document suitable for rendering by a web browser.
- text: Plain text document suitable for viewing in a terminal.
- Report modules must exit with one of the
following values (as defined in include/survivor.H):
- MODEXEC_OK: Report request successfully
processed.
- MODEXEC_PROBLEM: An error occurred in
processing the request.
- MODEXEC_MISCONFIG: The module is misconfigured
and is unable to process the request.
$Date: 2006/11/20 00:08:08 $
$Revision: 0.4 $
|
keywords
|