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 233) and the cmmakepkg (1m) manpage. For steps to configure a generic resources, see “Configuring a Generic Resource” (page 133).

You can also add, delete, or modify generic resources depending on certain conditions. For information, see “Online Reconfiguration of Generic Resources” (page 136).

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 390).

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 monitoring script fails or is halted, then all the other packages that are using this common resource also fail.

See the recommendation from HP and an example under “Launching Monitoring Scripts” (page 390).

Generic resources can be of two types - Simple and Extended.

A given generic resource is considered to be a simple generic resource when the up criteria parameter is not specified.

For a simple resource, the monitoring mechanism is based on the status of the resource.

The status can be either UP, DOWN, or UNKNOWN.

The default status is UNKNOWN; UP and DOWN can be set using the cmsetresource(1m) command.

A given generic resource is considered to be an extended generic resource when the up criteria parameter is specified.

For an extended resource, the monitoring mechanism is based on the current value of the resource.

The current value is matched with the generic_resource_up_criteria specified for the resource in a package and this determines whether the generic resource status is UP or DOWN.

58 Understanding Serviceguard Software Components

Page 58
Image 58
HP manual Understanding Serviceguard Software Components