获取接入中心策略的PodMonitor资源。
接口说明
本文将提供一个示例,查询报警模板列表。返回结果显示,报警模板列表中共有 2 个报警模板,分别是ECS_Template1和ECS_Template2。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
cms:ListIntegrationPolicyPodMonitors |
none |
*IntegrationPolicy
|
无 | 无 |
请求语法
GET /integration-policies/{policyId}/pod-monitors HTTP/1.1
路径参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| policyId |
string |
是 |
接入中心策略 ID。 |
policy-1d4634924c8ba599822c601fcee3 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| addonReleaseName |
string |
否 |
Addon Release 名称。 |
release-123456789 |
| namespace |
string |
否 |
命名空间。 |
default |
| encryptYaml |
boolean |
否 |
是否加密 Yaml。 |
true |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
Schema of Response |
||
| clusterId |
string |
集群 ID。 |
et15prod-et15storage |
| podMonitors |
array<object> |
PodMontior 列表 |
|
|
array<object> |
PodMontior 列表 |
||
| addonName |
string |
Addon 名称。 |
cloud-ecs |
| addonReleaseName |
string |
AddonRelease 名称。 |
release-2345678 |
| addonVersion |
string |
Addon 版本。 |
0.0.1 |
| configYaml |
string |
配置 yaml。 |
apiVersion: xxxxx |
| enableStatus |
string |
启用状态。 |
run |
| encryptYaml |
boolean |
加密 yaml。 |
YXBpVmVyc2lvbjogeHh4eHgK |
| endpoints |
array<object> |
实例的接入点。 |
|
|
object |
Endpoint 详情 |
||
| interval |
string |
采集间隔 |
30s |
| matchedTargetCount |
integer |
匹配的 target 数量 |
1 |
| path |
string |
指标采集路径 |
/metrics |
| port |
string |
端口号 |
9100 |
| targetPort |
string |
目标端口 |
https |
| matchedPodCount |
integer |
匹配 pod 的数量 |
3 |
| name |
string |
采集名称。 |
znzmo_entity_test |
| namespace |
string |
命名空间 |
sla-ns-d5aeb2b4f91b47 |
| policyId |
string |
策略 ID。 |
policy-c9efed2b99c348d49e589c5f780fc074 |
| requestId |
string |
Id of the request |
CD8BA7D6-995D-578D-9941-78B0FECD14B5 |
示例
正常返回示例
JSON格式
{
"clusterId": "et15prod-et15storage",
"podMonitors": [
{
"addonName": "cloud-ecs",
"addonReleaseName": "release-2345678",
"addonVersion": "0.0.1",
"configYaml": "apiVersion: xxxxx",
"enableStatus": "run",
"encryptYaml": true,
"endpoints": [
{
"interval": "30s",
"matchedTargetCount": 1,
"path": "/metrics",
"port": "9100",
"targetPort": "https"
}
],
"matchedPodCount": 3,
"name": "znzmo_entity_test",
"namespace": "sla-ns-d5aeb2b4f91b47"
}
],
"policyId": "policy-c9efed2b99c348d49e589c5f780fc074",
"requestId": "CD8BA7D6-995D-578D-9941-78B0FECD14B5"
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。