Managing HP Serviceguard for Linux, Tenth Edition, September 2012

provides integration of custom, user-defined monitors in Serviceguard by configuring
generic resources as part of package configuration. Generic resources can also be used
as an alternative approach to the Event Monitoring Service Hardware Monitors. With
generic resources different kind of monitoring mechanisms, such as EMS monitors,
SFM/WBEM monitors, Custom monitors, can be used and these can co-exist in a single
package.
Generic resources has the following advantages:
Custom defined monitors can also be integrated
Provides better control, options, and flexibility in terms of getting and setting the
status of a resource
Generic resources can be configured into any modular style package, including modular
style CFS packages. They can be configured for failover or multi-node packages and
are included in modular failover packages by default. A single resource can be specified
across multiple packages.
You can either generate a new package configuration file containing the generic resource
module parameters or add the module to an existing package to include the generic
resource parameters. When you generate a package with the generic resource module,
Serviceguard provides the following parameters for configuring generic resources:
generic_resource_name
generic_resource_evaluation_type
generic_resource_up_criteria
You can then configure generic resources using these parameters. For details on the
parameters, see “Package Parameter Explanations” (page 205) and the cmmakepkg
(1m) manpage. For steps to configure a generic resources, see “Configuring a Generic
Resource” (page 126).
You can also add, delete, or modify generic resources depending on certain conditions.
For information, see “Online Reconfiguration of Generic Resources” (page 129).
Monitoring of these resources happen outside of the Serviceguard environment. These
are done by writing monitoring scripts that can be launched either within the Serviceguard
environment by configuring them as services, or outside of Serviceguard environment.
These scripts are written by end-users and must contain the core logic to monitor a resource
and set the status of a generic resource accordingly by using cmsetresource(1m).
These are started as part of package start and will continue to run until package services
are halted. For more information, see “Monitoring Script for Generic Resources”
(page 340).
If there is a common generic resource that needs to be monitored as a part of multiple
packages, then the monitoring script for that resource can be launched as part of one
package and all other packages can use the same monitoring script. There is no need
to launch multiple monitors for a common resource. If the package that has started the
56 Understanding Serviceguard Software Components