Ops Center Automator CLI commands
Ops Center Automator gives a set of CLI commands.
When running Ops Center Automator in a Windows-based OS, navigate to <system-drive>\Program Files\hitachi\Automation\bin, (when running Linux OS, navigate to /opt/hitachi/Automation/bin) then open the command prompt to run the following Ops Center Automator CLI commands.
The backupsystem command backs up the system configuration and database information in the specified folder.
The syntax is:
backupsystem {/dir directoryname [/auto] | /help}
where:
- /dir is an absolute or relative folder path that contains backup data.
- /auto directs the Ops Center Automator, Common Component services and database to start and stop automatically.
Common-component-Installation-folder\ClusterSetup\hcmds64clustersrvstate.bat /soff /r group-name
The deleteremoteconnection deletes the agentless connection-destination definitions registered through Ops Center Automator based on the definition ID derived with the listremoteconnections command.
The syntax is:
deleteremoteconnection {/id definition-ID [/user username | /user username /passwordfile passwordfile]
[/authmode local | external] | /help}
where:
- /id is the single-byte numerical ID (between 1 - 64 characters in length) of the agentless connection-destination definition information to delete; if the specified ID does not exist, an error is generated.
- /user is a user ID.
- /passwordfile is a password file (with absolute or relative path) that includes the encrypted user credentials for the selected user.
- /authmode local | external specifies the authentication type, either local or external. Specify local to authenticate locally with Automator. Specify external to authenticate with Common Services. If this option is not specified, Ops Center Automator operates in the authentication mode specified by the command.auth.mode of command_user.properties.
The deleteservicetemplate command deletes a service template.
The syntax is:
deleteservicetemplate {/name service-template-key-name /vendor
vendor-ID /version XX.YY.ZZ [/user username | /user username /passwordfile passwordfile]
[/authmode local | external] | /help}
where:
- /name is the key name of a service template.
- /vendor is the vendor ID of a service template.
- /version is a version of a service template.
- /user is a user ID.
- /passwordfile is a password file (with absolute or relative path) that includes the encrypted user credentials.
- /authmode local | external specifies the authentication type, either local or external. Specify local to authenticate locally with Automator. Specify external to authenticate with Common Services. If this option is not specified, Ops Center Automator operates in the authentication mode specified by the command.auth.mode of command_user.properties.
The encryptpassword command creates a file that includes an encrypted user name and password. You can specify the password file instead of the password for any Ops Center Automator command that allows the /passwordfile option.
The syntax is:
encryptpassword {[/user username] /passwordfile passwordfile [/authmode local | external ] | /help }
where:
- /user is the ID of the user who is added to the password file.
- /passwordfile is the name of the password file (with absolute or relative path) that includes the encrypted user credentials.
- /authmode local | external specifies the authentication type, either local or external. Specify local to authenticate locally with Automator. Specify external to authenticate with Common Services. If this option is not specified, Ops Center Automator operates in the authentication mode specified by the command.auth.mode of command_user.properties.
The importservicetemplate command imports a service template.
The syntax is:
importservicetemplate
{/file service-template [/user username | /user username /passwordfile passwordfile] [/authmode local | external ] | /help}
where:
- /file is the service template file to import.
- /user is a user ID.
- /passwordfile is a password file (with absolute or relative path) that includes the encrypted user credentials.
- /authmode local | external specifies the authentication type, either local or external. Specify local to authenticate locally with Automator. Specify external to authenticate with Common Services. If this option is not specified, Ops Center Automator operates in the authentication mode specified by the command.auth.mode of command_user.properties.
The listremoteconnections command outputs a listing of the agentless connection-destination definitions registered in Ops Center Automator to a CSV formatted file.
The syntax is:
listremoteconnections {/file output-file [/user username | /user username /passwordfile passwordfile] [/authmode local | external ]
| /help}
where:
- /file is the path of the file to which the list is output; if the specified file already exists, an error is generated.
- /user is the name of the user executing the command. The user name can consist of any single-byte alphanumeric characters including ( ! # $ % & ' ( ) * + - . = @ \ ^ _ |) from 1 - 256 characters in length. The user name is case sensitive.
- /passwordfile is a password file (with absolute or relative path) that includes the encrypted user credentials for the selected user.
- /authmode local | external specifies the authentication type, either local or external. Specify local to authenticate locally with Automator. Specify external to authenticate with Common Services. If this option is not specified, Ops Center Automator operates in the authentication mode specified by the command.auth.mode of command_user.properties.
The listservices command exports a list of services or a list of service templates to a CSV file.
The syntax is:
listservices {/output {services | servicetemplates} /file output-file
[/encoding encoding] [/user username | /user username /passwordfile passwordfile] [/authmode local | external ] | /help}
where:
- /output is either services (export services) or servicetemplates (export service templates).
- /file is the output file path.
- /encoding is the encoding of the output file, either UTF-8 or Shift_JIS.
- /user is a user ID.
The Submit role is required to output services list. The Modify role is required to output service templates list.
- /passwordfile is a password file (with absolute or relative path) that includes the encrypted user credentials for the selected user.
- /authmode local | external specifies the authentication type, either local or external. Specify local to authenticate locally with Automator. Specify external to authenticate with Common Services. If this option is not specified, Ops Center Automator operates in the authentication mode specified by the command.auth.mode of command_user.properties.
The listtasks command exports a list of services or a list of tasks to a CSV file.
The syntax is:
listtasks {[/startrange {yyyy-mm-dd | ,yyyy-mm-dd
| yyyy-mm-dd, yyyy-mm-dd}] /output {tasks |
histories | taskdetails} {/file outputfile
| /taskdetaildir directoryname} [/encoding encoding]
[/user username | /user username /passwordfile passwordfile] [/authmode local | external] | /help}
where:
- /startrange is the date range of the task start date. Use this to limit the contents of the list to tasks run within a specific period of time.
- /output is either of the following output data types: tasks (export tasks), histories (export histories), taskdetails (export task with properties)
- /file is an output file with an absolute or relative path.
- /taskdetaildir is an output file with an absolute or relative path. /taskdetaildir is required instead of /file when /output taskdetails is specified.
- /encoding is the encoding of the output file, either UTF-8 or Shift_JIS
- /user is a user ID. The Admin role is required to output taskdetails.
- /passwordfile is the absolute or relative path of the password file.
- /authmode local | external specifies the authentication type, either local or external. Specify local to authenticate locally with Automator. Specify external to authenticate with Common Services. If this option is not specified, Ops Center Automator operates in the authentication mode specified by the command.auth.mode of command_user.properties.
The restoresystem command restores the system configuration and database information from the specified folder where the data was backed up.
The syntax is:
restoresystem {/dir directoryname [/auto] | /help}
where:
- /dir is an absolute or relative folder path that contains data that is backed up by the backupsystem command
- /auto directs the Ops Center Automator, Common Component services and database to start and stop automatically.
Common-component-Installation-folder\ClusterSetup\hcmds64clustersrvstate.bat /soff /r group-name
The setremoteconnection command adds or updates agentless connection-destination definitions in Ops Center Automator through a CSV file.
The syntax is:
setremoteconnection {/file input-file
[/user username | /user username /passwordfile passwordfile]
[/authmode local | external] | /help}
where:
- /file is the path of the file that contains the agentless connection-destination definitions to be added or updated; if the specified file does not exist, an error is generated. Absolute paths and relative paths are both acceptable.
- /user is the name of the user executing the command. The user name can consist of any single-byte alphanumeric characters including ( ! # $ % & ' ( ) * + - . = @ \ ^ _ |) from 1 - 256 characters in length. The user name is case sensitive.
- /passwordfile is a password file (with absolute or relative path) that includes the encrypted user credentials for the selected user.
- /authmode local | external specifies the authentication type, either local or external. Specify local to authenticate locally with Automator. Specify external to authenticate with Common Services. If this option is not specified, Ops Center Automator operates in the authentication mode specified by the command.auth.mode of command_user.properties.
The setupcluster command sets up an Ops Center Automator cluster environment.
The syntax is:
setupcluster {/exportpath exportpath | /help}
where :
- /exportpath is the absolute or relative path of the folder on a shared disk used to store the database and server information.
The stoptask command stops a running task.
The syntax is:
stoptask {/taskid task-ID [/user username | /user username /passwordfile passwordfile] [/authmode local | external] | /help}
where:
- /taskid
is a task ID. You can confirm the task ID from the Task
Details window, output of
submittask
command, output oflisttasks
command. - /user is a user ID.
- /passwordfile is the absolute or relative path of the password file.
- /authmode local | external specifies the authentication type, either local or external. Specify local to authenticate locally with Automator. Specify external to authenticate with Common Services. If this option is not specified, Ops Center Automator operates in the authentication mode specified by the command.auth.mode of command_user.properties.
The submittask submits a task for a service.
For more information, see the submittask command section.
setupcommonservice command
The setupcommonservice command is a setting command for linking with Common Services. The setupcommonservice command registers Ops Center Automator as an application in Common Services and sets Ops Center Automator as an authentication server that uses Common Services.
The setupcommonservice command registers the Ops Center Automator URL in Common Services. The URL to be registered uses the URL registered in the hcmds64chgurl command. Confirm in advance that the URL registered in hcmds64chgurl can be resolved by the browser, then run the setupcommonservice command.
This command needs a secure connection between Ops Center Common Services and Ops Center Automator.
Windows syntax:
setupcommonservice {[/csUri CommonServiceUri | /csUri CommonServiceUri /csUsername CommonServiceUsername] [/appName ApplicationName] [/appDescription ApplicationDescription] [ /auto ] | /help }
Linux syntax:
setupcommonservice {[-csUri CommonServiceUri | -csUri CommonServiceUri -csUsername CommonServiceUsername] [-appName ApplicationName] [-appDescription ApplicationDescription] [ -auto ] | -help }
Option | Description |
csUri | Specify the URL of Common Services. (For example: https://common.service/portal) |
csUsername | Specify a user with opscenter-security-administrator privileges
to be managed by Common Services. The username can be
1-byte alphanumeric characters. This includes (! # $% & '() *
+-. = @ ^ _ |). The length is from 1 to 255 characters. Usernames
are case-sensitive. You are prompted to enter the password when you run the command with this option. |
appName | Specify the name of the Ops Center Automator to be displayed by Common Services. The name is specified with 1 to 128 characters. If appName is omitted at the time of new registration, the host name or IP address of Ops Center Automator is set as the name. If appName is omitted when updating, the name is not changed. |
appDescription | Specify a description of the Ops Center Automator displayed by Common Services. The description can be from 0 to 512 characters. |
auto | Automatically start and stop the services and databases of Ops Center Automator. |
changemode command
The changemode command allows you to change the performance mode for Ops Center Automator. There are two performance modes, standard and high performance.
Standard mode
This is the default mode which supports running a single Online Migration with Configuration Manager task.
High performance mode
Use high performance mode if you need to run multiple Online Migration with Configuration Manager tasks concurrently. If you select this mode, you will need to change the
logger.TA.MaxFileSize
andplugin.threadPoolSize
parameters in config_user.properties. For more information, see "Changing the system configuration" in the Hitachi Ops Center Automator Installation and Configuration Guide.
changemode {/mode {standard| highPerformance} [/auto] | /print | /help}
Option | Description |
/mode | Specify a performance mode, either standard (standard mode) or highPerformance* (high performance mode). |
/auto | Optionally stop and start services that use Common Component and HiRDB automatically. To specify this option in a cluster environment, the services registered in the cluster software must be offline. |
Output the current mode. | |
/help | Display command help. |
*: If you change the mode to highPerformance, you need to change the
logger.TA.MaxFileSize and plugin.threadPoolSize
parameters in config_user.properties. For more information, see
"Changing the system configuration" in the Hitachi Ops Center Automator Installation and Configuration Guide. |
Ops Center Automator users must have Administrator permissions in Window or root permissions in Linux.
The following table lists the changemode command return codes and descriptions.
Return code | Description |
0 | The command succeeded. |
1 | The argument is not valid. |
2 | The command stopped. |
3 | The service status is not valid. |
4 | An exclusion error has occurred. |
101 | Cannot change the mode because it failed due to a cause other than those listed above. |
90 | Cannot start or stop the service. |
255 | The command stopped because of an error not in this table. |
changemode /mode highPerformance
changemode /mode standard /auto
changemode /print
# changemode /mode highPerformance KNAE03000-I The changemode command will now start. KNAE03542-I Changed to high performance mode. Set the following values in config_user.properties: logger.TA.MaxFileSize=100240 plugin.threadPoolSize=100 After updating config_user.properties, restart the service. KNAE03001-I The changemode command ended normally.
submittask command
The submittask command submits a service for execution using the specified service name, service group name, and property options, and returns the task ID as the execution output of the command.
The submittask command has four functions:
- Immediate execution of a service.
- Scheduled execution of a service.
- Recurrent execution of a service.
- Reregistration of tasks.
If this option is specified, you can reregister tasks that were output by the listtasks command with the taskdetails option.
submittask {/servicename ServiceName [/servicegroup ServiceGroup]
[/taskname TaskName]
[/taskdescription TaskDescription]
[{[/property Key "Value"]... | /propertyfile PropertyFile}]
[/user UserName | /user UserName /passwordfile PasswordFile]
[/wait]
[/authmode local | external]
| /help}
submittask {/servicename ServiceName
[/servicegroup ServiceGroup]
[/taskname TaskName]
[/taskdescription TaskDescription]
[{[/property Key "Value"]... | /propertyfile PropertyFile}]
[/user UserName | /user UserName /passwordfile PasswordFile]
/scheduledate yyyy-mm-dd
/scheduletime hh:mm
[/authmode local | external]
| /help}
Syntax: Recurrent execution of a service
submittask {/servicename ServiceName
[/servicegroup ServiceGroup]
[/taskname TaskName]
[/taskdescription TaskDescription]
[{[/property Key "Value"]... | /propertyfile PropertyFile}]
[/user UserName | /user UserName /passwordfile PasswordFile]
/recurrencepattern {daily[:{1h|2h|3h|4h|6h|8h|12h|24h}] |
weekly:sun,mon,...,sat | monthly:{dd,dd,...,dd
[,endofmonth] | endofmonth}}
/recurrencetime hh:mm /recurrencestart yyyy-mm-dd
[/authmode local | external]
| /help}
submittask {/reregister
/taskdetaildir DirectoryName
[/setoriginalsubmitter]
[/user UserName | /user UserName /passwordfile PasswordFile]
[/authmode local | external]
| /help}
- To run this command, you must have the Admin, Modify, or Submit role in Ops Center Automator and Administrator permission for the OS.
- You cannot run services that are in a service group whose role is not set.
- The service you want to run must belong to the service group with a role that is assigned by the user group. The user must belong to the user group.
Option | Description |
/servicename |
Specify a service name. The name of a service you want to submit. The service name can be 1 to 128 characters long. |
/servicegroup |
Specifies a service group to which the service belongs. The name of the service group that the service belongs to. This is an optional parameter. If you omit this option, the service group that is associated with the user who is specified in the /user option is used. However, if more than one service group is associated with that user, an error occurs. The service group name can be 1 to 80 characters long and consists of half-width alphanumeric characters and _ (underscore). |
/taskname |
Specify a task name. The name of the task. If you omit this option, the system defaults to service-name_YYYYMMDDhhmmss, where service-name is the value of the /servicename option and YYYYMMDDhhmmss is the time when the service runs. The task name can be 1 to 128 characters long and can consists of any characters except control characters ('\u0000'~'\u001F' or \u007F'~'\u009F'). This is an optional parameter. |
/taskdescription |
Specify a task description. The description of the task. The description can be 1 to 256 characters long and can consists of any characters except control characters ('\u0000'~'\u001F' or \u007F'~'\u009F'). This is an optional parameter. |
/property |
Specify a property key and value. One or more property key-value combinations that are used by the service to be performed. If a property value is not set for a key, the default value used. If the value of a required property key is not set, then an error occurs. You cannot specify both the /property and the /propertyfile options. If you do, then an error occurs. You can specify
this option more than one time, for example,
|
/propertyfile |
Specify a properties file. Use an absolute or relative path. The name of a properties file, including an absolute or relative path, that defines the property settings that the service you want to perform uses. Property keys and values that are not specified in the properties file are set to default values. If you do not specify a required property key and that key has no default value, then an error occurs. This option and the /property option cannot be specified at the same time. If both options are specified, then an error occurs. Additional requirements:
If you add a suffix @FILE to the key, it is possible to specify a text file to value. For example, key@FILE=C:\properties\valuefile.txt. |
/user |
Specify a user ID. The ID for the Ops Center Automator user who has access permission to run the service. The ID can be 1 to 256 half-width alphanumeric characters. It can consist of any characters, except the following: ! # $ % & ( ) * + - . = @ \ ^ _ |. The ID is not case-sensitive. |
/passwordfile |
Specify a password file. Use an absolute or relative path. The absolute or relative path to the password file for the user who is specified in the /user option. You can create a password file by using the encryptpassword command. |
/wait |
Wait for a task to finish. Shows the task execution result (normal termination or failure). If the /wait option is not specified, the command ends without waiting for the task to end. In this case, a message reporting the task ID is provided only when the task execution has started normally. |
/scheduledate |
Specify a date for executing a service. When this option is specified, any of the following conditions will result in an error:
Format: Specify the date in the form of "yyyy-mm-dd." Specify the year as yyyy in four digits. Specify the month as mm in the range 1 (or 01) to 12. Specify a day as dd in the range 1 (or 01) to 31. |
/scheduletime |
Specify a time for executing a service. When this option is specified, any of the following conditions will result in an error:
Specify the time in the form of "hh:mm." Specify hours as hh in the range 0 (or 00)-23. Specify minutes as mm in the range 0 (or 00)-59. |
/recurrencepattern |
Specify a pattern for a recurring service. Use this option with the /recurrencetime option, and the /recurrencestart option. When this option is specified, the following conditions will result in an error:
Recurrence options and formats:
|
/recurrencetime |
Specify the execution time for a recurring service. Use this option with the /recurrencepattern option, and the /recurrencestart option. When this option is specified, the following conditions will result in an error:
Format: Specify the time in the form of "hh:mm." Specify hours as hh in the range 0 (or 00) to 23. Specify minutes as mm in the range 0 (or 00) to 59. |
/recurrencestart |
Specify a date for a recurring service to start. Use this option with the /recurrencepattern option, and the /recurrencetime option. When this option is specified, the following conditions will result in an error:
Format: Specify the date in the form of "yyyy-mm-dd." Specify the year as yyyy in four digits. Specify the month as mm in the range 1 (or 01) to 12. Specify a day as dd in the range 1 (or 01) to 31. |
/reregister |
Specify to reregister scheduled tasks. This option has no value. |
/taskdetaildir |
Specify a folder that was output by the listtasks command with the /taskdetails option. Use an absolute or relative path. The folder must be located on a local disk. The maximum path length is 180 characters. |
/setoriginalsubmitter |
Specify whether you want to reregister tasks as the user at the point in time in which task details were output. This option has no value. When this option is not specified, the user ID specified as the /user of the submittask command serves as the assigned user of the task after reregistration. |
/authmode local | external | Specify the authentication type, either local or external. Specify local to authenticate locally with Automator. Specify external to authenticate with Common Services. If this option is not specified, Ops Center Automator operates in the authentication mode specified by the command.auth.mode of command_user.properties. |
/help |
Show command syntax and usage. |
installation-folder\bin
The following table lists the submittask command return codes and descriptions.
Return code | Description |
0 | The command succeeded. |
1 | The argument is not valid. |
2 | The command stopped. |
3 | The service status is not valid. |
4 | The number of commands that can be run simultaneously is exceeded. |
5 | Communication failed. |
6 | Authentication failed. |
7 | A path is specified that is not valid. |
9 | Path not found. |
10 | Path cannot be accessed. |
14 | You do not have permission to run the command. |
17 | The interactive input value is not valid. |
130 | The service did not start. |
131 | The properties file does not exist. |
132 | The properties file has a format that is not valid. |
133 | The command with /wait option failed to get the current command status. |
134 | The task failed. |
135 | The task was canceled. |
136 | The contents of the folder specified by the /taskdetails option are not valid. |
137 | Some part of the tasks failed to be registered by the command with the /reregister option. |
138 | All tasks failed to be registered by the command with the /reregister option. |
139 |
The content of task detail folder is different from the current version or revision. |
255 | The command stopped due to an error other than the ones listed in this table. |
submittask /servicename "Execute Remote Command"
/servicegroup "Default Service Group"
/taskname "Submittask sample"
/taskdescription "This is a sample."
/property common.targetHost host01 /property common.remoteCommand ipconfig
/user Bob
submittask /servicename "Execute Remote Command"
/propertyfile "C:\temp\properties.txt"
/scheduledate 2020-01-23 /scheduletime 12:34
/user Bob
submittask /servicename "Execute Remote Command"
/propertyfile "C:\temp\properties.txt"
/recurrencepattern weekly:sun,mon,sat
/recurrencetime 12:34 /recurrencestart 2020-01-23
/user Bob
submittask /reregister /taskdetaildir "C:\temp\taskdetails"
/user Bob
listremoteconnections command
The listremoteconnections command outputs a listing of the agentless connection-destination definitions registered through Ops Center Automator to a CSV formatted file.
The listremoteconnections command performs the following functions:
- output a list of agentless connection-destination definitions that include names of connection destinations and credential information.
- The CSV file that you have output can be used as an input file for the setremoteconnection command as-is.
listremoteconnections {/file OutputFile
[/user UserName | /user UserName /passwordfile PasswordFile]
[/authmode local | external] | /help}
- Ops Center Automator users must have Admin permissions.
- Only users who have OS administrator permissions (members of the Administrators group) are allowed to run the listremoteconnections command.
-
If a user who does not have the necessary permissions runs the command, the following message appears, asking for the promotion of the user's permissions:
KNAE03226-E The user does not have permission to execute the command.
Option | Description |
/file |
Specifies the path of the file to which the list is output; if the specified file already exists, an error is generated. . |
/user |
Specifies the name of the user executing the command. The user name can consist of any single-byte alphanumeric characters including ( ! # $ % & ' ( ) * + - . = @ \ ^ _ |) from 1 - 256 characters. The user name is case-sensitive. |
/passwordfile |
Specifies a password file (with absolute or relative path) that includes the encrypted user credentials for the selected user. |
/authmode local | external | Specify the authentication type, either local or external. Specify local to authenticate locally with Automator. Specify external to authenticate with Common Services. If this option is not specified, Ops Center Automator operates in the authentication mode specified by the command.auth.mode of command_user.properties. |
installation-folder\bin
The following table lists the listremoteconnections command return codes and descriptions.
Return code | Description |
0 | The command succeeded. |
1 | The argument is not valid. |
2 | The command stopped. |
3 | The service status is not valid. |
4 | An exclusion error has occurred. |
5 | Communication failed. |
6 | Authentication failed. |
7 | A path is specified is not valid. |
8 | A file with the specified name already exists. |
9 | Path not found. |
10 | Path cannot be accessed. |
13 | Failed to output the specified file. |
14 | User does not have permission to run the command. |
17 | The interactive input value is not valid. |
220 | Failed to acquire a list of agentless connection-destination definitions. |
255 | The command stopped because of an error not in this table. |
Agentless connection destinations are output in CSV format with one host in one line and with the following data items in the order in which they are shown in the following table.
Property | Header Section (first line) | Data Section (second and subsequent lines) |
Definition ID | Id | Agentless connection-destination definition ID |
Connection destination type | Method | Connection destination can be specified as follows:
|
Connection destination | IP Address/Host Name | IP address or host name of the connection-destination host. |
Service resource group | Service Group | Service group name allocated to the agentless connection-destination definition. |
Authentication information | Authentication | Can be either of the following:
|
Protocol | Protocol | Can be any of the following:
|
SSH authentication method | SSH authentication method |
When the protocol is not SSH, null character ("") When the protocol is SSH, any one of the following:
|
User ID | User ID | User ID of the user who logs on to the connection-destination host. |
Password | Password | Fixed to "*******" |
Super user's password | Super user's password | Fixed to "*******" |
Status | Connection Status | Connection Successful, Error, Unknown, or -. |
Last connection time | Connected Time | The last connection time. |
listremoteconnections /file bbbbb /user xxxxx
KNAE03000-I The listremoteconnections command will now start. KNAE03001-I The listremoteconnections command ended normally.
KNAE03000-I The listremoteconnections command will now start. KNAE03002-E The listremoteconnections command ended abnormally (12345).
"Id","Method","IP Address/Host Name","Service Group","Authentication ","Protocol","SSH Authentication Method","User ID","Password","Super User's Password" "1","IPv4","10.197.158.107","All Service Groups","Enable","Windows","","Administrator@DOM1","********","" "10","HostName","vmc006","All Service Groups","Enable","SSH","Password Authentication","ao","********","********" "100","IPv6","fd00::6172:839:2e15:f6f3:da7e"," All Service Groups ","Enable","Telnet","","","","" "1000","HostName","vmc007"," All Service Groups ","Disable","","","","",""
setremoteconnection command
The setremoteconnection command adds or updates agentless connection-destination definitions in Ops Center Automator through a CSV file.
The setremoteconnection command adds or updates agentless connection-destination definitions in Ops Center Automator. To add or update agentless connection-destination definitions, you define the information in a CSV file and then specify the file name as a command argument.
setremoteconnection {/file Input File
[/user UserName | /user UserName /passwordfile PasswordFile]
[/authmode local | external]| /help}
- Ops Center Automator users must have Administrator permissions (members of the OS Administrators group) to run the setremoteconnection command.
-
If a user without the necessary permissions runs the command, the system generates the following message:
Option | Description |
/file | Specifies the path of the file that contains the agentless connection-destination definitions to add or update. If the specified file does not exist, the system generates an error. Both absolute and relative paths are allowed. |
/user | Specifies the name of the user running the command. The user name must be between 1 and 256 characters in length and consist of single-byte alphanumeric characters including ( ! # $ % & ' ( ) * + - . = @ \ ^ _ |). The user name is case sensitive. |
/passwordfile | Specifies a password file (with an absolute or relative path) that includes the encrypted user credentials for the specified user. |
/authmode local | external | Specify the authentication type, either local or external. Specify local to authenticate locally with Automator. Specify external to authenticate with Common Services. If this option is not specified, Ops Center Automator operates in the authentication mode specified by the command.auth.mode of command_user.properties. |
installation-folder\bin
The following table lists the setremoteconnection command return codes and descriptions:
Return code | Description |
0 | The command succeeded. |
1 | The argument is not valid. |
2 | The command stopped. |
3 | The service status is not valid. |
4 | An exclusion error occurred. |
5 | Communication failed. |
6 | Authentication failed. |
7 | A path is specified that is not valid. |
9 | Path not found. |
10 | Path cannot be accessed. |
14 | User does not have permission to run the command. |
17 | The interactive input value is not valid. |
230 | Format of the agentless connection-destination definition is not valid. |
231 | Registration of some of the agentless connection-destination definitions failed. |
232 | Registration of all of the agentless connection-destination definitions failed. |
255 | The command stopped because of an error not in this table. |
The agentless connection-destination definition file that you specify for the /file option uses the same basic format that is used in the output generated by the listremoteconnections command.
The agentless connection-destination definition file differs depending on the environment as follows:
- In a Windows-based OS environment: Uses character encoding MS932 and line feed code CR+LF.
- In a Linux OS environment: Uses the character encoding that is specified for the user's LANG environment variable and uses the line feed code LF.
Data item | Description |
Definition ID (Id) | Specifies the ID of the agentless connection-destination definition to update. If a null character is specified, the agentless connection-destination definitions are registered as an addition. If the agentless connection-destination definition of the specified ID does not exist, the system generates an error. |
Connection destination type (Method) | Specifies any of the following connection destination types:
|
Connection destination (IP Address/Host Name) | Specifies the IP address or host name of the connection-destination host. |
Service resource group (Service Group) | Specifies the service group to allocate to the agentless connection-destination definition. Note: This parameter is ignored from v8.5.1 onward because agentless connection settings are allocated to infrastructure groups. |
Authentication information (Authentication) | Specifies whether to set authentication information:
When the system displays the message "Authentication information is not set," any additional data is ignored. However, the data item is still required. |
Protocol (Protocol) | Specifies one of the following protocols:
|
SSH authentication method (SSH Authentication Method) | Specifies the SSH authentication method:
|
User ID (User ID) | Specifies the User ID used to log on to the connection-destination host when the protocol is Windows or SSH. This parameter is required. |
Password (Password) | Specifies the password of the user ID used to log on to the connection-destination host. This parameter is required in some cases and not in others as follows: Case 1: When no definition ID is specified (when adding a definition).
Case 2: A definition ID is specified (when updating a definition).
|
Super user's password (Super User's Password) | Specifies the password of a super user of the connection-destination host. When the protocol is SSH or Telnet, this parameter is optional.
|
Status (Connection Status) | Specifies either Connection Successful, Error, Unknown, or "-" depending on the status. |
Last connection time (Connected Time) | Specifies the last connection time. |
The following lists includes details about the behavior of the setremoteconnections command when specifying an agentless connection-destination definition file for the /file option:
- The first line of the file is the header section output by the setremoteconnections command and is ignored unconditionally. The second and subsequent lines are treated as agentless connection-destination definitions.
- When you specify two or more agentless connection-destination definitions in the file, a single syntax error in either definition causes the command to end with an error, and no agentless connection-destination definitions are registered.
- The values of the data items output by the listremoteconnections command in CSV format are enclosed in double quotation marks ("). However, if the values are not enclosed by double quotation marks, they are not treated as errors. (This is because when you edit a CSV file in Excel, double quotation marks are removed).
- If the value of the first data item (ID) of an agentless connection-destination definition is a null character, the specified content is added as an agentless connection-destination definition.
- If a value is specified for the first data item (ID) of an agentless connection-destination definition, the agentless connection-destination definition corresponding to the specified ID is updated with the content specified in the line. If the agentless connection destination definition corresponding to the specified ID does not exist, the system generates an error.
- When two or more agentless connection-destination definitions are specified in a file and the addition or update portion of the definitions fails, the command results are as follows:
- A return value (warning, not error) is used to report a definition that was not successfully registered.
- Information is output as a standard error, which enables you to identify the definition that was not successfully registered.
- The registration processing continues for all remaining definitions, even if an error occurs.
setremoteconnection /file bbbbb /user xxxxx
KNAE03000-I The setremoteconnection command will now start. KNAE03002-E The remote connection definition was registered (ID:12345, line number: 12345).
KNAE03000-I The setremoteconnection command will now start. KNAE03002-E The setremoteconnection command ended abnormally (12345).
KNAE03000-I The setremoteconnection command will now start. KNAE03333-E A required parameter was not found (parameter name: XXXXX, line number: 12345). Specify the required parameter, and then try again. KNAE03334-E Unnecessary parameter has been specified (parameter name: XXXXX, line number: 12345). Delete the specified parameters, and then try again. KNAE03002-E The setremoteconnection command ended abnormally (12345).
deleteremoteconnection command
The deleteremoteconnection command deletes the agentless connection-destination definitions registered through Ops Center Automator based on the definition ID derived with the listremoteconnections command.
The deleteremoteconnection command performs the following function:
- Deletes a succession of agentless connection-destination definitions based on their definition IDs. To determine the definition ID of the agentless connection-destination definition, use the listremoteconnections command.
deleteremoteconnection {/id Definition ID
[/user UserName | /user UserName /passwordfile PasswordFile]
[/authmode local | external]
| /help}
- Ops Center Automator users must have Admin permissions.
- Only users who have OS administrator permissions (members of the Administrators group) are allowed to run the deleteremoteconnection command.
- If a user who does not have the necessary permissions runs the command, the following message is visible requesting promotion of the user's permissions:
Option | Description |
/id |
Specifies the single-byte numerical definition ID (between 1 - 64 characters) of the agentless connection-destination definition information to be deleted. If the specified ID does not exist, an error is generated. |
/user |
Specifies the name of the user (must have Admin permission) executing the command. The user name can consist of any single-byte alphanumeric characters including ( ! # $ % & ' ( ) * + - . = @ \ ^ _ |) from 1 - 256 characters in length. The user name is case sensitive. |
/passwordfile |
Specifies a password file (with absolute or relative path) that includes the encrypted user credentials for the selected user. |
/authmode local | external | Specify the authentication type, either local or external. Specify local to authenticate locally with Automator. Specify external to authenticate with Common Services. If this option is not specified, Ops Center Automator operates in the authentication mode specified by the command.auth.mode of command_user.properties. |
installation-folder\bin
The following table lists the deleteremoteconnection command return codes and descriptions.
Return code | Description |
0 | The command succeeded. |
1 | The argument is not valid. |
2 | The command stopped. |
3 | The service status is not valid. |
4 | An exclusion error has occurred. |
5 | Communication failed. |
6 | Authentication failed. |
14 | The user does not have permission to run the command. |
17 | The interactive input value is not valid. |
240 | Failed to delete an agentless connection-destination definition |
255 | The command stopped due to an error other than the ones listed in this table. |
deleteremoteconnection /id 12345 /user xxxxx
KNAE03000-I The deleteremoteconnection command will now start. KNAE03001-I The deleteremoteconnection command ended normally.
KNAE03000-I The deleteremoteconnection command will now start. KNAE03002-E The deleteremoteconnection command ended abnormally (12345).