Modifying the Target Instance Definition from the Command Line
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 modify_target in Oracle Enterprise Manager Command Line Interface.
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:<username>;oracle_omys_database_password:<password>"
-properties="oracle_omys_database_host:<host>;oracle_omys_database_port:<port>"
-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.
- -properties changes the host and port number.
- -on_agent propagates the changes to the Management Agent collecting this target's metrics.