Periodic Component Monitoring with Commands
Background
The AMF B.04 specification does not contain support for a periodically executed monitor command to assess the health of a component. Instead the concept of "external active monitoring" is provided. Such a monitor is supposed to be long running to avoid load on the system. However there are a few issues with this solution. For example who monitors the monitor? An alternative is to use an SA-Aware wrapper process that completely proxies the resource.
Solution
Add native AMF support for periodic execution of a monitoring command (included from 4.3). The function is automatically started if such a command has been configured when a component is instantiated. The same health check object classes are reused to configure period and duration.
Period specifies the frequency that the monitor command will be called by AMF. Duration specifies the time each invocation of the monitor command is allowed to take before considered an error by AMF.
The function is normally used to monitor non-sa-aware components but can also be used to monitor sa-aware components.
Configuration
Add to the component type an attribute named osafAmfCtRelPathHcCmd for example:
osafAmfCtRelPathHcCmd=/etc/init.d/postfix status
Add a health check type object (SaAmfHealthcheckType) as a child to the component type where the key must be safHealthcheckKey=osafHealthCheck and specify duration and period accordingly.
Related Information
http://devel.opensaf.org/ticket/2452
