Managing HP Serviceguard for Linux, Tenth Edition, September 2012

Launching Monitoring Scripts
Monitoring scripts can be launched in the following ways:
For resources of evaluation_type: during_package_start
Monitoring scripts can be launched through the services functionality that is available
in packages, as indicated by service_name, service_cmd, and
service_halt_timeout. This makes the monitoring scripts highly available,
since Serviceguard monitors them and is the recommended approach.
Monitoring scripts can also be launched through external_script or external_pre_script
as part of the package.
Monitoring scripts can also be launched outside of the Serviceguard environment,
init, rc scripts, etc. (Serviceguard does not monitor them)
It is not mandatory to have the same name for a generic resource and its monitoring
script, i.e., service_name and generic_resource_name. However, it is good
practice to have the same name, so that it is easier to identify the monitor.
A common resource specified across multiple packages can be monitored using one
monitoring script.
For resources of evaluation_type: before_package_start
Monitoring scripts can also be launched outside of the Serviceguard environment,
init, rc scripts, etc. (Serviceguard does not monitor them).
The monitoring scripts for all the resources in a cluster of type
before_package_start can be configured in a single multi-node package by
using the services functionality and any packages that require the resources can
mention the generic resource name in their package configuration file.
This makes the monitoring scripts highly available, since Serviceguard monitors them
and is the recommended approach. The monitoring script has to be configured to
run on all the nodes the package is configured to run on. See the recommendation
and an example below.
For explanation of generic resource parameters, see under “Package Parameter
Explanations” (page 205).
HP recommends you to:
Create a single multi-node package and configure all the monitoring scripts for
generic resources of type before_package_start in this multi-node package
using the services functionality.
Mention the generic resource name in the application package and configure the
generic resource as before_package_start.
Configure a dependency for better readability, where the application package is
dependent on this multi-node package.
For example:
package_name generic_resource_monitors
package_type multi_node
Launching Monitoring Scripts 341