The Structure of System Configuration Commands
This topic explains the structure of the AAI system configuration commands that you use to update the AAI system configurations. It includes examples of how to run the commands from a command-line interface or as a script. This explanation gives you a better understanding of how the commands work. However, you do not need to know this to run the commands successfully because the topics about the individual commands contain everything you need to run them.
Only some configuration settings have a command-line and script alternative. For a list of them, see Configuration Tool Command Line Interface.
This page includes the following:
Understanding: AAI System Configuration Commands Are Set via the config.jar
You use the config.jar Java application to define and change AAI system configurations properties. The file is located in the config directory of your AAI installation directory (<Full path to Install Dir>/config). When you execute a configuration command, you must ensure that this file can be found. You can do this in one of the following two ways:
- Switch to the config directory before running the command
- Include an additional argument on the command line to specify the path to the AAI installation directory. Using this approach, you can run the config.jar from another location on the same server.
The command syntax
The configuration commands are comprised of the following parts:
-
Invoking the AAI Configuration utility's config.jar Java application. If you run the command from somewhere other than directly in the AAI installation directory, the command must include the optional command-line argument for the path to the AAI installation directory.
- Basic command: java -Dswing.aatext=true -jar config.jar
- Command with optional path: java -Dswing.aatext=true -Daai.installation.dir="/<path>/Automic_Automation_Intelligence" -jar config.jar
-
Command-line arguments for the following:
- The command for the specific configuration, such as smtpconfig or snmpconfig
- The method (also known as the mode) for the command, such as create|update|delete
- Command-specific parameters or arguments (as required or optionally available), especially those to provide the configuration details
Example: Calling a Command from the config Directory
In the following example, we start in the config directory (which is located in the AAI installation directory) when we call the configuration command using the config.jar. In this example, we are calling the command to configure the SMTP connection:
java -Dswing.aatext=true -jar config.jar smtpconfig --create "/Automic_Automation_Intelligence/config/smtpconfig.properties"
java -Dswing.aatext=true -jar config.jar
invokes the AAI Configuration Tool utility.smtpconfig
is the command.--create
is the method."/Automic_Automation_Intelligence/config/smtpconfig.properties"
is the required argument that provides the full path to the properties file with the configuration settings.
Example: Calling a Command from Anywhere on the AAI Server
The following example shows how to call the command from anywhere on the server. We specify the location of the AAI installation directory when invoking the AAI Configuration utility, so that the command can locate the config.jar file, which can execute the configuration command rules. In this example, we are calling the command to configure the SMTP connection:
java -Dswing.aatext=true -Daai.installation.dir="/<path>/Automic_Automation_Intelligence" -jar config.jar smtpconfig --create "/Automic_Automation_Intelligence/config/smtpconfig.properties"
- java -Dswing.aatext=true -Daai.installation.dir="/<path>/Automic_Automation_Intelligence" -jar config.jar specifies the location of the AAI installation directory as part of invoking the AAI Configuration Tool utility.
- The rest of the command is identical to the command without this location parameter, as shown in the previous example.
Example: Using a Script
To run a configuration command from a script, you must start in the config directory in the AAI Installation directory. The config directory contains two scripts to run configuration commands
- run.bat for a Windows server
- run.sh for a Linux server
Once in the config directory, you can run a script for the configuration that you are interested in. The following example shows a script to create the SMTP configuration on a Linux server:
run.sh smtpconfig --create "/Automic_Automation_Intelligence/config/smtpconfig.properties"
The script is comprised of:
run.sh
(orrun.bat
if on Windows), which invokes the config.jar Java application for the Configuration Tool utility.smtpconfig
is the command/function for the specific configuration.--create
is the method/mode."/Automic_Automation_Intelligence/config/smtpconfig.properties"
is the required argument that provides the full path to the properties file with the configuration settings.