Managing HP Serviceguard A.11.20.20 for Linux, May 2013

generic_resource_evaluation_type before_package_start
generic_resource_name lan1
generic_resource_evaluation_type before_package_start
dependency_name generic_resource_monitors
dependency_condition generic_resource_monitors = up
dependency_location same_node
Thus, the monitoring scripts for all the generic resources of type before_package_start are
configured in one single multi-node package and any package that requires this generic resource
can just configure the generic resource name.
If a common resource has to be monitored in multiple packages, the monitoring scripts can be
configured in the multi-node package described above and multiple packages can define the same
generic resource name in their package configuration files as seen for the generic resource 'lan1'
in the above example.
Figure 30 depicts a multi-node package containing two monitoring scripts configured — one to
monitor a lan and other to monitor a CPU. The two packages are configured with the generic
resource names and are dependent on the multi-node package.
Figure 30 Multi-node package configured with all the monitoring scripts for generic resources of
type before_package_start
G.2 Template of a Monitoring Script
Monitoring Script Template
/usr/local/cmcluster/conf/examples/generic_resource_monitor.template
# **********************************************************************
# * *
# * This script is a template that can be used as a service when *
# * creating a customer defined sample monitor script for *
# * generic resource(s). *
# * *
# * Once created, this script can be configured into the package *
# * configuration file as a service with the "service_name", *
# * "service_cmd" and "service_halt_timeout" parameters. *
# * Note that the respective "sg/service" and the *
# * "sg/generic_resource" modules need to be specified in the package *
# * configuraton file in order to configure these parameters. *
# * *
# * *
# * --------------------------------- *
# * U T I L I T Y F U N C T I O N S *
G.2 Template of a Monitoring Script 299