Changing Monitoring Configuration

The stack monitoring resource configuration can be updated using the OCI command line. Use the oci stack-monitoring resource update command with required configuration changes to update the configuration.

Update Oracle Database Monitoring Configuration

To change Stack Monitoring configuration, do the following:

  1. Get existing properties.

    Execute the following OCI command:

    oci stack-monitoring resource get --resource-id <stack-monitoring-resource-id>

    The output is shown below:

    GET Command Output

    {
        "id": "ocid1.stackmonitoringresource.oc1.iad.<unique_ID>",
        "name": "TestDatabase",
        "displayName": "Test Database",
        "type": "oci_oracle_cdb",
        "compartmentId": "ocid1.compartment.oc1..unique_ID",
        "tenantId": "ocid1.tenancy.oc1..unique_ID",
        "hostName": "<hostname>",
        "managementAgentId": "ocid1.managementagent.oc1.iad.<unique_ID>",
        "resourceTimeZone": "UTC",
        "timeCreated": "2022-04-14T11:59:41.614Z",
        "timeUpdated": "2022-04-14T12:06:31.807Z",
        "lifecycleState": "ACTIVE",
        "properties": [
            {
                "name": "db_type",
                "value": "CDB"
            },
            {
                "name": "protocol",
                "value": "TCP"
            },
            {
                "name": "enabledDBMgmtOnDbaas",
                "value": "true"
            },
            {
                "name": "port",
                "value": "1521"
            },
            {
                "name": "dbId",
                "value": "2970651666"
            },
            {
                "name": "dbUniqueName",
                "value": "XE"
            },
            {
                "name": "serviceName",
                "value": "XE"
            },
            {
                "name": "connectorOCID",
                "value": "ocid1.externaldatabaseconnector.oc1.iad.<unique_ID>"
            },
            {
                "name": "externalDatabaseHandlerOCID",
                "value": "ocid1.externalcontainerdatabase.oc1.iad.<unique_ID>"
            }
        ],
        "databaseConnectionDetails": {
            "protocol": "TCP",
            "port": 1521,
            "connectorId": "ocid1.externaldatabaseconnector.oc1.iad.<unique_ID>",
            "serviceName": "XE",
            "dbUniqueName": "XE",
            "dbId": "2970651666"
        },
        "credentials": null,
        "aliases": null,
        "freeformTags": {},
        "definedTags": {
            "Oracle-Recommended-Tags": {
                "ResourceType": "group"
            },
            "Oracle-Tags": {
                "CreatedBy": "oracleidentitycloudservice/<user>@<domain>",
                "CreatedOn": "2022-04-14T11:59:41.183Z"
            }
        },
        "systemTags": {}
    }
  2. Prepare a JSON input file for the update.
    1. Create updateJson.props using the above input.

    2. Copy and paste the properties and other configurations that need to be updated.

    3. Add/modify/delete the required properties.
      Note

      Properties are updated as a whole, meaning the properties specified in this JSON input will modify/delete existing properties. If a property is not specified in this input that previously exists, that property will be deleted.
      To get the complete JSON supported and values for update, you can use option generate-full-command-json-input. For example:
      oci stack-monitoring resource update --generate-full-command-json-input

      For more information, see Advanced JSON Options.

      Example: Updated updateProps.json

      {
        "resourceId":"ocid1.stackmonitoringresource.oc1.iad.<unique_ID>"
        "displayName":"Database Updated",
        "databaseConnectionDetails":{
            "port":"1521",
            "protocol":"TCP",
            "serviceName":"testService_new"
            "dbUniqueName": "testService_new",
            "dbId": "12345678"
         },
         "credentials":{
            "name":"cred-name",
            "source":"credentialType.credentialName",
            "description":"Database Credential",
            "credentialType":"PLAINTEXT",
            "properties":[
               {
                  "name":"databaseUserName",
                  "value":"testUser"
               },
               {
                  "name":"databasePassword",
                  "value":"greatestPassword"
               },
              {
              "name": "databaseRole",
              "value": "sysdba"
            }
            ]
         },  
         "properties": [
              {
                  "name": "db_type",
                  "value": "CDB"
              },
              {
                  "name": "protocol",
                  "value": "TCP"
              },
              {
                  "name": "enabledDBMgmtOnDbaas",
                  "value": "true"
              },
              {
                  "name": "port",
                  "value": "1522"
              },
              {
                  "name": "dbId",
                  "value": "2970651666"
              },
              {
                  "name": "dbUniqueName",
                  "value": "XE"
              },
              {
                  "name": "serviceName",
                  "value": "XE"
              },
              {
                  "name": "connectorOCID",
                  "value": "ocid1.externaldatabaseconnector.oc1.iad.<unique_ID>"
              },
              {
                  "name": "externalDatabaseHandlerOCID",
                  "value": "ocid1.externalcontainerdatabase.oc1.iad.<unique_ID>"
              },
              {
                  "name": "newProperty",
                  "value": "new"
              }
          ]
      }
  3. Execute the update command.
    oci stack-monitoring resource update --from-json file://<json_input_file>

    For example:

    oci stack-monitoring resource update --from-json file://updateJson.json
  4. Track the status of the update command.

    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>

Refreshing E-Business resource after file system cut over

Patching E-Business Suite (EBS) is commonly done using dual filesystems i.e. run(fs1) and the patch(fs2) file system.

Note

Refreshing EBS should be done when you are monitoring your Oracle E-Business Suite and have switched between the run(fs1) and patch(fs2) file systems.

When switching between filesystems, a refresh of EBS in Stack monitoring will automatically detect all in the changes in the configuration, including the new WebLogic Admin Port. This will also refresh the WebLogic Domain resources. There are two options to refresh an EBS application:

For details on how to refresh EBS and WebLogic, see EBS Refresh.

Note

When performing EBS 12.2 REFRESH after cutover ensure agent can reach new Weblogic Admin server port.