Monitor a Service Instance

get

/paas/api/v1.1/instancemgmt/{identityDomainId}/services/MySQLCS/instances/{serviceId}/healthcheck

Returns health monitoring data for the specified MySQL Cloud Service instance.

Monitoring information is provided at the following levels:

  • Service instance
  • Component (mysql)
  • Virtual Machine (vmInstances)
  • MySQL Server
The query parameter format is required, and the only supported format now is v1.

Request

Path Parameters
Query Parameters
  • Format of the health data. The only supported format for health data is v1.
    Allowed Values: [ "v1" ]
Header Parameters

Response

Supported Media Types

200 Response

OK. See Status Codes for information about other possible HTTP status codes.
Body ()
The response body includes health monitoring information.
Root Schema : monitor-response
Type: object
The response body includes health monitoring information.
Show Source
Nested Schema : components
Type: array
Groups the health details for MySQL Cloud Service components.
Show Source
Nested Schema : monitor-components-response
Type: object
Show Source
Nested Schema : vmInstances
Type: array
The health details of each Virtual Machine (VM) associated with the MySQL Cloud Service component.
Show Source
Nested Schema : monitor-vm
Type: object
Show Source
Nested Schema : healthData
Type: object
The health summary of the VM.
Show Source
Nested Schema : servers
Type: array
The health details of MySQL server(s) running on a VM.
Show Source
Nested Schema : Data_Volume_Utilization
Type: object
Total data storage used in percent.
Show Source
Nested Schema : Machine_CPU_Utilization
Type: object
CPU utilization in the VM.
Show Source
Nested Schema : Machine_Free_Memory
Type: object
Total free memory in the VM.
Show Source
Nested Schema : monitor-health-data
Type: object
Show Source
Nested Schema : monitor-vm-server-info
Type: object
Show Source
Nested Schema : healthData
Type: object
The health summary of the MySQL Server.
Show Source
Nested Schema : MySQL_Open_Connections
Type: object
Number of open connections to the MySQL server.
Show Source
Nested Schema : MySQL_Requests_Per_Sec
Type: object
Number of MySQL requests per second.
Show Source
Nested Schema : MySQL_UpTime_Sec
Type: object
Time in seconds the MySQL server is running.
Show Source

404 Response

Not Found

500 Response

Internal Server Error

Examples

The following example shows how to retrieve health monitoring data about an Oracle MySQL Cloud Service instance by submitting a GET request on the REST resource using cURL.

Note: The command in this example uses the URL structure https://rest_server_url/resource-path, where rest_server_url is the Oracle Public Cloud or Oracle Cloud Machine REST server to contact for your identity domain or tenant name. See Send Requests for the appropriate URL structure to use on Oracle Public Cloud or Oracle Cloud Machine.

cURL Command

curl -i -X GET \
  -u "username:password" \
  -H "X-ID-TENANT-NAME: ExampleIdentityDomain" \
  -H "Accept: application/json" \
  https://rest_server_url/paas/api/v1.1/instancemgmt/ExampleIdentityDomain/services/MySQLCS/instances/MyTestInstance/healthcheck?format=v1

Example of Response Header

The following shows an example of the response header.

HTTP/1.1 200 OK
Server: Oracle-Application-Server-11g
Content-Language: en
Access-Control-Allow-Headers: Content-Type, api_key, Authorization
Access-Control-Allow-Methods: GET, POST, DELETE, PUT, OPTIONS, HEAD
X-ORACLE-DMS-ECID: p5Fu35Ev0E0RF0ZHs000Y07i010eg6iI0d
X-ORACLE-DMS-ECID: p5Fu35Ev0E0RF0ZHs000Y07i010eg6iI0d
Access-Control-Allow-Origin: *
X-Frame-Options: DENY
Content-Type: application/json
Vary: user-agent
Date: Thu, 08 Dec 2016 01:09:19 GMT
Content-Length: 1321
Connection: keep-alive

Example of Response Body

The following shows an example of the response body in JSON format.

{
	"timestamp": "2016-12-08T01:09:16.734+00:00",
	"serviceId": 111139,
	"status": "UP",
	"domainName": "ExampleIdentityDomain",
	"components": {
		"mysql": {
			"message": "No component level HealthIndicators defined, or no metrics collected",
			"serviceId": 111139,
			"vmInstances": {
				"mytestinstance-mysql-1": {
					"timestamp": "2016-12-08T01:09:08.630+00:00",
					"status": "UP",
					"servers": {
						"MySQL": {
							"timestamp": "2016-12-08T01:09:16.702+00:00",
							"status": "UP",
							"serverId": 19191,
							"serverName": "MySQL",
							"healthData": {
								"MySQL_Requests_Per_Sec": {
									"unit": "Req/Sec",
									"value": "0",
									"displayName": "Requests per Second"
								},
								"MySQL_UpTime_Sec": {
									"unit": "seconds",
									"value": "690952",
									"displayName": "Uptime"
								},
								"MySQL_Open_Connections": {
									"unit": "connection",
									"value": "1",
									"displayName": "Open Connections"
								}
							},
							"statusMessage": "Running",
							"serverType": "MASTER"
						}
					},
					"sub_status": "UP",
					"hostName": "mytestinstance-mysql-1",
					"label": "MyTestInstance mysql MYSQL_SERVER 1",
					"vmId": 107703,
					"healthData": {
						"Data_Volume_Utilization": {
							"unit": "%",
							"value": "99",
							"displayName": "Usable Database Storage"
						},
						"Machine_CPU_Utilization": {
							"unit": "%",
							"value": "0",
							"displayName": "CPU Utilization"
						},
						"Machine_Free_Memory": {
							"unit": "MB",
							"value": "310",
							"displayName": "Memory Free in VM"
						}
					},
					"statusMessage": "Running"
				}
			},
			"componentId": 140605,
			"componentType": "mysql"
		}
	},
	"serviceType": "MySQLCS",
	"statusMessage": "Running",
	"serviceName": "MyTestInstance"
}