获取接入中心策略的自定义服务发现规则。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
cms:ListIntegrationPolicyCustomScrapeJobRules |
none |
*IntegrationPolicy
|
无 | 无 |
请求语法
GET /integration-policies/{policyId}/custom-scrape-job-rules HTTP/1.1
路径参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| policyId |
string |
是 |
接入中心策略 ID。 |
policy-d95435164593aece55f9999ce45c |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| addonReleaseName |
string |
否 |
Addon Release 名称。 |
release12345678 |
| encryptYaml |
boolean |
否 |
是否加密 Yaml。 |
true |
| namespace |
string |
否 |
命名空间。 |
arms-prom |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
Schema of Response |
||
| clusterId |
string |
集群 ID。 |
et15prod-et15storage |
| customScrapeJobRules |
array<object> |
自定义采集任务规则 |
|
|
array<object> |
自定义服务发现规则 |
||
| addonName |
string |
Addon 名称。 |
cloud-ecs |
| addonReleaseName |
string |
AddonRelease 名称 |
release-12345678 |
| addonVersion |
string |
Addon 版本 |
0.0.1 |
| configYaml |
string |
配置 yaml |
scrape_cofnigs: - jobxxxxxx |
| enableStatus |
string |
启用状态 |
mini |
| encryptYaml |
boolean |
加密 yaml |
true |
| matchedPodCount |
integer |
匹配到的 pod 数量 |
1 |
| message |
string |
详细信息。 |
ok |
| name |
string |
服务名。 |
dlab1 |
| namespace |
string |
命名空间 |
prod-data |
| scrapeConfigs |
array<object> |
自定义配置 |
|
|
object |
自定义配置 |
||
| jobName |
string |
采集名称 |
mysql-exporter |
| message |
string |
详细信息。 |
successful |
| metricsPath |
string |
采集 path |
/metrics |
| scheme |
string |
调用方式。 |
http |
| scrapeInterval |
string |
采集间隔 |
30s |
| scrapeTimeout |
string |
采集超时时间 |
60s |
| serviceDiscoveryConfigs |
array |
服务发现配置 |
|
|
string |
服务发现配置 |
{} |
|
| policyId |
string |
策略 ID。 |
policy-15abcc24c06f4797832b5954198e1ed1 |
| requestId |
string |
Id of the request |
0CEC5375-C554-562B-A65F-9A629907C1F0 |
示例
正常返回示例
JSON格式
{
"clusterId": "et15prod-et15storage",
"customScrapeJobRules": [
{
"addonName": "cloud-ecs",
"addonReleaseName": "release-12345678",
"addonVersion": "0.0.1",
"configYaml": "scrape_cofnigs:\n- jobxxxxxx",
"enableStatus": "mini",
"encryptYaml": true,
"matchedPodCount": 1,
"message": "ok",
"name": "dlab1",
"namespace": "prod-data",
"scrapeConfigs": [
{
"jobName": "mysql-exporter",
"message": "successful",
"metricsPath": "/metrics",
"scheme": "http",
"scrapeInterval": "30s",
"scrapeTimeout": "60s",
"serviceDiscoveryConfigs": [
"{}"
]
}
]
}
],
"policyId": "policy-15abcc24c06f4797832b5954198e1ed1",
"requestId": "0CEC5375-C554-562B-A65F-9A629907C1F0"
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。