Download PDF
Download page Administer the Enterprise Console.
Administer the Enterprise Console
To administer the Enterprise Console via the command line, you must log and establish a valid session with the command ./platform-admin.sh login --user-name=admin --password=password
. For complete command line usage, see Enterprise Console Command Line.
You can use the GUI or command line to perform the following platform administration tasks with the Enterprise Console:
- Create new platforms
- Remove existing platforms
- Manage credentials
- Manage hosts
platform-admin.sh
script with platform-admin.exe cli
.
Run the commands from the <Enterprise Console installation directory>/platform-admin
directory. This page contains the minimum options and parameters required to run a command.
Some commands may have more options and parameters. To see these additional options, run the command with -h
specified. For example, run the following command to see all the options and parameters for the create a platform command:
bin/platform-admin.sh create-platform -h
bin\platform-admin.exe cli create-platform -h
Start or Stop the Enterprise Console
The Enterprise Console must be running before you can perform other tasks or use the GUI.
The same user who installed the Enterprise Console should be the same user who starts or stops the Enterprise Console.
Use the following commands to start or stop the Enterprise Console:
bin/platform-admin.sh start-platform-admin
bin\platform-admin.exe cli start-platform-admin
start
with stop
.Manage Platforms
The platform is the collection of AppDynamics components and their hosts. The Enterprise Console supports up to 20 platforms at a time by default.
Create a Platform
To use the Enterprise Console for end-to-end installation and management, you must first create a platform. The Enterprise Console creates the platform when you complete the Express or Custom installations or discover existing components in the GUI.
To use the command line to create a platform, run the following command:
bin/platform-admin.sh create-platform --name <platform name> --installation-dir <platform installation directory>
bin\platform-admin.exe cli create-platform --name <platform name> --installation-dir <platform installation directory>
The platform installation directory is the absolute directory where the Enterprise Console installs all AppDynamics components on all of its hosts. Once you add a host to the platform, you can no longer change the directory. Additionally, the directory cannot contain a space.
Delete a Platform
You can use the Enterprise Console to delete a platform that is no longer in use. You may also want to consider editing the Platform's configuration instead. You can perform either action on the Platform view page of the GUI.
To use the command line to delete a platform, run the following command:
bin/platform-admin.sh delete-platform --name <platform name>
bin\platform-admin.exe cli delete-platform --name <platform name>
APPD_CURRENT_PLATFORM
variable to prevent unexpected errors when running future commands.
Manage Credentials
Manage the credentials that the Enterprise Console uses to access and perform tasks on hosts, such as adding a node to an Events Service. You can use the Credentials page in the GUI or the command line to manage credentials. You should add credentials to the platform before you add hosts.
Generate an RSA Key Pair
An RSA private key file is required to add credentials to a platform. The following steps will generate an RSA key pair that consists of the public key file ~/.ssh/id_rsa.pub
and the private key file ~/.ssh/id_rsa
.
- Log in to the Enterprise Console host machine via SSH.
Switch to the user that is the owner of the Enterprise Console:
sudo -i -u <user-owner of the EC>
BASHCreate the RSA key pair:
ssh-keygen -t rsa -b 2048 -N '' -m pem
BASHAccept the default location for the key pair at
~/.ssh
.Confirm that the RSA public and private key files have been created:
ls ~/.ssh/ id_rsa id_rsa.pub
BASH
Add Credential
When you add a credential, you need the following information:
- Credential name
- Username
Private key file
The credential name is the unique identifier for a credential and is used to specify the credential when you perform tasks such as adding a host. AppDynamics recommends that you follow the naming convention for all of your credential names. The id_rsa
, RSA private key, should be created using the OpenSSL PEM encoding format over the Open SSH standard encoding.
You can add a credential in the GUI by clicking Add.
bin/platform-admin.sh add-credential --credential-name <name> --type <ssh> --user-name <username> --ssh-key-file <file path to the key file>
Where <file path to the key file>
is the private key for the Enterprise Console machine. The installation process deploys the keys to the hosts.
Remove Credential
Remove a credential that is no longer used. You cannot remove a credential that is still used by a host. You can remove a credential in the GUI by selecting the credential and clicking Delete.
bin/platform-admin.sh remove-credential --credential-name <name>
List Current Credentials
bin/platform-admin.sh list-credentials
Manage Hosts
The hosts are the machines used to run AppDynamics components such as the Controller and Events Service. For example, the Events Service can run on the same host as the Controller, a single host, or a cluster of three or more hosts.
You must properly configure the credential you use to add a new host on a remote host. This means that for a private key that you have specified, you must add the corresponding public key to the remote host ~/.ssh/authorized_hosts
file.
The Controller and Events Service must reside on the same local network and communicate by internal network. Do not deploy the cluster to nodes on different networks, whether relative to each other or to the Controller where the Enterprise Console runs. When identifying cluster hosts in the configuration, you will need to use the internal DNS name or IP address of the host, not the externally routable DNS name.
For example, in terms of an AWS deployment, use the private IP address such as 172.31.2.19 rather than public DNS hostname such as ec2-34-201-129-89.us-west-2.compute.amazonaws.com
. You must then go to the Appserver Configurations under Controller Settings in the Enterprise Console GUI, and edit the external URL so you can access the page.
The host that runs the Enterprise Console is automatically created and added to the platform as the hostname of the Enterprise Console machine if you use the GUI to install or discover components. If you do not use the GUI, you must manually add this host.
Hosts can be managed through the Enterprise Console GUI on the Hosts page or the command line.
id_rsa
, RSA private key, should be created using the OpenSSL PEM encoding format over the Open SSH standard encoding.
Set Up Remote Hosts
To set up seamless Enterprise Console communications with remote hosts, perform the following steps:
From the command line:
1. Set up the following passwordless SSH:
- From the Enterprise Console to the Controller.
- If HA then:
- from the Enterprise Console to the primary Controller.
- from the Enterprise Console to the secondary Controller.
- From the primary Controller to the secondary Controller.
- from the secondary Controller to the primary Controller.
From the Enterprise Console:
2. Identify the Enterprise Console Linux AppDynamics user's public/private key pair (usually in ~/.ssh
).
3. Add the Enterprise Console Linux AppDynamics user's public key (~/.ssh/id_rsa.pub
) into the remote Controller server Linux user's ~/.ssh/authorized_keys
.
4. Then chmod 600 /.ssh/authorized_keys
.
5. Test the SSH connection from the Enterprise Console server with the following:
ssh <remote user>@<remote-server> hostname
6. Verify that the remote hostname is printed. You may have to first answer yes to trust the server fingerprint.
7. Access the Enterprise Console UI Credential page, and add or edit the existing credentials.
8. Create a single credential, which will likely be the same for all remote hosts, with a name like: EC-<ec linux user name>-<remote appd user name>
For example, EC-ecappduser-appduser
, or EC-appdyn
if the username is the same on the Enterprise Console and remote server.
9. Enter the remote server Linux username. It might be the same as the local Enterprise Console AppDynamics user.
10. Supply the Enterprise Console Linux user's ~/.ssh/id_rsa
contents as the private key as chosen in step 2.
Add Hosts
Before you add hosts to the platform, ensure that the required credentials are added to the platform.
You should also check that the user ID created matches those in the credentials. Additionally, the path you specify for the platform base directory must exist.
You can add a host in the GUI by clicking Add.
bin/platform-admin.sh add-hosts --hosts host_1 host_2 host_3 --credential <credential name>
Instead of listing the hosts with --hosts, you can specify a text file with a line-separated list using the following command:
bin/platform-admin.sh add-hosts --host-file <file path to host file> --credential <credential name>
If you do not use the GUI, you must add the host for the Enterprise Console. This is also the host used by the Controller and embedded Events Service. The host is named "localhost" and does not require credentials. For example, run the following command:
bin/platform-admin.sh add-hosts --hosts localhost
bin\platform-admin.exe cli add-hosts --hosts localhost
You may also use the loopback address '127.0.0.1' or the machine's actual hostname.
Remove Hosts
Before you remove a host, ensure that you remove all AppDynamics components from the host. You can remove a host in the GUI by selecting the host and clicking Remove.
bin/platform-admin.sh remove-hosts --hosts host_1 host_2 host_3
Instead of listing the hosts with --hosts
, you can specify a text file with a line-separated list using the following command:
bin/platform-admin.sh remove-hosts --host-file <file path to host file>
If a host becomes unreachable, you can use the following command to remove it:
bin/platform-admin.sh remove-dead-hosts --hosts <host name>
This removes the host and all of its associated metadata from the Enterprise Console database.
Running remove-dead-hosts
could leave various services in an inconsistent state.
List Current Hosts
bin/platform-admin.sh list-hosts
bin\platform-admin.exe cli list-hosts
Update Host Credentials
Change the credential that the Enterprise Console uses to access hosts. You can change the host credential in the GUI by selecting the host and clicking Change Credentials.
bin/platform-admin.sh update-host-credential --hosts host_1 host_2 host_3 --credential <credential name>
Similar to the add and remove host commands, you can specify a text file instead of providing a list of hosts within the command.
Manage the Enterprise Console Admin User Password
Change the Admin User Password
You can change the password for the admin user with the following command:
bin/platform-admin.sh change-password --user-name <username> --password <current password> --new-password <new password>
bin\platform-admin.exe cli change-password --user-name <username> --password <current password> --new-password <new password>
Reset the Admin User Password
You can reset the password for the Enterprise Console's root user with the following command:
bin/platform-admin.sh reset-password
bin\platform-admin.exe cli reset-password
Manage the Enterprise Console Database Root User Password
Change the Database Root User Password
To change the platformAdmin.databaseRootPassword
, follow these steps:
Stop the Enterprise Console by running the following command in
<EC_home>/Platform/platform-admin/bin
:bin/platform-admin.sh stop-platform-admin
Run the following command in
<EC_home>/Platform/mysql/bin
:bin/mysqld --defaults-file="/<EC_home>/Platform/mysql/db.cnf" --skip-grant-tables
Replace
<EC_home>
before running the command.- Open a new command prompt window.
Connect to the database without using a password by running the following command in
<EC_home>/Platform/mysql/bin
:bin/mysql -u root -h 127.0.0.1 -P 3377 --protocol=TCP
Execute the following queries:
update mysql.user set authentication_string=password('<new_password_here>') where user like 'root%'; flush privileges; quit;
Replace
<new_password_here>
before executing the queries.- Quit the command prompt.
Stop the Enterprise Console Database by running the following command in
<EC_home>/Platform/platform-admin/bin
:bin/platform-admim.sh stop-platform-admin
This is to stop the MySQL DB and start it without using the
--skip-grant-tables
option that is in the next step.Start the Enterprise Console by running the following command in
<EC_home>/Platform/platform-admin/bin
:bin/platform-admin.sh start-platform-admin
Verify the login by running the following command in
<EC_home>/Platform/mysql/bin
:bin/mysql -u root -p -P 3377 -h 127.0.0.1
Manage the Enterprise Console Database User Password
Change the platformAdmin Database User Password
To change the platformAdmin.databasePassword
, follow these steps:
Start the Enterprise Console, if it is not already running.
Run the following command, replacing<EC_home>
before running the command:<EC_home>/platform/platform-admin/bin: ./platform-admin.sh start-platform-admin
- Navigate to the
<EC_home>/platform/mysql/bin
directory. Log in to the database as the root user by running the following command:
./mysql -u root -p -h 127.0.0.1 -P 3377 --protocol=TCP
Execute the following queries, replacing
<new_password_here>
before executing the query.update mysql.user set authentication_string=password('<new_password_here>') where user like 'platformadmin%'; flush privileges; quit;
Verify the login by running the following command in the
<EC_home>/Platform/mysql/bin
directory:./mysql -u platformadmin -p -P 3377 -h 127.0.0.1
- Navigate to the
<EC_home>/platform/platform-admin/bin
directory. Run the command below to encrypt the new password that was set for
platformadmin
in step 4../platform-admin.sh encrypt --text '<new_password_here>'
In Windows environments, single quotes (
'
) are not supported on the command line. Windows users should wrap the<new_password_here>
option in double quotes ("
).Take note of the encrypted password.
- Navigate to the
<EC_home>/Platform/platform-admin/conf directory.
- Backup the
PlatformAdminApplication.yml
file. - Using a text editor, such as
vi
, open thePlatformAdminApplication.yml
file and find the encryptedpassword:
line in thedatabase:
section. - Update the encrypted password, replacing the text after the
password:
entry with the password noted after step 7 and save the changes. Stop the Enterprise Console by running the following command in the
<EC_home>/Platform/platform-admin/bin directory
:./platform-admin.sh stop-platform-admin
Start the Enterprise Console by running the following command in the
<EC_home>/Platform/platform-admin/bin directory
:./platform-admin.sh start-platform-admin
Validate that the Enterprise Console started successfully.
Change the Installation Directory
The installation directory you specify when creating the platform is used to install all AppDynamics components. This directory can be changed but requires that you uninstall all AppDynamics components.
- Uninstall all AppDynamics components that you installed.
Remove all hosts from the platform, including the localhost. For example, run the following command to remove the localhost:
bin/platform-admin.sh remove-hosts --hosts localhost
BASHChange the installation directory:
bin/platform-admin.sh update-platform --installation-dir <directory>
BASHThe installation directory cannot contain a space
After you change the installation directory, you must add hosts and reinstall AppDynamics components.
Troubleshooting Administration Tasks
Check Availability of the Enterprise Console
You can use the following API to check the availability of the Enterprise Console:
http://econsole-host:9191/service/version
Error While Adding Hosts
While adding hosts to your platform, you may run into an "Enterprise Console host expansion failed" error. If you do, you should ensure that SFTP is enabled in your sshd_config
, and restart the SSH service.