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:
The VCSAG_SET_ENVS function must be called before any of the other logging functions.
VCSAG_SET_ENVS ${resource_name} ${script_name} ${category_id}
VCSAG_SET_ENVS ${resource_name} "monitor" 1062
VCSAG_SET_ENVS ${resource_name} ${category_id} ${script_name}
VCSAG_SET_ENVS ($resource_name, $script_name, $category_id);
VCSAG_SET_ENVS ($resource_name, "monitor", 1062);
VCSAG_SET_ENVS ($resource_name, $category_id, $script_name);