Example of Logging Functions Used in Script Agent
The following example shows the use of VCSAG_SET_ENVS and VCSAG_LOG_MSG functions in a shell script for the online entry point.
!#/bin/ksh
ResName=$1
# Parse other input arguments
:
:
VCSHOME="${VCS_HOME:-/opt/VRTSvcs}"
. $VCSHOME/bin/ag_i18n_inc.sh
# Assume the category id assigned by VERITAS for this custom agent #is 10061
VCSAG_SET_ENVS $ResName 10061
# Online entry point processing
:
:
# Successful completion of the online entry point
VCSAG_LOG_MSG "N" "online succeeded for resource $ResName" 1 "$ResName"
exit 0
|