HP Serviceguard manual Launching Monitoring Scripts

Models: Serviceguard

1 407
Download 407 pages 39.81 Kb
Page 391
Image 391

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

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

service_name

lan1_monitor

service_cmd

$SGCONF/generic_resource_monitors/lan1.sh

service_name

cpu_monitor

service_cmd

$SGCONF/generic_resource_monitors/cpu_monitor.sh

The above example shows a sample multi-node package named generic_resource_monitors and has two monitoring scripts configured — one each to monitor a LAN and CPU. These monitoring scripts will monitor the LAN interface, CPU and sets the status of the generic resources defined in them accordingly.

Consider a package pkg1 having the LAN resource configured as before_package_start and the monitoring script for this is running in the multi-node package generic_resource_monitors. A dependency is created such that the multi-node package must be UP in order to start the package pkg1. Once the multi-node package is started, the monitoring of resource 'lan1' gets started as part of the monitoring script 'lan1.sh'. The script will set the status of the generic resource 'lan1' and once the is UP, the package pkg1 is eligible to be started.

package_name package_type

generic_resource_name

generic_resource_evaluation_type

dependency_name dependency_condition dependency_location

pkg1 failover

lan1

before_package_start

generic_resource_monitors generic_resource_monitors = up same_node

Launching Monitoring Scripts 391

Page 391
Image 391
HP Serviceguard manual Launching Monitoring Scripts