An example configuration may be found in the directory
/opt/parastation/share/doc/pshealtcheck.
The tests are defined using one or more configuration files
located in the directory
/etc/parastation/healthcheck/testconf.d.
Typically, there is a file called
tests.conf, but any other name would be
also accepted.
All files found in this directory are analyzed.
For each test, a section like
[ethernet_eth0]
classes = cs:admin
testsets = reboot:prologue
test = /opt/parastation/lib/checks/ethernet eth0 100
timeout = 10
killwait = 2
[md5sum_parastation_cs]
classes = cs
testsets = reboot
test = /opt/parastation/lib/checks/md5sum
/etc/parastation/classes/cs/md5sums
[md5sum_parastation_admin]
classes = admin
testsets = reboot
test = /opt/parastation/lib/checks/md5sum
/etc/parastation/classes/admin/md5sums
Figure 4.2. Example tests.conf file
is required. The strings in brackets define a test name and start a new section decribing the named test.
The following list numerates all parameters. They may be given
in any order within a test section of the configuration file.
Parameter and value are separated by an
equal sign.
classes (mandatory)
A colon separated list of classes this test belongs to.
testsets (mandatory)
A colon separated list of test sets this test belongs to.
test (mandatory)
Command to be executed. Everything right of the equal sign is passed as-is to bash's eval.
timeout (default: 0)
Timeout for the test in seconds. If the
timeout is reached before the
test returns, a signal SIGTERM is
sent to the process and it is handled as if it returned an
error.
killwait (default: 1)
Time to wait between SIGTERM and
SIGKILL in case the
timeout of the test is reached.
The ordering of the tests within the configuration file defines the ordering the tests are run afterwards.
Within the previous example, three tests called
ethernet_eth0,
md5sum_parastation_cs and
md5sum_parastation_admin are defined.
The test ethernet_eth0 is related to the
classes cs and
admin.
It is part of the test sets reboot and
prologue.
The check itself is performed using the command
/opt/parastation/lib/checks/ethernet using the
parameters eth0 and
100.
For information about the required parameters, take a look at
the check itself.
The check will be terminated after
timeout seconds using signal SIGTERM.
After killwait seconds, it will be killed
using SIGKILL.
See also pshealthcheck(1), the section called “CONFIGURATION” and Appendix C.