Managing HP Serviceguard A.11.20.10 for Linux, December 2012

NOTE: Generic resources must be configured to use the monitoring script. It is the monitoring
script that contains the logic to monitor the resource and set the status of a generic resource
accordingly by using cmsetresource(1m).
These scripts must be written by end-users according to their requirements. The monitoring
script must be configured as a service in the package if the monitoring of the resource is
required to be started and stopped as a part of the package.
This can be achieved by configuring a service_name and a service_cmd, by providing
the full path name of the monitoring script as the service_cmd value as shown in the step.
The service_name and generic_resource_name need not be the same. However, it
would be a good practice to do it, so that it would be easier to identify the monitor.
HP provides a template that describes how a monitoring script can be written. For more
information on monitoring scripts and the template, see “Monitoring Script for Generic
Resources” (page 289) and Template of a Monitoring Script” (page 291).
If the generic_resource_up_criteria is specified, the given resource is considered to
be an extended generic resource, else it is a simple generic resource. For the description of
generic resources parameters, see “Package Parameter Explanations (page 168). See “Using
the Generic Resources Monitoring Service” (page 50).
3. After editing the package configuration file, verify the content of the package configuration
file:
cmcheckconf -v -P $SGCONF/pkg1/pkg1.conf
cmcheckconf: Verification completed with no errors found.
Use the cmapplyconf command to apply the configuration
4. When verification completes without errors, apply the package configuration file. This adds
the package configuration information (along with generic resources) to the binary cluster
configuration file in the $SGCONF directory and distributes it to all the cluster nodes.
cmapplyconf -P $SGCONF/pkg1/pkg1.conf
Modify the package configuration ([y]/n)? y
Completed the cluster update
5. Verify that the generic resources parameters are configured.
cmviewcl -v -p pkg1
UNOWNED_PACKAGES
PACKAGE STATUS STATE AUTO_RUN NODE
pkg1 down halted disabled unowned
Policy_Parameters:
POLICY_NAME CONFIGURED_VALUE
Failover configured_node
Failback manual
Script_Parameters:
ITEM STATUS NODE_NAME NAME
Generic Resource unknown node1 sfm_disk
Generic Resource unknown node2 sfm_disk
Node_Switching_Parameters:
NODE_TYPE STATUS SWITCHING NAME
Primary up enabled node1
Alternate up enabled node2
Other_Attributes:
4.8 Package Configuration Planning 105