Configure Script for Locations Rule
You can add a script to run on the agent and determine which scalability server to use. Your responsibility includes delivering the script to the agent computer.
Follow these steps:
The Setting Properties dialog opens.
Note: You can specify the script location as an absolute or relative path. A relative path is relative to the ITCM installation directory, which is typically at one of the following locations:
Windows:
C:\Program Files(x86)\CA\DSM
Unix, Linux:
/opt/CA/DSM
The feature passes the following parameters to the server selection script:
Names the file where the script writes the name of the scalability server that it identifies.
Names the file where the script writes any error information it generates.
Identifies the address that matched, resulting in running this script.
The DM script is configured for the location rule.
Note: If you specify the script, leave the Scalability Server and Subnet Scan columns empty. If you are not using Subnet Scan, leave the Subnet Scan column empty.
Example:
rem ---------------------------------------------------------------------
rem Simple location aware server identification script
rem This script writes a hard coded server name to the output file
rem ---------------------------------------------------------------------
dim sMatchingAddress as string
dim sOutputFileName as string
dim sErrorFileName as string
dim X as Integer
FOR X=0 to argc()
rem Read the output file from the provided parameters
if ( argv(X)="-o") THEN
sOutputFileName = argv(X+1)
ENDIF
rem read the matching address from the provided parameters
if ( argv(X)="-a") THEN
sMatchingAddress = argv(X+1)
ENDIF
rem read the matching address from the provided parameters
if ( argv(X)="-x") THEN
sErrorFileName = argv(X+1)
ENDIF
NEXT X
dim fHandle as integer
fHandle = OpenFile(sOutputFileName,O_WRITE)
IF NOT(EOF(fHandle)) Then
WriteFile(fHandle,"sampleserver.ca.com")
CloseFile(fHandle)
exit
ENDIF
exit
|
Copyright © 2013 CA.
All rights reserved.
|
|