If you create a command template definition file, use the Execute Action window to run commands of other products, user programs, and resources on the Ops Center Analyzer management server. If you want to run more than one command at the same time, you can create a batch or shell command.
- Format
- specified-key-name=specified-value
- File
-
- Specify any file name and file extension.
- Save the file in UTF-8 format.
- The maximum number of files that can be set in Ops Center Analyzer (including the number of email template definition files) is 1,000. Files load in alphabetical order by file name, and any files after the 1,000th file are not loaded.
- Folder
-
Ops-Center-Analyzer-installation-folder/Analytics/conf/template/command
The default installation folder is /opt/hitachi.
- Update frequency
- When Ops Center Analyzer is started or the reloadtemplate command is run.
- Content to specify
- Specify each key name and value on a single line. The following rules apply when specifying settings in a command template definition file:
- A line starting with # is treated as a comment line.
- Blank lines are ignored.
- The entered values are case-sensitive.
- If you specify an invalid value, the default value is used.
- If you specify the same key more than once in the same file, the last specification is valid.
- To display \, specify \\.
- To display %, specify %%.
- If you specify the filter condition SE.template.filter.xxxxxxx.string more than once, settings display when all of the conditions are met.
- Setting descriptions
-
Key name
Setting description
Specifiable values
Default value
Optional or required
SE.template.name.string
Specify the action name.
Values of no more than 127 bytes that do not include control characters
This setting has no default value, because specifying this setting is required.
Required
SE.template.description.string
Specify a description of the action.
Values of no more than 255 bytes that do not include control characters
Null character
Optional
If this key is omitted, the default value is used.
SE.cmd.template.cmdName.string
Specify the name of the command to run by specifying the absolute path to the command. A command specified by its relative path might fail.
Values of no more than 255 bytes that do not include control characters
Do not specify the following strings:
& | ; $ > < ` ! ../ ..\ ( ) { }
This setting has no default value, because specifying this setting is required.
Required
SE.cmd.template.cmdArgs.string
Specify arguments for the command to run.
Values of no more than 4,096 bytes that do not include control characters
Do not specify the following strings:
& | ; $ > < ` ! ../ ..\ ( ) { }
Null character
Optional
If this key is omitted, the default value is used.
SE.cmd.template.timeOut.num
Specify the timeout period for the command to run (in milliseconds).
1 to 2,147,483,647
30,000
Optional
If this key is omitted, the default value is used.
SE.template.filter.resourceName.string
Specify conditions for the names of the resources that are starting points and that display in the action list during resource selection. 1
Values of no more than 255 bytes that do not include control characters
Null character
Optional
If this key is omitted, the default value is used.
SE.template.filter.resourceType.string
Specify conditions for the types of resources that are starting points and that display in the action list during resource selection.1
Values of no more than 32 bytes that do not include control characters
Null character
Optional
If this key is omitted, the default value is used.
SE.template.filter.vmHostname.string
Specify conditions for the virtual machine names that display in the action list during resource selection.*
Values of no more than 64 bytes that do not include control characters
Null character
Optional
If this key is omitted, the default value is used.
SE.template.filter.ipaddress.string
Specify conditions for the IP addresses that display in the action list during resource selection.1
Values of no more than 255 bytes that do not include control characters
Null character
Optional
If this key is omitted, the default value is used.
SE.template.filter.upperResourceName.string
Specify conditions for the names of higher-level resources of a starting point that display in the action list during resource selection.1
Values of no more than 512 bytes that do not include control characters
Null character
Optional
If this key is omitted, the default value is used.
SE.template.filter.upperResourceType.string
Specify conditions for the types of higher-level resources of a starting point that display in the action list during resource selection.1
Values of no more than 32 bytes that do not include control characters
Null character
Optional
If this key is omitted, the default value is used.
SE.template.filter.MultipleResources.boolean
Specify whether to execute for multiple resources.
true or false
false
Optional
If this key is omitted, the default value is used.
SE.cmd.template.usage.string
Specify how to use the command.
Values of no more than 4,096 bytes that do not include control characters
Null character
Optional
If this key is omitted, the default value is used.
* Settings display only when the Execute Action window is called from a resource that matches the specified conditions. By using variables, you can set information about a selected resource as the value of a setting.
The following table lists the variables you can use.
Variable name
Description
Remarks
%ANALYTICS_RESOURCENAME%
Name of the selected resource
N/A
%ANALYTICS_UPPERRESOURCENAME%
Name of the higher-level resource of the selected resource
N/A
%ANALYTICS_IPADDRESS%
IP address
N/A
%ANALYTICS_VIRTUALMACHINENAME%
Name of the virtual host
Displays only when the resource is a virtual machine.
%ANALYTICS_RESOURCETYPE%
Resource type
N/A
%ANALYTICS_UPPERRESOURCETYPE%
Type of the higher-level resource
N/A
If no value is set for the selected resource, a null character displays.
To display information about virtual hosts and IP addresses, VMware Tools must be installed on virtual hosts.
- Definition example where the selected resource names are specified for command arguments
-
SE.template.name.string=001_task-execution SE.template.description.string=Executes the scheduled tasks SE.cmd.template.cmdName.string=/root/commands/taskA.sh SE.cmd.template.cmdArgs.string=%ANALYTICS_RESOURCENAME%