Management Gateway Administration Tasks
Some administration tasks may be required after installing a Management Gateway.
Update Management Gateway Properties
Management Gateway Port
GatewayPort
property from the
gateway.properties
file.
- On Linux platforms, the
gateway.properties
file is located under:/opt/oracle/mgmt_agent/plugins/GatewayProxy/stateDir/config
. - On Windows platforms, the
gateway.properties
file is located under:C:\Oracle\mgmt_agent\plugins\GatewayProxy\stateDir\config
.
To change the Management Gateway port value, edit the
gateway.properties
file and replace the current value of the
GatewayPort
property with the desired port number.
gateway.properties
file, the
Management Gateway service must be restarted.
-
For Oracle Linux 6, use:
/sbin/initctl restart mgmt_gateway
-
For Oracle Linux 7, use:
systemctl restart mgmt_gateway
-
For Windows, use:
net stop mgmt_gateway net start mgmt_gateway
If the GatewayPort
property value changes then any
Management Agents using that Management Gateway must be changed to use the new port
value. For details, see Update Management Agents after Changes to Management Gateway Configuration
Management Gateway Credentials
The Gateway is typically configured to use credentials: username and password are required to connect to it.
Such credentials are stored in Oracle Wallets. For information about how to add, update or delete credentials, see Configure Management Gateway Credentials.
If the Management Gateway credentials change, then any Management Agents using the Management Gateway must be changed to use the new credentials. For information, see Update Management Agents after Changes to Management Gateway Configuration.
Configure Management Gateway Credentials
This section describes how to manage credentials which may be needed for Management Gateway.
The Management Gateway stores sensitive information, such as credentials, in Oracle Wallets.
After installing a Management Gateway, you may need to configure credentials.
If changes have been made using the CLI commands, the gateway must be restarted. For information about CLI commands, see Oracle Cloud Infrastructure CLI Command Reference.
Add or Update Credentials
To add credentials or update existing ones, use the gateway_credentials
script with the upsertCredentials
operation.
- Linux: The
gateway_credentials.sh
script is located in the/opt/oracle/mgmt_agent/plugins/GatewayProxy/stateDir/bin
directory. - Windows: The
gateway_credentials.bat
script is located in theC:\Oracle\mgmt_agent\plugins\GatewayProxy\stateDir\bin
directory.
-
Create a text file with the username and password for the gateway:
GatewayUsername=<USER_NAME> GatewayPassword=<USER_PASSWORD>
For example:GatewayUsername=oracle2 GatewayPassword=welcomepwd
For example, you can save the text file as cred.properties.
-
Add credentials using a text file.
-
For Linux, use:
gateway_credentials.sh -o upsertCredentials
For example, you can run the following on Linux using the
cred.properties
file:cat cred.properties | sudo -u mgmt_agent sh /opt/oracle/mgmt_agent/plugins/GatewayProxy/stateDir/bin/gateway_credentials.sh -o upsertCredentials
-
For Windows, use:
gateway_credentials.bat -o upsertCredentials
For example, you can run the following on Windows using thecred.properties
file::type cred.properties | C:\Oracle\mgmt_agent\plugins\GatewayProxy\stateDir\bin\gateway_credentials.bat -o upsertCredentials
-
-
Delete the text file created in step 1.
The text file contains sensitive information. Customers are responsible for deleting the credentials text file after completing the add or update credentials operation.
Delete Credentials
To delete credentials, use the gateway_credentials
script with the deleteCredentials
operation.
- Linux:
The
gateway_credentials.sh
script is located in the/opt/oracle/mgmt_agent/plugins/GatewayProxy/stateDir/bin
directory.Syntax:gateway_credentials.sh -o deleteCredentials
Example:sudo -u mgmt_agent sh /opt/oracle/mgmt_agent/plugins/GatewayProxy/stateDir/bin/gateway_credentials.sh -o deleteCredentials
- Windows:
The
gateway_credentials.bat
script is located in theC:\Oracle\mgmt_agent\plugins\GatewayProxy\stateDir\bin
directory.Syntax:gateway_credentials.bat -o deleteCredentials
Example:C:\Oracle\mgmt_agent\plugins\GatewayProxy\stateDir\config\bin\gateway_credentials.bat -o deleteCredentials
Deleting credentials does not delete the wallet that contained the credentials.
Update Management Agents after Changes to Management Gateway Configuration
If the Management Gateway configuration changes, the Management Agent may also have to be changed.
-
Gateway host: If the Gateway is moved to another host, or if the Gateway host is renamed, then any Agents using the Gateway must be changed to use the new hostname.
In this case, the Management Agent parameter
GatewayServerHost
must be updated to use the new Gateway. -
Gateway port: If the Gateway port value changes, then any Agents using the Gateway must be changed to use the new port value.
In this case, the Management Agent parameter
GatewayServerPort
must be updated to use the new Gateway port. -
Gateway credentials: If the credentials required to connect to the Management Gateway (such as username and password) are changed, then any Agents using the Gateway must be changed to use the new credentials. For information, see Credential Type for Management Gateways and Proxies and Add or Update Credentials.
Update Proxy Credentials for Management Gateway
You can update existing external proxy credentials for the Management Gateway.
Prerequisites:
ProxyHost
ProxyPort
ProxyHost=myproxy.example.com
ProxyPort=80
Step 1: Create request body for updating the proxy credentials
Provide the new username and password in credentials file using the following properties:
ProxyUser
: User name for authentication with the proxy.ProxyPassword
: Password of the user for the authentication with the proxy.
The above credentials properties are case-sensitive.
See below sample-proxycreds.json
sample credentials
file:
{"source":"agent.%%agentId%%",
"name":"ManagementAgent-Proxy",
"type":"ProxyCreds",
"description":"Proxy Credentials",
"properties":[
{"name":"ProxyUser","value":"<UserName>"},
{"name":"ProxyPassword","value":"<Password>"}]}
Step 2: Execute command to update the proxy credentials
- For Linux:
cat sample-proxycreds.json | sudo -u mgmt_agent /opt/oracle/mgmt_agent/agent_inst/bin/credential_mgmt.sh -o upsertCredentials -s Agent
- For Windows:
type sample-proxycreds.json | C:\oracle\mgmt_agent\agent_inst\bin\credential_mgmt.bat -o upsertCredentials -s Agent
Step 3 : Restart Management Gateway
- For Linux:
sudo systemctl restart mgmt_gateway
- For Windows:
net stop mgmt_gateway net start mgmt_gateway
The credentials are used by the Management Gateway to communicate with Oracle Cloud Infrastructure services. Changing its format or removing the credentials can have an adverse effect on the Management Gateway's ability to communicate back to Oracle Cloud Infrastructure services.
Enable Batching for Management Gateway
After installing Management Gateway, you can enable batching to provide better and quicker management of the logging uploads to the Logging Analytics service.
gateway.properties
file:BatchingEnabled=true
After updating the gateway.properties
file, the Management Gateway service must be restarted. To restart it, run the following:
- For Oracle Linux 6, use:
/sbin/initctl restart mgmt_gateway
- For Oracle Linux 7, use:
systemctl restart mgmt_gateway
Upgrade Management Gateway
Upgrade Gateway on Linux
- Download the latest version of the
RPM
file containing the software download file. For details, see Download Management Gateway Software. - To upgrade the gateway, run the rpm command
with the upgrade option:
rpm -U
.sudo rpm -U <rpm_file_name.rpm>
Upgrade Gateway on Windows
- Login as an Administrator user and open a command prompt window.
- Download the latest version of the
ZIP
file containing the agent software download file. For details, see Download the Management Gateway Software. - Navigate to the directory where you have downloaded the management agent software
ZIP
file and unzip it to any preferred location. - To upgrade the gateway, run the
installer.bat
script with the-u
option:installer.bat -u
For example:
The output looks similar to the following:C:\Users\test_agent>installer.bat -u
JAVA_HOME found at: C:\Program Files\Java\jdk1.8.0_321 Executing upgrade Unpacking software zip Copying files to destination dir (C:\Oracle\mgmt_agent) Updating communication wallet Creating mgmt_gateway service Management Gateway upgrade successful The Oracle Management Gateway service is starting.... The Oracle Management Gateway service was started successfully.