Monitoring a Service Instance

You can monitor the health of an Oracle SOA Cloud Service instance using the REST API, as described in the following procedure.

Note:

  • On accounts that are integrated with Oracle Identity Cloud Service, the identity domain ID is the Identity Cloud Service tenant name. This tenant name begins with the characters idcs- followed by a string of number and letters (for example, idcs-98888f7964454b658ac6d2f625b29030).

  • The cURL command examples use the URL structure https://rest_server_url/resource_path, where rest_server_url is the REST server to contact for your identity domain. See Send Requests.

To monitor an Oracle SOA Cloud Service instance:

  1. Before monitoring an Oracle SOA Cloud Service instance, review the service instances that currently exist to identify the service instance you want to monitor.
    curl -i -X GET -u username:userPassword1! -H "X-ID-TENANT-NAME:ExampleIdentityDomain" https://rest_server_url/paas/api/v1.1/instancemgmt/domainName/services/soa/instances
    

    Specify the following options on the cURL command line:

    • -i option to include the HTTP header in the output. This option is optional.

    • -X option to indicate the type of request (GET).

    • -u option to specify the user name and password for the Oracle SOA Cloud Service account for authentication.

    • -H to define a custom header, X-ID-TENANT-NAME, to identify the identity domain ID.

    The following shows an example of the response body.

    Look for the service name of the service instance you want to monitor. In this example, the service name is ExampleInstance.

    {
        "uri":"https:\/\/rest_server_url\/paas\/service\/soa\/api\/v1.1\/instances\/domainName",
        "service_type":"soa",
        "implementation_version":"1.0",
        "services":[
        {
            "service_name":"ExampleInstance",
            "version":"12cRelease213",
            "wlsVersion":"12.2.1.3.xxxxxx",
            "status":"Running",
            "error_status_desc":"",
            "compliance_status":"",
            "compliance_status_desc":"",
            "auto_update":"true",
            "description":"Example Instance created using REST API",
            "identity_domain":"ExampleIdentityDomain",
            "creation_time":"Mon Jun 6 19:37:41 UTC 2019",
            "last_modified_time":"Sat Jul 2 7:10:35 UTC 2019",
            "created_by":"username",
            "service_uri":"https:\/\/rest_server_url\/paas\/service\/soa\/api\/v1.1\/instances\/domainName\/ExampleInstance"
        }
        ]
    }
  2. Monitor the ExampleInstance service instance by entering the following command.
    curl -i -X GET -u username:userPassword1! -H "X-ID-TENANT-NAME:ExampleIdentityDomain" https://rest_server_url/paas/core/api/v1.1/healthcheck/domainName/services/soa/instances/ExampleInstance

    Specify the following options on the cURL command line:

    • -i option to include the HTTP header in the output. This option is optional.

    • -X option to indicate the type of request (GET).

    • -u option to specify the user name and password for the Oracle SOA Cloud Service account for authentication.

    • -H to define a custom header, X-ID-TENANT-NAME, to identify the identity domain ID.

    The following shows an example of the response body.

    {
        "summary":
        {
            "status":"UP",
            "status_time":"2019-11-17T20:23:20.029+00:00"
        },
        "identity_domain":"ExampleIdentityDomain",
        "service_components":[
        {
            "summary":
            {
                "status":"UP",
                "status_time":"2019-11-17T20:23:11.000+00:00"
            },
            "component":"OTD",
            "vms":[
            {
                "summary":
                {
                    "status":"UP",
                    "status_time":"2019-11-17T20:23:18.511+00:00"
                },
                "vm":"exampleinstance-lb-1",
                "servers":[]
            }],
            "health_data":[
            {
                "unit":"count",
                "name":"requestCount",
                "value":"2",
                "displayName":"Execution t"
            },
            {
                "unit":"count",
                "name":"errorRequestCount",
                "value":"0",
                "displayName":"Execution t"
            },
            {
                "unit":"ms",
                "name":"epsLast5MinAvg",
                "value":"0",
                "displayName":"Execution time"
            },
            {
                "unit":"ms",
                "name":"upsince",
                "value":"2019-11-17T19:53:16.000+00:00",
                "displayName":"Server time from when it was up."
            },
            {
                "unit":"ms",
                "name":"rtLast5MinAvg",
                "value":"0",
                "displayName":"Execution t"
            }]
        },
        {
            "summary":
            {
                "status":"UP",
                "status_time":"2019-11-17T20:23:10.000+00:00",
                "status_message":"Number of servers processing request:1"
            },
            "component":"WLS",
            "vms":[
            {
                "summary":
                {
                    "status":"UP",
                    "status_time":"2019-11-17T20:23:18.511+00:00"
                },
                "vm":"exampleinstance-wls-1",
                "servers":[
                {
                    "summary":
                    {
                        "status":"UP",
                        "status_time":"2019-11-17T20:23:10.000+00:00"
                    },
                    "server_name":"ExampleI_server_1",
                    "server_role":"MANAGED",
                    "health_data":[
                    {
                        "unit":"MB",
                        "name":"heapmax",
                        "value":"1820.5",
                        "displayName":"Max memory"
                    },
                    {
                        "unit":"ms",
                        "name":"upsince",
                        "value":"2019-11-17T19:56:14.000+00:00",
                        "displayName":"Server time from when it was up."
                    },
                    {
                        "unit":"MB",
                        "name":"heapfree",
                        "value":"1328.96",
                        "displayName":"Free memory"
                    }]
                },
                {
                    "summary":
                    {
                        "status":"UP",
                        "status_time":"2019-11-17T20:23:10.000+00:00",
                        "status_message":"Not processing requests"
                    },
                    "server_name":"ExampleI_adminserver",
                    "server_role":"ADMIN",
                    "health_data":[
                    {
                        "unit":"MB",
                        "name":"heapmax",
                        "value":"1820.5",
                        "displayName":"Max memory"
                    },
                    {
                        "unit":"ms",
                        "name":"upsince",
                        "value":"2019-11-17T17:50:22.000+00:00",
                        "displayName":"Server time from when it was up."
                        },
                    {
                        "unit":"MB",
                        "name":"heapfree",
                        "value":"1146.91",
                        "displayName":"Free memory"
                    }]
                }]
            }]
        }],
        "service_name":"ExampleInstance"
    }
  3. Review the health monitoring data and take action, as required. For example:
    • For each server, review the free heap size (heapFree) and consider scaling the node if the value falls below the acceptable threshold.
    • For the Oracle Traffic Director (OTD) component, review the average request time (rtLast5MinAvg) and consider scaling the cluster if the value is above the acceptable threshold.