全部产品
Search
文档中心

应用实时监控服务ARMS:DescribeEnvServiceMonitor - 查询环境的ServiceMonitor详情

更新时间:Aug 28, 2026

查询环境的ServiceMonitor详情。

调试

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

调试

授权信息

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

请求参数

名称

类型

必填

描述

示例值

RegionId

string

是

地域 ID。

cn-hangzhou

EnvironmentId

string

是

环境实例 ID。

env-xxxxx

Namespace

string

是

ServiceMonitor 所在的命名空间。

arms-prom

ServiceMonitorName

string

是

ServiceMonitor 名称。

arms-admin1

返回参数

名称

类型

描述

示例值

object

Schema of Response

RequestId

string

Id of the request

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

Code

integer

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

200

Data

object

返回结构体。

EnvironmentId

string

环境实例 ID。

env-xxxxx

Namespace

string

命名空间。

arms-prom

RegionId

string

地域 ID。

cn-hangzhou

ServiceMonitorName

string

ServiceMonitor 名称。

serviceMonitor1

ConfigYaml

string

ServiceMonitor 的 YAML 配置串。

参见补充说明。

Status

string

状态:

  • run

  • stop

run

Message

string

返回信息。

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"
}

错误码

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

变更历史

更多信息,参考变更详情。