HP Serviceguard Toolkit for Integrity Virtual Servers #cmdeployvpkg -P vm1 -x merge -x appmon

Page 26

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 -xmerge, 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

Image 26
Contents Abstract Page Contents Advantages HP Serviceguard Toolkit for Integrity Virtual ServersOverview DependenciesHP Integrity VM Serviceguard toolkit HP Serviceguard Toolkit for Integrity Virtual Servers Supported configuration VM/vPar as Serviceguard packagesFor example, # cmdeployvpkg -m 1 -P vm1 Network componentsStorage considerations Storage considerations #swremove SG-IVS-Toolkit # swinstall -s depot path# swlist -l product SG-IVS-Toolkit K004vswitchmgr Vparreset IvshpvmutilsVswitchmgr S802vswitchmgrCreating packages Using SG IVS toolkitPreconfiguration Change the vgnamecmd to vgchange -a s Hpvmvolumegroup /dev/vgsharedA Check the configuration of the packageCmmakepkg -m tkit/vtn/vpar -n vparname pkg.conf Using Serviceguard commandsCd /etc/cmcluster/vm/vParname Servicename Using SG IVS Toolkit commandsCmdeployvpkg command Cmapplyconf -P pkg.confMaintaining packages Managing packagesRunning packages #cmdeployvpkg -m 1 -P vm or vpar nameConverting packages Halting packagesDeleting packages Run cmdeployvpkg -C -P vmname Configuring guest application monitoring service Failure of a monitored VM or vPar guest application Configuring guest application monitoring service HP-UX /opt/hp/cmappserver Key generation on the VM or vPar guestCmappserver Rpm -i cmappserverslesia64.rpm for SlesAdd /opt/hp/cmappserver to the path Cmappservertimeoutcmappserver connection timeout seconds #cmdeployvpkg -P vm1 -x merge -x appmon# cmdeployvpkg -P slvm1 -x merge -x appmon HpuxConfiguring guest application monitoring service Hostlogfile full Lanmon Usr/sbin/cmappmgr -node remo1 -cmappservertimeoutLoglevel Pathof fileonhostHelp Version Adm/vm1npivdiskmon.logUpgrading cmappmgr/cmappserver combination Configuring guest application monitoring service Online VM guest package migration For example # cmmovevpkg -v -P slvm1 -h xyzo2Online VM guest package migration Run cmdeployvpkg command with -m 0 option TroubleshootingService monitor detected a failure in guest vmname Etc/cmcluster/scripts Mscripts Mastercontrolscript.shCmcluster/scripts/tkit/vtn/ tkitmodule.sh Limitations Information to collect before contacting HP How to contact HPSupport and other resources Related information Typographic conventions HP authorized resellersDocumentation feedback TIP Page Page Glossary DMPIndex