User's Manual
5. To modify the VM guest package to start or monitor specific applications in the VM guests,
do one of the following:
• Manually edit the existing VM guest package configuration file:
To monitor specific applications in a VM guest, a cmappmgr entry is added to the services
section of the VM guest package for each monitored application.
The following example shows the service entries for monitoring the VM guest mmpf121
(as automatically configured by using the HP Serviceguard or HP Integrity VM Serviceguard
toolkit) and how to add an xclock application as a monitored service for the VM guest
package mmpf121 in HP Serviceguard modular package format:
service_name mmpf121
service_cmd /etc/cmcluster/mmpf121/hpvmsg_mon mmpf121
#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
The following example explains the method to monitor an Apache web server on a
Windows VM guest in the HP Serviceguard legacy package format:
SERVICE_NAME[1]=v-smp25_guest_apache
SERVICE_CMD[1]=/usr/sbin/cmappmgr –node v-smp25 –service "\”C:\\Program Files\\apache
group\\apache\\apache\"”
SERVICE_RESTART[1]="-r 1“
• Automatically edit the existing VM guest package configuration file:
To add the guest application monitor in the existing VM 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 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 guest running the application to monitor
• -cmappserver_timeout: cmappserver connection timeout (seconds)
• -service: application run-string to execute and monitor in the VM guest
The cmappmgr command line option cmappmgr_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 guest package failover, depending on
the service_restart value and the number of times HP Serviceguard has restarted
cmappmgr. The cmappmgr_timeout value must be initially set large enough to account for
the time required to start both the VM guest and the cmappserver daemon. This value must
be set in the VM guest to prevent a false monitored application failure indication.
21