Monitor modes
When you configure process monitors and custom monitors for the application controller, you can also specify the mode in which the application monitor is used.
- Startup Monitoring Mode
-
In this mode, the application monitor runs when cluster services are starting. The monitor checks whether the application is already running on the node. If the monitor indicates that the application is running, cluster services does not run the application controller start script during the startup operation process. This function is useful if you have previously stopped cluster services by using the unmanage option. The unmanage option keeps the application and other resources active on the node. When cluster services are restarting, the startup monitor can indicate whether the application is still running and avoid creating a second instance by running the controller start script.
The startup monitor is stopped after a specific amount of time that is specified by the stabilization interval for the application controller. If the monitor returns within the stabilization interval, a zero return code indicates that the application is already running and the controller start script is not run. If the monitor returns a nonzero code within the stabilization interval, or if it does not return at all, the application is not running and the controller start script begins to run.
Startup monitors are important if you are using parent/child resource dependencies or start after resource group dependencies. A startup monitor also verifies that the application in the parent resource group or target resource group is running before the dependent resource group is started.
- Long-Running Mode
-
In this mode, the application monitor is used after the application is started and the application monitor checks whether that the application is still running. The monitoring starts after the stabilization interval expires. For custom monitors, the user supplied monitor is called at regular intervals. In SMIT, the value for the interval is specified in the Monitor Interval field. For process monitors, the monitoring relies on the Reliable Scalable Cluster Technology (RSCT) subsystem that can detect the end of a specified process.
You can configure a monitor in this mode for any application controller, and you can specify multiple monitors that indicate the health of the application.
For example, you can configure a process application monitor to immediately indicate the end of a critical database process. You can also configure a custom monitor that periodically sends transactions to the database. The custom monitor verifies that the database is actively responding to requests, while the process monitor immediately detects the end of a critical database process.Note: In this mode, the application monitors do not run at the start of the application, and do not check the status of the running application. If you start the cluster services operation after you unmanage the node, the start script handles the running status of the application.
- Both
-
In this mode, the same application monitor is used for both the startup monitor mode and the long-running mode. When you are writing and testing a custom monitor to be used in this mode, the same monitor must operate correctly when started under different circumstances. When the monitor is called during startup, the monitor is run only for the amount of time specified by the stabilization interval. If the monitor does not return within the amount of time that is specified by stabilization interval, the monitor is stopped and the application start script is run.
The interval that you specified for the Monitor Interval field in SMIT, determines how often the custom long-running monitor is run after the application is started and is stable.
If you use the same application monitor for both startup and long-running monitoring, you must verify that the monitor can reliably determine the application state and return an appropriate indication within the associated time period.