Updated on 2023-11-15 GMT+08:00

Querying Monitoring Data

Function

This API is used to obtain task monitoring data.

URI

GET /v5/{project_id}/jobs/{job_id}/monitor-data

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID of a tenant in a region.

For details, see Obtaining a Project ID.

job_id

Yes

String

Task ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

MIME type of the request body. Use the default value application/json. For APIs used to upload objects or images, the value varies depending on the flow type.

The default value is application/json.

X-Auth-Token

Yes

String

User token obtained from IAM. It is a response to the API for obtaining a user token. After a request is processed, the value of X-Subject-Token in the header is the token value.

X-Language

No

String

Request language type.

Default value: en-us

Enumerated values:

  • en-us
  • zh-cn

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

bandwidth

String

EIP bandwidth. Unit: MB/s.

is_src_normal

Boolean

Whether the source database connection is normal.

is_dst_normal

Boolean

Whether the destination database connection is normal.

src_offset

String

Offset of the source database.

node_offset

String

Offset of the replication instance.

dst_offset

String

Offset of the destination database.

src_delay

Integer

Delay of the source database.

dst_delay

Integer

Delay of the destination database.

src_rps

String

Source database RPS.

src_io

String

Source database I/O.

dst_rps

String

Destination database RPS.

dst_io

String

Destination database I/O.

trans_data

String

Amount of data to be migrated. Unit: MB

trans_lines

String

Number of rows to be migrated.

used_volumes

String

Storage space usage. Unit: GB

used_memory

String

Memory usage. Unit: MB

used_cpu_percent

String

CPU usage.

node_volume_size

Integer

Total size of the node disk. Unit: GB

node_memory_size

Integer

Total size of the node memory. Unit: MB

update_time

String

Update time.

apply_rate

Integer

Synchronization speed. Unit: byte/s

Example Request

Querying task monitoring data

https://{endpoint}/v5/04f9aca88c00d3202fd4c01ed679daf0/jobs/ee5ed538-90c6-4f70-bd2e-ac084abjb502/monitor-data

Example Response

Status code: 200

OK

{
  "bandwidth" : "37",
  "is_src_normal" : true,
  "is_dst_normal" : true,
  "src_offset" : "mysql-bin.000646:196",
  "node_offset" : "mysql-bin.000646:196",
  "dst_offset" : "mysql-bin.000646:196",
  "src_delay" : 0,
  "dst_delay" : 0,
  "src_rps" : "0",
  "src_io" : "0.0",
  "dst_rps" : "0",
  "dst_io" : "0.0",
  "trans_data" : "0",
  "trans_lines" : "29",
  "used_volumes" : "4",
  "used_memory" : "2124",
  "used_cpu_percent" : "1.4",
  "node_volume_size" : 500,
  "node_memory_size" : 8192,
  "update_time" : "2023-07-19T03:09:25Z",
  "apply_rate" : 0
}

Status Code

Status Code

Description

200

OK

Error Code

For details, see Error Code.