Skip to main content

List Workers

Interface Overview

To query a list of machines based on the cluster ID.

Interface Address

/cloudcanal/console/api/v1/openapi/worker/listworkers

Request Manner

POST

Request Parameters

ParameterNameParameter DescriptionRequestTypeWhether RequiredDataType
clusterIdCluster idBodyTrueLong
sourceInstanceIdSource data source instance idBodyFalseLong
targetInstanceIdTarget data source instance idBodyFalseLong

Public Response Results

ParameterNameParameter DescriptionType(Java)NotNull
code1:Successful 0:FailedStringTrue
dataObjectFalse
msgStringFalse
requestIdStringTrue

Data Parameters

The data is an array, and each set of data contains the following field descriptions:

ParameterNameParameter DescriptionType(Java)NotNull
idNode IDlongTrue
gmtCreateCreation timeStringTrue
gmtModifiedModification timeStringTrue
clusterIdCluster IDlongTrue
privateIpPrivate IPStringTrue
publicIpPublic IP (Egress IP)StringFalse
cloudOrIdcNameCloud provider or IDC type,
ALIBABA_CLOUD
SELF_MAINTENANCE
StringTrue
regionRegion where the cluster is locatedStringTrue
workerNameNode NameStringTrue
workerSeqNumberNode unique identifierStringTrue
workerDescNode descriptionStringTrue
totalTaskMemMbLogical memory used by tasks (MB)longTrue
taskHeapSizeMbPhysical memory used by tasks (MB)longTrue
memOverSoldPercentMemory usage ratio, exceeding 100 indicates oversellingintTrue
physicMemMbPhysical memory capacity (MB)longTrue
physicCoreNumNumber of physical coresintTrue
logicalCoreNumNumber of logical coresintTrue
physicDiskGbPhysical disk capacity (GB)longTrue
workerTypeNode type,
BARE_METAL
VM
ECS
StringTrue
workerStateNode status,
WAIT_TO_ONLINE
ONLINE
WAIT_TO_OFFLINE
OFFLINE
ABNORMAL
NOT_EXIST
StringTrue
cpuUseRatioCPU utilization ratiodoubleTrue
memUseRatioMemory utilization ratiodoubleTrue
healthLevelNode health status,
Unhealthy
SubHealth
Health
StringTrue
freeMemMbFree memory (MB)longTrue
freeDiskGbFree disk space (GB)longTrue
workerLoadNode loaddoubleTrue
installConsoleJobIdAsynchronous task ID for node installationlongTrue
uninstallConsoleJobIdAsynchronous task ID for node uninstallationlongTrue
deployStatusNode deployment status,
INSTALLING
INSTALLED
UNINSTALLING
UNINSTALLED
StringTrue
consoleJobIdAsynchronous task ID for adding nodeslongTrue
consoleTaskStateAsynchronous task state for adding nodes,
WAIT_START
EXECUTE
SUCCESS
FAILED
CANCELED
SKIP
StringTrue
taskScheduleVOsTask information mounted on the machine, structured as an arrayListTrue
alertConfigVOAlert configurationObjectTrue
installOrUpgradeDateInstallation or upgrade timeStringTrue
installOrUpgradeVersionSoftware version after installation or upgradeStringTrue

TaskScheduleVOs Illustrate

The parameter is a list, and each element in the list is described by the following fields.

ParameterNameParameter DescriptionType(Java)NotNull
IdID of scheduled datalongTrue
GmtCreateCreation timeStringTrue
TaskIdData Task IDlongTrue
JobIdData Job IDlongTrue
TaskNameData Task nameStringTrue
JobNameData Job nameStringTrue
JobDescData Job descriptionStringTrue
WorkerIpMounted node IPStringTrue
WorkerIdMounted node IDStringTrue
ClusterNameName of the cluster to which the node belongsStringTrue
ClusterIdID of the cluster to which the node belongslongTrue
JvmHeapMbMemory (in MB) allocated to the Data TaskStringTrue
SrcDsIdID of the source data sourcelongTrue
SrcDsDescDescription of the source data sourceStringTrue
DstDsIdID of the target data sourcelongTrue
DstDsDescDescription of the target data sourceStringTrue

AlertConfigVO Illustrate

The parameter is an object, and the field descriptions are as follows.

ParameterNameParameter DescriptionType(Java)NotNull
idAlarm configuration IDlongTrue
uidUser ID of the ownerStringTrue
phoneWhether or not to send phone alarmsbooleanTrue
emailWhether or not to send email alarmsbooleanTrue
dingdingWhether or not to send instant messaging alarmsbooleanTrue
smsWhether or not to send SMS alarmsbooleanTrue
ruleNameName of the alarm ruleStringTrue
expressionAlarm expressionStringTrue
sendAdminWhether or not to send to business administratorsbooleanTrue
sendSystemWhether or not to send to system administratorsbooleanTrue
dataJobIdData Job IDlongFalse
workerIdNode IDlongFalse
alarmLevelAlarm level,
Major
Critical
Blocker
StringTrue
eventTypeType of exception event,
TASK_EXCEPTION_EVENT
TASK_POSITION_DELAY_EVENT
SIDECAR_EXCEPTION_EVENT
CONSOLE_EXCEPTION_EVENT
WORKER_ABNORMAL_EVENT
TASK_NORMAL_EVENT
StringTrue
alertReceiversAlarm recipients, a mapping structure where the key is the UID and the value is the usernamemapFalse

Response Example

{
"requestId": "ebd0b7dc-54ed-11ed-b820-5bd47d77dc8c",
"taskId": 0,
"workerIdentity": null,
"sendBackToTask": false,
"code": "1",
"msg": "request success",
"data": [
{
"id": 1,
"gmtCreate": "2021-11-04T04:25:06.000+0000",
"gmtModified": "2022-10-26T05:20:20.000+0000",
"clusterId": 1,
"privateIp": "192.168.0.149",
"publicIp": "115.192.103.211",
"cloudOrIdcName": "SELF_MAINTENANCE",
"region": "hangzhou",
"totalTaskMemMb": 10240,
"memOverSoldPercent": 200,
"physicMemMb": 65536,
"physicCoreNum": 10,
"logicalCoreNum": 10,
"physicDiskGb": 926,
"workerType": "VM",
"workerState": "ONLINE",
"cpuUseRatio": 20.74,
"memUseRatio": 52,
"healthLevel": "Health",
"taskHeapSizeMb": 0,
"freeMemMb": 30855,
"freeDiskGb": 700,
"workerLoad": 3.03,
"workerName": "worker241gk84d2o6",
"workerSeqNumber": "wsnkhry09td02kdvuxns3olrzpgz915r5s569rt0hail7y63vgha4xcnn3g5a8la",
"workerDesc": "worker241gk84d2o6",
"installConsoleJobId": null,
"uninstallConsoleJobId": null,
"deployStatus": null,
"consoleJobId": 482,
"consoleTaskState": "SUCCESS",
"taskScheduleVOs": [
{
"id": 63,
"gmtCreate": "2022-04-19T10:07:37.000+0000",
"gmtModified": "2022-04-19T10:07:37.000+0000",
"taskId": 71,
"jobId": 455,
"taskName": "canalz1yt0nutvr3_CHECK",
"jobName": "canalz1yt0nutvr3",
"workerIp": "192.168.0.146",
"workerId": 1,
"clusterName": null,
"clusterId": 1,
"jobDesc": "1234",
"jvmHeapMb": 2048,
"srcDsId": 15,
"srcDsDesc": "External source",
"dstDsId": 101,
"dstDsDesc": "cloudpg12"
},
{
"id": 73,
"gmtCreate": "2022-04-20T08:15:29.000+0000",
"gmtModified": "2022-04-20T08:15:29.000+0000",
"taskId": 81,
"jobId": 459,
"taskName": "canalc51a374175o_CHECK",
"jobName": "canalc51a374175o",
"workerIp": "192.168.0.146",
"workerId": 1,
"clusterName": null,
"clusterId": 1,
"jobDesc": "123",
"jvmHeapMb": 2048,
"srcDsId": 15,
"srcDsDesc": "External source",
"dstDsId": 104,
"dstDsDesc": "cloudgp_2"
},
{
"id": 93,
"gmtCreate": "2022-04-22T05:46:31.000+0000",
"gmtModified": "2022-04-22T05:46:31.000+0000",
"taskId": 100,
"jobId": 468,
"taskName": "canal1c1zu6ye2dz_CHECK",
"jobName": "canal1c1zu6ye2dz",
"workerIp": "192.168.0.146",
"workerId": 1,
"clusterName": null,
"clusterId": 1,
"jobDesc": "1234",
"jvmHeapMb": 2048,
"srcDsId": 15,
"srcDsDesc": "External source",
"dstDsId": 16,
"dstDsDesc": "External target"
},
{
"id": 878,
"gmtCreate": "2022-10-25T06:46:47.000+0000",
"gmtModified": "2022-10-25T06:46:47.000+0000",
"taskId": 973,
"jobId": 877,
"taskName": "canale4g10grqgk4_INCREMENT",
"jobName": "canale4g10grqgk4",
"workerIp": "192.168.0.149",
"workerId": 1,
"clusterName": null,
"clusterId": 1,
"jobDesc": "123",
"jvmHeapMb": 2048,
"srcDsId": 15,
"srcDsDesc": "External source",
"dstDsId": 229,
"dstDsDesc": "alikafka_post-cn-zmb2xhefl001"
},
{
"id": 880,
"gmtCreate": "2022-10-25T13:10:42.000+0000",
"gmtModified": "2022-10-25T13:10:42.000+0000",
"taskId": 975,
"jobId": 879,
"taskName": "canal0epg521jc7b_INCREMENT",
"jobName": "canal0epg521jc7b",
"workerIp": "192.168.0.149",
"workerId": 1,
"clusterName": null,
"clusterId": 1,
"jobDesc": "123",
"jvmHeapMb": 2048,
"srcDsId": 229,
"srcDsDesc": "alikafka_post-cn-zmb2xhefl001",
"dstDsId": 229,
"dstDsDesc": "alikafka_post-cn-zmb2xhefl001"
}
],
"alertConfigVO": {
"id": 3,
"uid": "1661225473146964",
"phone": false,
"email": true,
"dingding": true,
"sms": true,
"duplicated": false,
"ruleName": "Machine Liveness Probe Alert",
"expression": null,
"sendAdmin": false,
"sendSystem": false,
"dataJobId": null,
"workerId": 1,
"alarmLevel": "Major",
"eventType": "WORKER_ABNORMAL_EVENT",
"alertReceivers": {}
},
"installOrUpgradeDate": null,
"installOrUpgradeVersion": null
}
],
"fail": false,
"success": true,
"rsocketDirectionType": null
}