1.4 Modifying Target Credentials and Properties

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.

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 Target Data Verbs in the Oracle Enterprise Manager Cloud Control Administrator's 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 username and password to root and password1, respectively.

  • -properties changes the host and port number to example2 and 9999, respectively.

  • -on_agent propagates the changes to the Management Agent collecting this target's metrics.

Modifying the Target Instance Definition from the OMS Dashboard

To change the credentials used to log on to the monitored MySQL database, do the following:

  1. Click Setup to expand the menu.

  2. From the Security menu, select Monitoring Credentials.

    The Monitoring Credentials page is displayed.

  3. Select MySQL Database from the list of target types and click the Manage Monitoring Credentials button.

    The MySQL Database Monitoring Credentials page is displayed.

  4. Select the target you want to edit, and click Set Credentials.

  5. Edit the credentials as required and click Save.

    The new credentials are saved.

To edit the connection details, do the following:

  1. Navigate to the target page of the target you want to edit.

  2. From the target's configuration menu, select Target Setup and click Monitoring Configuration.

    The Monitoring Configuration page is displayed.

  3. Edit the Host, Port, or Socket as required and click OK to save your changes.