文档

DescribeEnvServiceMonitor - 查询环境的ServiceMonitor详情

更新时间:

查询环境的ServiceMonitor详情。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

当前API暂无授权信息透出。

请求参数

名称类型必填描述示例值
RegionIdstring

地域 ID。

cn-hangzhou
EnvironmentIdstring

环境实例 ID。

env-xxxxx
Namespacestring

ServiceMonitor 所在的命名空间。

arms-prom
ServiceMonitorNamestring

ServiceMonitor 名称。

arms-admin1

返回参数

名称类型描述示例值
object

Schema of Response

RequestIdstring

Id of the request

40B10E04-81E8-4643-970D-F1B38F2E****
Codeinteger

状态码。200 为成功,其他状态码为异常。

200
Dataobject

返回结构体。

EnvironmentIdstring

环境实例 ID。

env-xxxxx
Namespacestring

命名空间。

arms-prom
RegionIdstring

地域 ID。

cn-hangzhou
ServiceMonitorNamestring

ServiceMonitor 名称。

serviceMonitor1
ConfigYamlstring

ServiceMonitor 的 YAML 配置串。

参见补充说明。
Statusstring

状态:

  • run
  • stop
run
Messagestring

返回信息。

success

ConfigYaml 示例:

apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  name: arms-admin1
  namespace: arms-prom
  annotations:
    arms.prometheus.io/discovery: 'true'
spec:
  endpoints:
  - interval: 30s
    port: operator
    path: /metrics
  - interval: 10s
    port: operator1
    path: /metrics
  namespaceSelector:
    any: true
  selector:
    matchLabels:
     app: arms-prometheus-ack-arms-prometheusapiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  name: arms-admin1
  namespace: arms-prom
  annotations:
    arms.prometheus.io/discovery: 'true'
spec:
  endpoints:
  - interval: 30s
    port: operator
    path: /metrics
  - interval: 10s
    port: operator1
    path: /metrics
  namespaceSelector:
    any: true
  selector:
    matchLabels:
     app: arms-prometheus-ack-arms-prometheus

示例

正常返回示例

JSON格式

{
  "RequestId": "40B10E04-81E8-4643-970D-F1B38F2E****",
  "Code": 200,
  "Data": {
    "EnvironmentId": "env-xxxxx",
    "Namespace": "arms-prom",
    "RegionId": "cn-hangzhou",
    "ServiceMonitorName": "serviceMonitor1",
    "ConfigYaml": "参见补充说明。",
    "Status": "run"
  },
  "Message": "success"
}

错误码

访问错误中心查看更多错误码。

变更历史

变更时间变更内容概要操作
暂无变更历史
  • 本页导读 (1)
文档反馈