HP Serviceguard Toolkit for Integrity Virtual Servers User Guide (June 2013)

5. To modify the VM or vPar guest package to start or monitor specific applications in the VM
or vPar guests, do one of the following:
Manually edit the existing VM or vPar guest package configuration file:
To monitor specific applications in a VM or vPar guest, a cmappmgr entry is added to
the services section of the VM or vPar guest package for each monitored application.
The following example shows the service entries for monitoring the VM or vPar guest
mmpf121 (as automatically configured by using the cmdeployvpkg command) and
how to add an xclock application as a monitored service for the VM or vPar guest package
mmpf121 in HP Serviceguard modular package format:
service_name mmpf121
service_cmd $SGCONF/scripts/tkit/vtn/tkit_module.sh guest_monitor
#service_restart
#service_fail_fast_enabled
service_halt_timeout 300
service_name mmpf121-xclock
service_cmd "/usr/sbin/cmappmgr -node mmpf121 -cmappserver_timeout 240 -service /usr/bin/X11/xclock
-display 16.213.12.70:0.0"
service_restart 3
#service_fail_fast_enabled
service_halt_timeout 300
Automatically edit the existing VM or vPar guest package configuration file:
To add the guest application monitor in the existing VM or vPar guest package
configuration file, run the cmdeployvpkg command with the -x appmon option.
NOTE: Option -x merge is used to add new configurations to the existing package
configuration file. The command, cmdeployvpkg is run with -x merge, when the
package is already created for that VM or vPar guest.
For example:
To run the cmdeployvpkg in an interactive mode, use the following sample
command:
#cmdeployvpkg -P vm1 -x merge -x appmon
To run the cmdeployvpkg in a quiet mode, use the following sample command:
#cmdeployvpkg -Q -P vm1 -x merge -x
appmon=app_mon:/application/directory/app-mon-script:10:1:300
cmappmgr uses the following options:
-node: VM or vPar guest running the application to monitor
-cmappserver_timeout: cmappserver connection timeout (seconds)
-service: application run-string to execute and monitor in the VM or vPar guest
The cmappmgr command line option cmappserver_timeout specifies the length of time
in seconds. cmappmgr waits for a response from cmappserver before it terminates. This
termination triggers either a service restart or a VM or vPar guest package failover, depending
on the service_restart value and the number of times HP Serviceguard has restarted
cmappmgr. The cmappserver_timeout value must be initially set large enough to account
for the time required to start both the VM or vPar guest and the cmappserver daemon. This
value must be set in the VM or vPar guest to prevent a false monitored application failure
indication.
26 Configuring guest application monitoring service