VCSAG_SET_ENVS

The VCSAG_SET_ENVS function is used in each script-based entry point file. Its purpose is to set and export environment variables that identify the agent's category ID, the agent's name, the resource's name, and the entry point's name. With this information set up in the form of environment variables, the logging functions can handle messages and their arguments in the unified logging format without repetition within the scripts.

The VCSAG_SET_ENVS function sets the following environment variables for a resource:

VCSAG_LOG_CATEGORY

Sets the category ID. For custom agents, Veritas assigns the category ID.

See UMI.

NOTE: For bundled agents, the category ID is pre-assigned, based on the platform (Solaris, Linux, or AIX) for which the agent is written.

VCSAG_LOG_AGENT_NAME

The absolute path to the agent.

For example:

UNIX: /opt/VRTSvcs/bin/resource_type

Since the entry points are invoked using their absolute paths, this environment variable is set at invocation. If the agent developer wishes, this agent name can also be hard coded and passed as an argument to the VCSAG_SET_ENVS function.

VCSAG_LOG_SCRIPT_NAME

The absolute path to the entry point script.

For example:

UNIX: /opt/VRTSvcs/bin/resource_type/online

Since the entry points are invoked using their absolute paths, this environment variable is set at invocation. The script name variable is can be overridden.

VCSAG_LOG_RESOURCE_NAME

The resource is specified in the call within the entry point:

VCSAG_SET_ENVS $resource_name