Monitor a Service Instance
/paas/api/v1.1/instancemgmt/{identityDomainId}/services/MySQLCS/instances/{serviceId}/healthcheck
Monitoring information is provided at the following levels:
- Service instance
- Component (mysql)
- Virtual Machine (vmInstances)
- MySQL Server
format
is required, and the only supported format now is v1
.Request
-
identityDomainId: string
Name of the identity domain for the MySQL Cloud Service account.
-
serviceId: string
The user-defined name of the Oracle MySQL Cloud Service instance.
-
format: string
Format of the health data. The only supported format for health data is
v1
.Allowed Values:[ "v1" ]
-
X-ID-TENANT-NAME: string
Name of the identity domain for the MySQL Cloud Service account.
Response
- application/json
200 Response
object
-
components(optional):
array components
Groups the health details for MySQL Cloud Service components.
-
domainName(optional):
string
Identity domain ID for the MySQL Cloud Service account.
-
serviceId(optional):
integer
ID of the MySQL Cloud Service instance.
-
serviceName(optional):
string
Name of the MySQL Cloud Service instance.
-
serviceType(optional):
string
Type of the MySQL Cloud Service instance.
-
status(optional):
string
Status of the instance. Valid values are
UP
,DOWN
, orERROR
(indicating a system error was encountered during health check). -
statusMessage(optional):
string
Status of the MySQL Cloud Service instance. For example,
Running
. -
timestamp(optional):
string
Time at which the status was recorded (UTC).
array
object
-
componentId(optional):
integer
ID of the component.
-
componentType(optional):
string
Type of the component. For example,
mysql
. -
message(optional):
string
Message about the component level health metrics collection.
-
serviceId(optional):
integer
ID of the MySQL Cloud Service instance.
-
vmInstances(optional):
array vmInstances
The health details of each Virtual Machine (VM) associated with the MySQL Cloud Service component.
array
object
-
computeStatus(optional):
integer
Status of the compute node.
-
healthData(optional):
object healthData
The health summary of the VM.
-
hostName(optional):
string
Name of the host.
-
label(optional):
string
Labels of the VM. For example,
mysql
,MYSQL_SERVER
. -
servers(optional):
array servers
The health details of MySQL server(s) running on a VM.
-
status(optional):
string
Status of the VM. Valid values are
UP
,DOWN
, orERROR
(indicating a system error was encountered during health check). -
statusMessage(optional):
string
Status message, such as
VM running
. -
sub_status(optional):
string
Sub-status of the VM.
-
timestamp(optional):
string
Time at which the status was recorded (UTC).
-
vmId(optional):
integer
ID of the VM.
object
-
Data_Volume_Utilization(optional):
object Data_Volume_Utilization
Total data storage used in percent.
-
Machine_CPU_Utilization(optional):
object Machine_CPU_Utilization
CPU utilization in the VM.
-
Machine_Free_Memory(optional):
object Machine_Free_Memory
Total free memory in the VM.
array
object
object
-
displayName(optional):
string
Display name for the health monitoring runtime metric.
-
unit(optional):
string
Unit measurement of the metric. For example,
MB
,seconds
. -
value(optional):
string
Value of the health monitoring data.
object
-
healthData(optional):
object healthData
The health summary of the MySQL Server.
-
serverId(optional):
integer
ID of the MySQL Server.
-
serverName(optional):
string
Name of the MySQL Server.
-
serverType(optional):
string
MASTER
-
status(optional):
string
Status of the VM. Valid values are
UP
,DOWN
, orERROR
(indicating a system error was encountered during health check). -
statusMessage(optional):
string
VM status, such as Running or Stopped
-
timestamp(optional):
string
Time at which the status was recorded (UTC).
object
-
MySQL_Open_Connections(optional):
object MySQL_Open_Connections
Number of open connections to the MySQL server.
-
MySQL_Requests_Per_Sec(optional):
object MySQL_Requests_Per_Sec
Number of MySQL requests per second.
-
MySQL_UpTime_Sec(optional):
object MySQL_UpTime_Sec
Time in seconds the MySQL server is running.
object
object
object
404 Response
500 Response
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" }