Introduction

The Diagnostic and Recovery Service provides a mechanism for collecting system state information, creating system state snapshot at a fixed stage, monitoring periodic services and recovering them from unexpected execution stopping.

System Diagnostic

System state diagnostic offers an automated mechanism for collecting and summarizing different modules state. The system state snapshot at a fixed state is set up by state providers mechanism. StateProvider is a component providing comprehensible module state information.

com.prosyst.mprm.backend.monitor.StateProvider

System Monitoring and Recovery

Modules monitoring and recovering offers a mechanism to monitor on regular intervals executed modules, called monitored objects. The WatchdogService provides monitored objects control.

com.prosyst.mprm.backend.monitor.Monitorable

Components executed at regular intervals that want to be monitored and recovered from an unexpected circumstances they failed under, should implement the com.prosyst.mprm.backend.monitor.Monitorable interface and call the WatchdogService.registerMonitorable(monitorable, timeout, recoveryAction) method to be registered for monitoring in the system. The same monitored object can be registered more than once, defining different recovery actions for different issues.

com.prosyst.mprm.backend.monitor.WatchdogService

The Watchdog Service is the central point where the monitored objects are registered. It is responsible to watch them and launch the respective recovery action if the module fails under unexpected circumstances and does not function as expected. The monitored objects are responsible for notifying the Watchdog Service that their normal execution flow is not violated and they function as expected. This is done by periodically calling the com.prosyst.mprm.backend.monitor.WatchdogService.reportActive(monitorable) method. The method call period should be less than the minimum unresponsive timeout, registered for that monitored object.

The components that no longer need monitoring and recovering can be unregistered using the com.prosyst.mprm.backend.monitor.WatchdogService.unregisterMonitorable(monitorable) method. This method will cancel all previously made monitored registrations (if more than one exists).

The com.prosyst.mprm.backend.monitor.WatchdogService is registered as an OSGi service in the service registry.

com.prosyst.mprm.backend.monitor.Recoverable

The objects supporting self-recovery could use the WatchdogService to initiate their auto-recovery mechanisms, when the module has been irresponsive for a predefined period of time. In order to use this feature, the module should implement the Recoverable interface and use its implementation to construct a com.prosyst.mprm.backend.recovery.AutoRecoveryAction, passed as a parameter to the registerMonitorable(...) method of the WatchdogService.

Predefined Recovery Actions

Action

Description

com.prosyst.mprm.backend.recovery.ShutDownAction

Shuts the RM System down

com.prosyst.mprm.backend.recovery.RestartBundleAction

Initiates a predefined bundle restart

com.prosyst.mprm.backend.recovery.RebootAction

Initiates the RM System reboot

com.prosyst.mprm.backend.recovery.RaiseAlertAction

Raises an alert to the RM System

com.prosyst.mprm.backend.recovery.DisconnectHostAction

Initiates the backend host disconnect

com.prosyst.mprm.backend.recovery.AutoRecoveryAction

Initiates module auto-recovery