Appendix B. Extending the Healthchecker

This appendix explains how to customize the Healthchecker to particular needs. This includes adding new tests, adding new actions or even entire new test sets.

Adding new tests

To add a new test, the appropriate script must be copied to the directory /opt/parastation/lib/checks. The script must be executable, otherwise it's silently ignored. The script may only return values 0, 1 or 2.

Add a new test to one of the test configuration files in /etc/parastation/healthcheck/testconf.d. You may also create a new file within this directory. Add a new section with the new test name within brackets and add at least the key words classes, testsets and test. The later one should point to the new check.

Check the configuration by running pshcgetconf testset and pshealthcheck --dry-run testset. Refer to the section called “Configuring the test” for details.