Create scripts in the following format.
[Windows]
Installation_folder\Manager\etc\user_scripts
[Linux]
/etc/opt/FJSVrcvmr/user_scripts
Execution_order_resource_name_execution_timing-arbitrary_line.extension
Specify as follows:
Items | Content of Description |
---|---|
Execution order | Describe the script execution order. Specify a two-digit integer. When specifying the same execution order in multiple scripts, the order is not guaranteed. |
Resource name | For details on resource names, refer to "Names of Resources and Operations which are the Targets of Script Startup before and after Operations". |
Execution timing | When executing scripts either before or after operations start, specify as follows:
For details on operation names, refer to "Names of Resources and Operations which are the Targets of Script Startup before and after Operations". |
Arbitrary character string (optional) | Specify the arbitrary character string without using blank spaces. Any characters except blank spaces can be used for the filename, and its length can be up to the maximum character string length supported by the OS. When deploying multiple scripts for the same operation, users can specify a character string to distinguish the usage of the script. |
Extension | [Windows] [Linux] |
Example
Name of script for operations after creating an L-Server
01_lserver_post_create-sample.bat
Name of script for operations before stopping an L-Server
00_lserver_pre_start.sh
Names of Resources and Operations which are the Targets of Script Startup before and after Operations
The names of resources and operations which are the targets of script startup before and after operations are as follows:
Resource Name | Operation Name | |
---|---|---|
lserver (common to physical L-Servers and virtual L-Servers) | Creating an L-Server | create |
Deleting an L-Server | delete | |
Starting an L-Server | start | |
Stopping an L-Server | stop |
Exit Status
This command returns the following statuses:
The command executed successfully.
An error has occurred.
Standard Output and Errors
Standard output and errors are output in the following folders:
[Windows]
Installation_folder\Manager\var\script_log
[Linux]
/opt/FJSVrcvmr/var/script_log
Standard output and errors are output in the folders with the following names:
Standard Output
Output_date_script_name_stdout.txt
Standard Error
Output_date_script_name_stderr.txt
Temporary Files
Scripts are used to output information as temporary files when events occur.
For details on output data, refer to "Table 5.3 Meanings and Values of Variables".
[Windows]
Installation_folder\Manager\var\tmp\rcxtempfile
[Linux]
/opt/FJSVrcvmr/var/tmp/rcxtempfile
Execution timing.tmp.xx.xx
The file name above with the full path name is created as the first argument.
The scripts created by users are executed at the timing when a file name is described.
The information which user scripts will receive is as follows:
Temporary files are output in the following format.
Variable name= Value |
Line break codes are as follows:
[Windows]
CR+LF
[Linux]
LF
The meanings and values of variables are as follows:
Variable | Meaning | Value |
---|---|---|
EVENT | Character string displayed in the event column of ROR console when an event occurs | Character string enclosed by double quotes (") |
PROGRESS | Timing at which an event occurs |
|
TASK_ID | Task ID which is the target of operation | Character string enclosed by double quotes (") When the operation target is not a task: "" |
RESOURCE_NAME | Name of the resource which is the target of operation | Character string enclosed by double quotes (") |
RESOURCE_TYPE | Type of the resource which is the target of operation | Character string enclosed by double quotes (") |
RESOURCE_ID | ID of the resource which is the target of operation | Character string enclosed by double quotes (") |
TENANT_NAME | Name of the tenant which is the target of operation | Character string enclosed by double quotes (") When not belonging to a tenant: "" |
TENANT_ID | ID of the tenant which is the target of operation | Character string enclosed by double quotes (") When not belonging to a tenant: "-" |
TIME | Time an event occurred | YYYY-MM-DD HH:MM:SS |
CLIENT_IP | IP address of the client executing an operation | XX.XX.XX.XX |
USER_ID | ID of the user executing an operation | Character string enclosed by double quotes (") When the command is executed by the special administrator: "" |
USER_NAME | Name of the user executing an operation | Character string enclosed by double quotes (") When the command is executed by the special administrator: "" |
USER_GROUP_ID | User group ID | Character string enclosed by double quotes (") When the operation target is not a task: "" |
USER_GROUP_NAME | User group name | Character string enclosed by double quotes (")
|