Updating Monitoring Credentials

If there is any change to the (DB or Application) credentials such as username or password, you can update the existing Stack Monitoring resource with the latest credentials.

To update the latest credentials prepare/Create a new JSON file as shown below and run the oci stack-monitoring resource update command.

Provide the value of credentialType as PLAINTEXT. Provide all name and value inputs in the plain-text format.

The value of the source element is in the format <resourceType>.<resourceName> where resourceType is the type of the resource being updated and resourceName is the name of the resource being updated.

Use the following OCI CLI command for credentials update.

Command:

oci stack-monitoring resource update --from-json file://<update.json>  --resource-id <OCID of the Stackmon resource>

Example:

oci stack-monitoring resource update --from-json file://update_cred.json --resource-id ocid1.stackmonitoringresource.oc1.iad.XXXXXXXX

To update ASM credentials, use the following API calls:

Or use the following OCI CLI command:

oci database-management external-db-system-connector update-external-db-system-connector-update-external-db-system-macs-connector-details --external-db-system-connector-id --from-json file://<JSON_INPUT_FILE>

Tracking the Update Operation

The output of the above update command includes the opc-workrequest-id as shown below.

{
  "opc-work-request-id": "ocid1.stackmonitoringworkrequest.oc1.eu-frankfurt-1.XXXXXXXX"
}

Use the above opc-work-request-id value to track the status of the update operation. Use the following work-request commands to track the status.

To get the status for a given Work Request Id:

oci stack-monitoring work-request get --work-request-id <opc-work-request-id>

To get a list of logs for a given Work Request ID:

oci stack-monitoring work-request list-logs --work-request-id <opc-work-request-id>

To get a list of errors for a given Work Request ID:

oci stack-monitoring work-request list-errors --work-request-id <opc-work-request-id>

Password Update JSON Files per Resource Type (update_cred.json)

  • JSON for updating Oracle Database ( CDB, PDB and non-CDB)
    {
      "credentials": {
        "name":"SQLCreds",
        "source":"<resource_type>.<resourceName>",
        "credentialType":"PLAINTEXT",
        "properties":[
          {
            "name":"databaseUserName",
            "value":"<new user name>"
          },
          {
            "name":"databasePassword",
            "value":"<new password>"
          },
          {
            "name": "databaseRole",
            "value": "<new role>"
          }
        ]
      }
    }
  • JSON for updating ASM password
    
    {
      "connectorType": "MACS",
      "connectionInfo": {
        "componentType": "ASM",
        "connectionString": {
          "hosts": ["EXAMPLE-hostName-Value"],
          "port": 1521,
          "protocol": "TCP",
          "service": "+ASM"
        },
        "connectionCredentials": {
          "credentialType": "DETAILS",
          "credentialName": "EXAMPLE-credentialName-Value",
          "userName": "asmsnmp",
          "passwordSecretId": "ocid1.test.oc1..EXAMPLE-passwordSecretId-Value",
          "role": "SYSDBA"
        }
      }
    }
  • E-Business Suite Database Discovery User Update JSON
    {
      "credentials": {
        "name":"SQLCreds",
        "type":"DBCreds",
        "source":"ebs_instance.<resource name>",
        "description":"Credential Update for EBSdiscovery",
        "credentialType":"PLAINTEXT",
        "properties":[
          {
            "name":"DBUserName",
            "value":"<new username>"
          },
          {
            "name":"DBPassword",
            "value":"<new password>"
          },
          {
            "name": "DBRole",
            "value": "Normal"
          }
        ]
      }
    }
  • Sample JSON for WebLogic Domain, WebLogic Cluster and Weblogic Server.
    {
           "credentials": {
            "source": "source": "weblogic_domain.<weblogic domain name>",
            "name": "JMXCreds",
            "type": "JMXCreds",
            "description": "<Some description> ",
            "credentialType": "PLAINTEXT",
            "properties": [
                {
                   "name": "Username",
                    "value": "<new user name>"
                },
                {
                    "name": "Password",
                    "value": "<new password>"
                }
            ]
        }
    }
  • MS SQL Server Password Update JSON
    {
     
        "credentials": {
            "source": "sql_server.<your resource name>",
            "name": "SQLCreds",
            "type": "DBCreds",
            "description": "Credential for SQL Server.",
            "credentialType": "PLAINTEXT",
            "properties": [
                {
                    "name": "DBRole",
                    "value": "<new role>"
                },
                {
                    "name": "DBUserName",
                    "value": "<new user name>"
                },
                {
                    "name": "DBPassword",
                    "value":  "<new password>"
                }
            ]
        }
    }
    
  • Apache Tomcat Password Update JSON
    { 
        "credentials": {
            "source": "apache_tomcat.<your resource name>",
            "name": "JMXCreds",
            "type": "JMXCreds",
            "description": "Credential for Apache Tomcat metric collection.",
            "credentialType": "PLAINTEXT",
            "properties": [
                {
                    "name": "Username",
                    "value": "<new user name>"
                },
                {
                    "name": "Password",
                    "value":  "<new password>"
                }
            ]
        }
    }
  • Apache HTTP Server
    {
        "credentials": {
            "source": "apache_http_server.<resource name>",
            "name": "RestCreds",
            "type": "HTTPSCreds",
            "description": "Credential for Apache HTTP Server metric collection.",
            "credentialType": "PLAINTEXT",
            "properties": [
                {
                   "name": "HTTPSUserName",
                    "value": "<new username>"
                },
                {
                    "name": "HTTPSPassword",
                    "value": "<new password>"
                },
     
                {
                    "name": "ssl_trustStoreType",
                    "value": "JKS"
                },
                {
                    "name": "ssl_trustStoreLocation",
                    "value": "<new trust store path>"
                },
                {
                    "name": "ssl_trustStorePassword",
                    "value": "<new trust store password>"
                }
            ]
        }
    }
  • PeopleSoft Application Server Group Password Update JSON
    {
        "credentials": {
        "source": "oracle_psft_appserv_group.<resource name>",
            "name": "JMXCreds",
            "type": "JMXCreds",
            "description": "Credential for JMXAppServer metric collection",
            "credentialType": "PLAINTEXT",
            "properties": [
                {
                   "name": "Username",
                    "value": "<new username>"
                },
                {
                    "name": "Password",
                    "value": "<new password>"
                }
            ]
        }
    }
  • PeopleSoft Database Discovery User Update JSON
    {
      "credentials": {
        "name":"SQLCreds",
        "type":"DBCreds",
        "description":"Credential for PSFT discovery user",
        "source":"oracle_psft.<resource name>",
        "credentialType":"PLAINTEXT",
        "properties":[
          {
            "name":"DBUserName",
            "value":"<new username>"
          },
          {
            "name":"DBPassword",
            "value":"<new password>"
          },
          {
            "name": "DBRole",
            "value": "NORMAL"
          }
        ]
      }
    }
  • PeopleSoft Process Scheduler Group Password Update JSON
    {
        "credentials": {
        "source": "oracle_psft_prcs_group.<resource name>",
            "name": "JMXCreds",
            "type": "JMXCreds",
            "description": "Credential for JMXprcs metric collection.",
            "credentialType": "PLAINTEXT",
            "properties": [
                {
                   "name": "Username",
                    "value": "<new username>"
                },
                {
                    "name": "Password",
                    "value": "<new password>"
                }
            ]
        }
    }
  • PeopleSoft PIA Group Password Update JSON
    {
        "credentials": {
        "source": "oracle_psft_pia_group.<resource name>",
            "name": "JMXCreds",
            "type": "JMXCreds",
            "description": "Credential for PIA metric collection.",
            "credentialType": "PLAINTEXT",
            "properties": [
                {
                   "name": "Username",
                    "value": "admin"
                },
                {
                    "name": "Password",
                    "value": "<new password>"
                }
            ]
        }
    }
  • Golden Gate Update Credentials

    {
        "credentials": {
            "source": "oracle_goldengate.<resource name>",
            "name": "RestCreds",
            "type": "HTTPSCreds",
            "description": "Credential for Oracle GoldenGate metric collection.",
            "credentialType": "PLAINTEXT",
            "properties": [
                {
                   "name": "Username",
                    "value": "<new username>"
                },
                {
                    "name": "Password",
                    "value": "<new password>"
                },
      
                {
                    "name": "ssl_trustStoreType",
                    "value": "JKS"
                },
                {
                    "name": "ssl_trustStoreLocation",
                    "value": "<new trust store path>"
                },
                {
                    "name": "ssl_trustStorePassword",
                    "value": "<new trust store password>"
                }
            ]
        }
    }