set_monitoring_credential

Sets a monitoring credential set for a target. You can provide input parameters using command line arguments or the input properties file. It also supports the input_file parameter for passwords and parameter values.

Format

emcli set_monitoring_credential 
        -target_name=<target_name>
        -target_type=<ttype>
        -set_name=<set_name>
        -cred_type=<credential_type>
        -auth_target_type=<auth_ttype>
        -test
        -input_file=<tag|value>
        -properties_file=<filename>
        -attributes=<p1:v1;p2:v2;...>

Options

  • target_name

    Sets the monitoring credential for this target.

  • target_type

    Target type for the target.

  • set_name

    Sets the monitoring credential for this credential set name.

  • cred_type

    Credential type for the credential to set as the monitoring credential.

  • auth_target_type

    Authenticating target type. Defaults to target_type.

  • test

    Tests the credential against the target(s) before setting the monitoring credential.

  • input_file

    Supplies sensitive property values from the file.

    For more information about the input_file parameter, see -input_file Syntax Guidelines.

  • properties_file

    Passes all parameters from the file. Values provided on the command line take precedence.

  • attributes

    Specify credential columns as follows:

    colname:colvalue;colname:colvalue
    

    You can change the separator value using -separator=attributes=<newvalue>, and you can change the subseperator value using -subseparator=attributes=<newvalue>.

Examples

Example 1

This example sets the monitoring credential set DBCredsMonitoring for the target testdb.example.com:oracle_database with user name foo, password bar, and role normal.

emcli set_monitoring_credential 
        -target_name=testdb.example.com 
        -target_type=oracle_database 
        -set_name=DBCredsMonitoring
        -cred_type=DBCreds
        -attributes="DBUserName:foo;DBPassword:bar;DBRole:normal"

Example 2

This example reads the password from the mypasswordfile.txt file.

emcli set_monitoring_credential 
        -target_name=testdb.example.com 
        -target_type=oracle_database 
        -set_name=DBCredsMonitoring
        -cred_type=DBCreds
        -attributes="DBUserName:foo;DBPassword:tag;DBRole:normal"
        -input_file="tag:mypasswordfile.txt"