All Products
Search
Document Center

Application Real-Time Monitoring Service:DescribeEnvServiceMonitor

Last Updated:Jun 12, 2026

Mengambil detail ServiceMonitor di sebuah environment.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tidak ada otorisasi untuk operasi ini. Jika Anda mengalami masalah saat menjalankan operasi ini, hubungi dukungan teknis.

Parameter permintaan

Parameter

Type

Required

Description

Example

RegionId

string

Yes

ID region.

cn-hangzhou

EnvironmentId

string

Yes

ID instance environment.

env-xxxxx

Namespace

string

Yes

Namespace tempat ServiceMonitor berada.

arms-prom

ServiceMonitorName

string

Yes

Nama ServiceMonitor.

arms-admin1

Elemen respons

Element

Type

Description

Example

object

Skema Respons

RequestId

string

ID permintaan

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

Code

integer

Kode status. Nilai 200 menunjukkan bahwa permintaan berhasil. Kode status lainnya menunjukkan bahwa permintaan gagal.

200

Data

object

Struct yang dikembalikan.

EnvironmentId

string

ID instance environment.

env-xxxxx

Namespace

string

Namespace.

arms-prom

RegionId

string

ID region.

cn-hangzhou

ServiceMonitorName

string

Nama ServiceMonitor.

serviceMonitor1

ConfigYaml

string

String konfigurasi YAML ServiceMonitor.

参见补充说明。

Status

string

Status:

  • run

  • stop

run

Message

string

Pesan yang dikembalikan.

success

Contoh 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

Contoh

Respons sukses

JSONformat

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

Kode kesalahan

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.