Custom actions provide a method to monitor and take actions that the WRM does not provide with its predefined monitoring capabilities. Typically the custom action monitors a resource on the managed system or detects a condition and then sends information to Operations Sentinel. However, it could also perform some action on the managed system and report the results back to Operations Sentinel.
The procedure to implement a custom action is as follows:
Define the custom action in the resource monitoring policy.
Create the actual script or program. Custom actions can use an existing script or program but more typically it uses a script or program that is specifically written for the custom action. The custom action script or program can be written in any language available for the platform.
To aid reporting of resource information, the STDOUT of the custom action is redirected to the pipe file automatically. Scripts or programs write event reports to STDOUT and the WRM reads the data and sends it to the Operations Sentinel server. Rather than using STDOUT, scripts or programs can write event reports directly to the pipe that the WRM monitors.
When implementing a script or program for a custom action ensure that the script or program only sends valid event reports to STDOUT. If the WRM receives data on the pipe that is not a valid event report, an alert is raised in Operations Sentinel.