全部文档
当前文档

暂无内容

如果没有找到您期望的内容,请尝试其他搜索词

文档中心

查询采集目标列表

请求参数

以下请求参数列表仅列出了接口请求参数和部分公共参数,完整公共参数列表见公共请求参数
参数名称
类型
必填
描述
Action String
公共参数,本接口取值:DescribeTargetsList。
Version String
公共参数,本接口取值:2023-03-06。
InstanceId String

实例id

ClusterId String

集群id

MonitorName String

监控采集配置名称

Type String

监控采集配置类型,有效值:
RawJob
PodMonitor
ServiceMonitor

Marker Int

分页标识

MaxResults Int

单次调用所返回的最大targets数目,默认20,最大100

返回参数

参数名称
类型
描述
RequestId String

请求id

Marker Int

分页标识

TotalCount Int

采集目标数量

TargetSet Object[]

采集目标列表

EndpointName String

Endpoint名称

EndpointState Boolean

Endpoint状态

Labels String

标签

LastScrapeTime String

上次抓取时间

LastScrapeDuration String

上次抓取耗时(s)

ErrorMessage String

错误信息

请求示例

curl -X GET|POST
'http://kce.api.ksyun.com/?Action=DescribeTargetsList&Version=2023-03-06'
-H 'authorization: xxx, SignedHeaders=content-type;host;x-amz-date, Signature=xxx'
-H 'cache-control: no-cache'
-H 'content-type: application/x-www-form-urlencoded'
-H 'host: kce.api.ksyun.com'
-H 'x-amz-date: 20170720T022802Z'
-d 'InstanceId=xxx&ClusterId=xxx&MonitorName=xxx&Type=xxx&Marker=xxx&MaxResults=xxx'

返回示例

JSON格式

{
"RequestId":"fc619fa0-d44c-420e-8ac1-010e581a0126",
"Marker":0,
"TotalCount":1,
"TargetsList":[
{
"EndpointName":"https://10.0.1.21:6443/metrics",
"EndpointState":true,
"Labels":"job=apiserver,namespace=kube-system",
"LastScrapeTime":"2023-10-27 17:02:11",
"LastScrapeDuration":"0.110",
"ErrorMessage":""
}
]
}

错误码

以下仅列出了接口业务逻辑相关的错误码,其他错误码详见公共错误码

纯净模式常规模式

纯净模式

点击可全屏预览文档内容