SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Using LogAddMessageEx on Remote Agents

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Using LogAddMessageEx on Remote Agents
Author Message
Michael Tuszynski



Joined: 07 May 2004
Posts: 30

Post Using LogAddMessageEx on Remote Agents Reply with quote

How to I use the LogAddMessageEx command to report back log entries to the master log
when running a script on a remote agent? In the master log, all I get are status
message stating that the job was successfully sent to the agent and returned.

Tue May 25, 2004 8:20 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7955

Post Re: Using LogAddMessageEx on Remote Agents Reply with quote

Simply put, you cannot use LogAddMessageEx on the remote for this purpose. To return some data back from an agent and then optionally write it to the log you can use the following technique:

On the master create 2 script type jobs and schedule one of them. The other job should have [no schedule] for the schedule. Let's call them for simplicity a "worker" and a "runner" jobs. Job "runner" is scheduled and all it does is to run the "worker" job remotely and then get some data from the remote. Here is a sample script for the "runner" job:

Dim remote_message, string
JobRemoteRun "worker", "agent name"
GetRemoteVariable "agent name", "message", remote_message
LogAddMessageEx "INFO", "id of worker job", "worker", remote_message

Copy your current script to the "worker" job. In the script replace LogAddMessageEx with the following:

Dim GLOBAL.message, string
Set GLOBAL.message, "this is the message that you want to log"

This sets value of the "message" global variable on the agent whose value is then retrieved by the "runner" job and written to the log on the master.

: How to I use the LogAddMessageEx command to report back log entries to the
: master log
: when running a script on a remote agent? In the master log, all I get are
: status
: message stating that the job was successfully sent to the agent and returned.

Tue May 25, 2004 8:54 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.