cancel
Showing results for 
Search instead for 
Did you mean: 

VCS 5.0 MP3 Application Agent behaviour change

Peter_Whelan
Level 3

Hi,

I have just updated to VCS5.0 MP3 and have noticed a change in behaviour of the Application Agent when using MonitorProgram. If halog is used to output details to the engine log in the MonitorProgram, you get the following message in the engine log

 

halog -add "This is a message from cron" -sev N

 

results in this output in the engine log

 

2009/01/20 10:43:55 VCS NOTICE V-16-1-0 (atrcus421) Application:???:???:This is a message from cron

 

wherease in VCS5.0 MP1 and earlier, you would only get

 

2009/01/20 10:43:55 VCS NOTICE V-16-1-0 (atrcus421) This is a message from cron

 

This is confusing as it seems that the Application Agent cannot determine which resource is sending the message and from what point it is coming.

 

Has anyone else noticed this ?

 

I havent opened a case yet but was just wondering if it is a known issue before doing so.

 

Rgds

Peter

 

1 ACCEPTED SOLUTION

Accepted Solutions

M__Braun
Level 5
Employee

Hi Peter,

 

Logging should not be done directly via halog. Here is the relevant excerpt from the VCS Bundled Agents Guide:

 

Script entry point logging functions

For script based entry points, use the functions described in this section for message logging purposes.

Note: Symantec recommends that you do not use the halog command in script entry points.

 

The logging functions are available in the ag_i18n_inc module.
VCSAG_SET_ENVS: See “VCSAG_SET_ENVS” on page 110.
VCSAG_LOG_MSG: See “VCSAG_LOG_MSG” on page 113.
VCSAG_LOGDBG_MSG: See “VCSAG_LOGDBG_MSG” on page 114.
VCSAG_CONSOLE_LOG_MSG: Logs a message to the HAD log file.

Using the functions in scripts


The script-based entry points require a line that specifies the file defining the logging functions. Include the following line exactly once in each script. The line should precede the use of any of the log functions.

 

■ Shell Script include file
. ${VCS_HOME:-/opt/VRTSvcs}/bin/ag_i18n_inc.sh
■ Perl Script include file
use ag_i18n_inc;


Besides this recommendation the ag_i18n_inc is very convenient to use. See these examples:

 

VCSAG_LOG_MSG "I" "This is a message from cron";

VCSAG_LOGDBG_MSG 5 "This is a debug message from cron";

 

I hope this helps.

 

Regards

 

Manuel

Message Edited by M. Braun on 01-20-2009 05:29 AM

View solution in original post

2 REPLIES 2

M__Braun
Level 5
Employee

Hi Peter,

 

Logging should not be done directly via halog. Here is the relevant excerpt from the VCS Bundled Agents Guide:

 

Script entry point logging functions

For script based entry points, use the functions described in this section for message logging purposes.

Note: Symantec recommends that you do not use the halog command in script entry points.

 

The logging functions are available in the ag_i18n_inc module.
VCSAG_SET_ENVS: See “VCSAG_SET_ENVS” on page 110.
VCSAG_LOG_MSG: See “VCSAG_LOG_MSG” on page 113.
VCSAG_LOGDBG_MSG: See “VCSAG_LOGDBG_MSG” on page 114.
VCSAG_CONSOLE_LOG_MSG: Logs a message to the HAD log file.

Using the functions in scripts


The script-based entry points require a line that specifies the file defining the logging functions. Include the following line exactly once in each script. The line should precede the use of any of the log functions.

 

■ Shell Script include file
. ${VCS_HOME:-/opt/VRTSvcs}/bin/ag_i18n_inc.sh
■ Perl Script include file
use ag_i18n_inc;


Besides this recommendation the ag_i18n_inc is very convenient to use. See these examples:

 

VCSAG_LOG_MSG "I" "This is a message from cron";

VCSAG_LOGDBG_MSG 5 "This is a debug message from cron";

 

I hope this helps.

 

Regards

 

Manuel

Message Edited by M. Braun on 01-20-2009 05:29 AM

Peter_Whelan
Level 3

Hi Manuel,

 

Great, that works perfectly. I'll remove halog from resource scripts and use these in future

Thanks for the help

 

Rgds

Peter