It is possible to change the credentials and connection properties after setting up the target. These properties can be changed from the command line and from the OMS dashboard.
You can modify the target instance definition from the command line using the modify_target verb with the -type="oracle_omys_database" parameter.
For more information on the modify_target verb, see Target Data Verbs in the Oracle Enterprise Manager Cloud Control Command Line Interface Guide.
The following target properties can be modified:
Username: set using the -credentials parameter with the oracle_omys_database_username property.
Password: set using the -credentials parameter with the oracle_omys_database_password property.
Host name: set using the -properties parameter with the oracle_omys_database_host property.
Port: set using the -properties parameter with the oracle_omys_database_port property.
Socket: set using the -properties parameter with the oracle_omys_database_socket property.
The following example changes the properties and credentials of an existing target instance definition:
$ emcli modify_target -name="targetExample:3306" -type="oracle_omys_database"
-credentials="oracle_omys_database_username:root;oracle_omys_database_password:password1"
-properties="oracle_omys_database_host:example2;oracle_omys_database_port:9999"
-on_agent
where:
-name defines the name of the target to modify.
-type defines the type of the monitored instance. oracle_omys_database defines a MySQL database type.
-credentials changes the user name and password to
root
andpassword1
, respectively.-properties changes the host and port number to
example2
and9999
, respectively.-on_agent propagates the changes to the Management Agent collecting this target's metrics.
To change the credentials used to log on to the monitored MySQL database, do the following:
Click Setup to expand the menu.
From the Security menu, select Monitoring Credentials.
The Monitoring Credentials page is displayed.
Select MySQL Database from the list of target types and click the Manage Monitoring Credentials button.
The MySQL Database Monitoring Credentials page is displayed.
Select the target you want to edit, and click Set Credentials.
Edit the credentials as required and click Save.
The new credentials are saved.
To edit the connection details, do the following:
Navigate to the target page of the target you want to edit.
From the target's configuration menu, select Target Setup and click Monitoring Configuration.
The Monitoring Configuration page is displayed.
Edit the Host, Port, or Socket as required and click OK to save your changes.