Cloud Monitor CLI

Updated at:

The official Cloud Monitor CLI runs as the cms2 plugin of Alibaba Cloud CLI. It uses aliyun cms2 <resource> <action> to query and manage Cloud Monitor 2.0. The CLI is built for command line use in terminals, CI pipelines, and scripts: it produces structured output, fails explicitly, and resolves credentials through the RAM and Alibaba Cloud configuration chain instead of taking credentials as command business parameters.

Note
  • This topic describes the official CLI only, which is intended for terminals, CI pipelines, and scripts. To connect from an MCP client such as Cursor, Claude Code, or Lingma, use Cloud Monitor MCP instead. Do not use the installation and authentication steps in this topic for MCP.

  • Cloud Monitor MCP Cloud and the open-source observability MCP Server are not the same service.

Capabilities

The Cloud Monitor CLI covers query and management operations for Cloud Monitor 2.0 in the following areas:

  • Integration and workspaces: integration policies, add-ons, and collection prechecks (integration); Cloud Monitor (CMS) workspaces (workspace); and data source integration and entity bundles (datasource)

  • Prometheus: Managed Service for Prometheus instances, aggregate views, and pre-aggregation rules; PromQL pass-through queries (prometheus)

  • Grafana: Managed Service for Grafana workspaces, including create, retrieve, update, and delete operations; data sources, dashboards, and folders within an instance (grafana, through ARMS)

  • Application observability: application performance management (APM) and real user monitoring (RUM) applications and configurations, agent configurations, log correlation, diagnostic tasks, and RUM symbol file uploads (apm, rum)

  • Synthetics monitoring: site monitoring tasks, public and internal detection points, and VPC metadata (synthetics)

  • Alerts and events: alert rules and templates, alert history (alert); notification channels (notification-channel); and Event Center event queries and Logstore addressing (event-hub)

  • Metrics and entities: metric queries for Cloud Monitor basic metrics (metric), metric metadata (meta), entity queries (entity), UModel queries (umodel), and trace search and call trees through Tracing Analysis (trace)

  • Reports and activation: resource usage reports (resource-watermark), tags (tag), resource groups (resource-group), and Alibaba Cloud service activation status (aliyun-service)

Download and install

After you install the cms2 plugin of Alibaba Cloud CLI, call the Cloud Monitor CLI through aliyun cms2.

Before you run commands, complete the following preparations: install Alibaba Cloud CLI and verify the cms2 plugin (this section), configure credentials (Authentication), grant the required permissions (RAM permissions), and make sure that the related Alibaba Cloud services are activated. To check the activation status of services such as Prometheus, Grafana, and Resource Center, run aliyun cms2 aliyun-service status.

Install or update Alibaba Cloud CLI

First, install or update Alibaba Cloud CLI to the latest version, and make sure that aliyun is in your PATH:

aliyun version

If Alibaba Cloud CLI is installed and available in your PATH, this command displays the installed CLI version.

Verify the installation

Run the following commands to verify that the cms2 plugin is installed:

aliyun cms2 --help
aliyun cms2 --version

If aliyun cms2 --help lists the available commands and aliyun cms2 --version displays version information, the plugin is installed. All subsequent commands use aliyun cms2. For example:

aliyun cms2 workspace list
aliyun cms2 alert rule list --workspace <workspace>

Authentication

The Cloud Monitor CLI does not take an AccessKey as a command business parameter. Whether a call succeeds depends on the RAM permissions of the current identity.

aliyun cms2 reuses the credentials of Alibaba Cloud CLI. (Recommended) Manage the credentials with aliyun configure.

# Interactive configuration (recommended)
aliyun configure

# Non-interactive configuration
aliyun configure set \
  --access-key-id <AccessKeyId> \
  --access-key-secret <AccessKeySecret> \
  --region cn-hangzhou

For more information, see Configure credentials.

Credentials are resolved in the following order of precedence, from highest to lowest:

  1. Command-line parameters: --access-key-id, --access-key-secret, and --security-token

  2. Environment variables: ALIBABA_CLOUD_CMS_ACCESS_KEY_ID, ALIBABA_CLOUD_CMS_ACCESS_KEY_SECRET, ALIBABA_CLOUD_CMS_SECURITY_TOKEN, and ALIBABA_CLOUD_CMS_REGION

  3. Alibaba Cloud CLI configuration: ~/.aliyun/config.json (written by aliyun configure)

Note

Take note of the following items:

  • Do not use the AccessKey of your Alibaba Cloud account. Use a RAM user and grant permissions based on the principle of least privilege.

  • Each precedence level can partially override the others. For example, you can provide only the AccessKey ID as a flag and let the configuration file supply the AccessKey secret. Make sure that the final credentials belong to the same account.

  • If you use multiple profiles, switch between them with aliyun configure switch --profile <name>. You can run aliyun sts GetCallerIdentity to check the current AccountId. aliyun sts GetCallerIdentity is a general Alibaba Cloud CLI command and is not part of the cms2 plugin.

  • Workspace names usually follow the pattern default-cms-<uid>-<region>. When you operate on a workspace, the credentials must belong to the same account.

RAM permissions

For read-only investigations, grant AliyunCloudMonitorReadOnlyAccess. Grafana workspace commands also require ARMS permissions, and trace and event query operations also require the Simple Log Service (SLS) permission log:GetLogStoreLogs. For write operations, grant AliyunCloudMonitorFullAccess, or grant only the precise actions listed in the Required API permissions column of each command table in Command reference.

The actions in the command tables map to the following API versions. Most management operations use CMS 2024-03-30. Basic monitoring metrics and resource usage reports use CMS 2019-01-01. Grafana workspaces use ARMS 2019-08-08. APM agent configurations use SLS 2020-12-30.

For information about system policies, see Cloud Monitor 2.0 RAM access policy reference.

Command reference

The CLI currently provides 196 leaf commands, grouped by the first segment of the command tree. The number of commands may change with version updates; the output of aliyun cms2 --help is the authoritative list. The tables in this section describe what each command does and the API permissions it requires. For the parameters, flags, and output format of a specific command, run that command with --help.

Command group

Capability area

Number of commands

integration

Provisioning

22

workspace

Workspace

8

datasource

Data source integration

7

prometheus

Prometheus

17

grafana

Grafana

26

apm

APM

32

rum

RUM

9

synthetics

Synthetics monitoring

13

resource-watermark

Resource usage reports

8

alert

Alerts

15

notification-channel

Notification channels

3

event-hub

Event Center

4

metric

Metric queries

11

entity

Entity queries

5

umodel

UModel

4

meta

Metadata

3

trace

Tracing Analysis

3

aliyun-service

Alibaba Cloud service activation

2

tag

Tags

3

resource-group

Resource groups

1

Provisioning (integration)

CLI command

Description

Required API permissions

integration addon get

Retrieves add-on metadata, schemas, and alert code templates

cms:GetAddon, cms:GetAddonSchema, and cms:GetAddonCodeTemplate

integration addon list

Lists the catalog of installable add-ons

cms:ListAddons

integration addon-release create

Creates an add-on release on an integration policy

cms:CreateAddonRelease

integration addon-release delete

Deletes an add-on release

cms:DeleteAddonRelease

integration addon-release get

Retrieves the details of an add-on release

cms:GetAddonRelease

integration addon-release list

Lists the add-on releases under an integration policy

cms:ListAddonReleases

integration addon-release update

Updates an add-on release

cms:UpdateAddonRelease

integration check-collector-target

Runs a precheck on collector target connectivity and analyzes metrics

cms:CheckIntegrationPolicyCollectorTarget

integration check-scrape-config

Performs service discovery and a relabel dry run for a deployed scrape configuration

cms:CheckIntegrationPolicyScrapeConfig

integration collector list

Lists the collectors under an integration policy

cms:ListIntegrationPolicyCollectors

integration custom-job list

Lists the custom scrape jobs under an integration policy

cms:ListIntegrationPolicyCustomScrapeJobRules

integration dashboard list

Lists the dashboards associated with an integration policy

cms:ListIntegrationPolicyDashboards

integration job-target list

Lists collection jobs or their scrape targets

cms:ListIntegrationPolicyCollectorJobTargets

integration pod-monitor list

Lists the PodMonitors under an integration policy

cms:ListIntegrationPolicyPodMonitors

integration policy create

Creates an integration policy

cms:CreateIntegrationPolicy

integration policy delete

Deletes an integration policy

cms:DeleteIntegrationPolicy

integration policy get

Retrieves the details of an integration policy

cms:GetIntegrationPolicy

integration policy list

Lists integration policies

cms:ListIntegrationPolicies

integration policy update

Updates an integration policy

cms:UpdateIntegrationPolicy

integration resource list

Lists the Kubernetes resources associated with an integration policy

cms:ListIntegrationPolicyResources

integration service-monitor list

Lists the ServiceMonitors under an integration policy

cms:ListIntegrationPolicyServiceMonitors

integration storage list

Lists the storage requirements of an integration policy

cms:ListIntegrationPolicyStorageRequirements

Workspace (workspace)

CLI command

Description

Required API permissions

workspace common-schema delete

Deletes a UModel common schema reference

cms:DeleteUmodelCommonSchemaRef

workspace common-schema list

Lists UModel common schema references

cms:GetUmodelCommonSchemaRef

workspace common-schema upsert

Creates or updates a UModel common schema reference

cms:UpsertUmodelCommonSchemaRef

workspace create

Creates a CMS workspace and performs initialization of UModel and EntityStore

cms:GetCloudResource, cms:CreateCloudResource, cms:PutWorkspace, cms:GetUModel, cms:CreateUModel, cms:GetEntityStore, and cms:CreateEntityStore

workspace delete

Deletes a CMS workspace

cms:DeleteWorkspace

workspace get

Retrieves the details of a CMS workspace

cms:GetWorkspace

workspace list

Lists CMS workspaces

cms:ListWorkspaces

workspace update

Updates a CMS workspace

cms:PutWorkspace

Data source integration (datasource)

CLI command

Description

Required API permissions

datasource create

Integrates a Prometheus instance, SLS Logstore, or MetricStore as a workspace UModel data source

cms:GetEntityStoreData, cms:UpsertUmodelData, and cms:GetPrometheusInstance (--type prom only)

datasource delete

Removes a data source from management and uninstalls the entity bundle instances on it

cms:GetEntityStoreData, cms:ListEntityBundleInstances, cms:DeleteEntityBundleInstance, and cms:DeleteUmodelData

datasource entity-bundle-instance create

Installs one or all matching entity model bundles on a data source

cms:CreateEntityBundleInstance

datasource entity-bundle-instance delete

Uninstalls an entity bundle installation record from a data source

cms:DeleteEntityBundleInstance

datasource entity-bundle-instance list

Lists the entity bundle instances installed on a data source

cms:ListEntityBundleInstances

datasource entity-bundle-templates

Lists the available entity bundle templates

cms:ListEntityBundleTemplates

datasource list

Lists the data sources integrated with a workspace

cms:GetEntityStoreData

Prometheus (prometheus)

CLI command

Description

Required API permissions

prometheus instance create

Creates a Prometheus instance

cms:CreatePrometheusInstance

prometheus instance delete

Deletes a Prometheus instance

cms:DeletePrometheusInstance

prometheus instance get

Retrieves the details of a Prometheus instance, including the HTTP API endpoint

cms:GetPrometheusInstance

prometheus instance list

Lists Prometheus instances

cms:ListPrometheusInstances

prometheus instance update

Updates a Prometheus instance

cms:UpdatePrometheusInstance

prometheus recording-rule create

Creates a pre-aggregation rule (Recording Rule / AggTaskGroup)

cms:CreateAggTaskGroup

prometheus recording-rule delete

Deletes a pre-aggregation rule

cms:DeleteAggTaskGroup

prometheus recording-rule get

Retrieves the details of a pre-aggregation rule

cms:GetAggTaskGroup

prometheus recording-rule list

Lists pre-aggregation rules

cms:ListAggTaskGroups

prometheus recording-rule start

Starts a pre-aggregation rule

cms:UpdateAggTaskGroupStatus

prometheus recording-rule stop

Stops a pre-aggregation rule

cms:UpdateAggTaskGroupStatus

prometheus recording-rule update

Updates a pre-aggregation rule

cms:UpdateAggTaskGroup

prometheus view create

Creates a Prometheus aggregate view

cms:CreatePrometheusView

prometheus view delete

Deletes a Prometheus aggregate view

cms:DeletePrometheusView

prometheus view get

Retrieves a Prometheus aggregate view

cms:GetPrometheusView

prometheus view list

Lists Prometheus aggregate views

cms:ListPrometheusViews

prometheus view update

Updates a Prometheus aggregate view

cms:UpdatePrometheusView

Grafana (grafana)

CLI command

Description

Required API permissions

grafana account create

Grants an Alibaba Cloud account access to a Grafana workspace

arms:CreateGrafanaWorkspaceAccount

grafana account delete

Deletes a Grafana workspace account

arms:DeleteGrafanaWorkspaceAccount

grafana account list

Lists Grafana workspace accounts

arms:ListGrafanaWorkspaceAccount

grafana account role delete

Deletes the organization role of a Grafana workspace account

arms:DeleteGrafanaWorkspaceAccountRole

grafana account role update

Adds or updates the organization role of a Grafana workspace account

arms:UpdateGrafanaWorkspaceAccountRole

grafana dashboard delete

Deletes a Grafana dashboard by UID

arms:GrafanaWorkspaceHttpApiProxy

grafana dashboard get

Retrieves the complete JSON of a Grafana dashboard by UID

arms:GrafanaWorkspaceHttpApiProxy

grafana dashboard panel-queries

Extracts the query statements of each panel in a dashboard

arms:GrafanaWorkspaceHttpApiProxy

grafana dashboard property

Reads a specified dashboard property by JSONPath

arms:GrafanaWorkspaceHttpApiProxy

grafana dashboard search

Searches Grafana dashboards by keyword

arms:GrafanaWorkspaceHttpApiProxy

grafana dashboard summary

Retrieves a compact dashboard summary (title, variables, and panel overview)

arms:GrafanaWorkspaceHttpApiProxy

grafana dashboard update

Creates or updates a Grafana dashboard (full JSON or patch)

arms:GrafanaWorkspaceHttpApiProxy

grafana datasource create

Creates a data source in a Grafana workspace

arms:GrafanaWorkspaceHttpApiProxy

grafana datasource delete

Deletes a Grafana data source

arms:GrafanaWorkspaceHttpApiProxy

grafana datasource get

Retrieves the details of a Grafana data source

arms:GrafanaWorkspaceHttpApiProxy

grafana datasource health

Checks the health status of a Grafana data source

arms:GrafanaWorkspaceHttpApiProxy

grafana datasource list

Lists Grafana data sources

arms:GrafanaWorkspaceHttpApiProxy

grafana datasource update

Updates a Grafana data source

arms:GrafanaWorkspaceHttpApiProxy

grafana folder create

Creates a Grafana folder

arms:GrafanaWorkspaceHttpApiProxy

grafana folder delete

Deletes a Grafana folder

arms:GrafanaWorkspaceHttpApiProxy

grafana folder search

Searches Grafana folders by keyword

arms:GrafanaWorkspaceHttpApiProxy

grafana workspace create

Creates a Grafana workspace

arms:CreateGrafanaWorkspace

grafana workspace delete

Deletes a Grafana workspace

arms:DeleteGrafanaWorkspace

grafana workspace get

Retrieves the details of a Grafana workspace

arms:GetGrafanaWorkspace

grafana workspace list

Lists Grafana workspaces

arms:ListGrafanaWorkspace

grafana workspace update

Updates a Grafana workspace

arms:UpdateGrafanaWorkspace

APM (apm)

CLI command

Description

Required API permissions

apm configuration create

Performs initialization of the APM observability infrastructure of a workspace (LicenseKey / endpoint)

cms:CreateServiceObservability

apm configuration get

Retrieves the APM observability configuration of a workspace

cms:GetServiceObservability

apm configuration update

Updates the APM observability instance settings of a workspace

cms:UpdateServiceObservability

apm log-correlation create

Creates a log correlation record for an APM application

cms:CreateServiceRecord

apm log-correlation delete

Deletes the log correlation record of an APM application

cms:DeleteServiceRecord

apm log-correlation get

Retrieves the log correlation record of an APM application

cms:GetServiceRecord

apm log-correlation list

Lists the log correlation records in a workspace

cms:ListServiceRecords

apm log-correlation update

Updates the log correlation record of an APM application

cms:UpdateServiceRecord

apm service-config convergence get

Retrieves the agent convergence configuration (SLS apm_convergence)

log:GetAgentInstanceConfig

apm service-config convergence patch

Partially updates agent convergence rules

log:GetAgentInstanceConfig and log:UpdateAgentInstanceConfig

apm service-config convergence update

Fully replaces the agent convergence configuration

log:GetAgentInstanceConfig and log:UpdateAgentInstanceConfig

apm service-config custom-extract get

Retrieves the business parameter extraction configuration (SLS apm_custom_extract)

log:GetAgentInstanceConfig

apm service-config custom-extract patch

Partially updates business parameter extraction rules

log:GetAgentInstanceConfig and log:UpdateAgentInstanceConfig

apm service-config custom-extract update

Fully replaces the business parameter extraction configuration

log:GetAgentInstanceConfig and log:UpdateAgentInstanceConfig

apm service-config get

Retrieves the main agent configuration (sampling / Trace / Metrics / Profile)

log:GetAgentInstanceConfig

apm service-config patch

Partially updates fields in the main agent configuration

log:GetAgentInstanceConfig and log:UpdateAgentInstanceConfig

apm service-config tag get

Retrieves the data enrichment configuration (SLS apm_tag)

log:GetAgentInstanceConfig

apm service-config tag patch

Partially updates the data enrichment configuration

log:GetAgentInstanceConfig and log:UpdateAgentInstanceConfig

apm service-config tag update

Fully replaces the data enrichment configuration

log:GetAgentInstanceConfig and log:UpdateAgentInstanceConfig

apm service-config update

Fully replaces the main agent configuration

log:GetAgentInstanceConfig and log:UpdateAgentInstanceConfig

apm service-config user-method get

Retrieves the custom monitored method configuration (SLS apm_user_method)

log:GetAgentInstanceConfig

apm service-config user-method patch

Partially updates the monitored method configuration

log:GetAgentInstanceConfig and log:UpdateAgentInstanceConfig

apm service-config user-method update

Fully replaces the monitored method configuration

log:GetAgentInstanceConfig and log:UpdateAgentInstanceConfig

apm service create

Creates an APM application service

cms:CreateService

apm service delete

Deletes an APM application service

cms:DeleteService

apm service get

Retrieves the details of an APM application service

cms:GetService

apm service list

Lists the APM application services in a workspace

cms:ListServices

apm service-task create

Creates a diagnostic task (such as HeapDump / LiveDebug)

cms:CreateServiceTask

apm service-task delete

Deletes a diagnostic task

cms:DeleteServiceTask

apm service-task get

Retrieves the details of a diagnostic task

cms:GetServiceTask

apm service-task list

Lists the diagnostic tasks of an application

cms:ListServiceTask

apm service update

Updates an APM application service

cms:UpdateService

RUM (rum)

CLI command

Description

Required API permissions

rum configuration create

Performs initialization of the RUM observability infrastructure of a workspace

cms:CreateServiceObservability

rum configuration get

Retrieves the RUM observability configuration of a workspace

cms:GetServiceObservability

rum configuration update

Updates the RUM observability instance settings of a workspace

cms:UpdateServiceObservability

rum service create

Creates a RUM application service

cms:CreateService

rum service delete

Deletes a RUM application service

cms:DeleteService

rum service get

Retrieves the details of a RUM application service

cms:GetService

rum service list

Lists the RUM application services in a workspace

cms:ListServices

rum service update

Updates a RUM application service

cms:UpdateService

rum upload

Uploads RUM symbol files (sourcemap / dSYM / ProGuard / native-symbol, and more)

cms:GetRumSymbolFileParams and OSS PostObject (short-term form credentials; no long-term OSS RAM permissions required)

Synthetics monitoring (synthetics)

CLI command

Description

Required API permissions

synthetics init

Performs initialization of the resources required by Synthetics monitoring

cms:InitializeSyntheticsResources

synthetics intranet-region list

Lists the regions available for internal detection

cms:DescribeIntranetRegions

synthetics intranet-security-group list

Lists the security groups available for internal detection

cms:DescribeSecurityGroupForIntranetSynthetic

synthetics intranet-vpc list

Lists the VPCs available for internal detection

cms:DescribeVpcForIntranetSynthetic

synthetics intranet-vswitch list

Lists the vSwitches available for internal detection

cms:DescribeVswitchForIntranetSynthetic

synthetics region list

Lists the detection point regions available for Synthetics monitoring

cms:ListAvailableRegionsForSynthetics

synthetics site-monitor create

Creates a site monitoring task

cms:CreateSiteMonitor

synthetics site-monitor delete

Deletes a site monitoring task

cms:DeleteSiteMonitor

synthetics site-monitor disable

Disables a site monitoring task

cms:DisableSiteMonitor

synthetics site-monitor enable

Enables a site monitoring task

cms:EnableSiteMonitor

synthetics site-monitor get

Retrieves the details of a site monitoring task

cms:GetSiteMonitor

synthetics site-monitor list

Lists site monitoring tasks

cms:ListSiteMonitors

synthetics site-monitor update

Updates a site monitoring task

cms:UpdateSiteMonitor

Resource usage reports (resource-watermark)

CLI command

Description

Required API permissions

resource-watermark download

Downloads the file of a completed resource usage report task

cms:DescribeResourceReportTask and an HTTP GET on the report DownloadUrl (no additional RAM action)

resource-watermark product-config

Queries the cloud services and metric configurations supported by resource usage reports

cms:DescribeResourceReportMetricConfig

resource-watermark schedule create

Creates a resource usage report schedule

cms:DescribeResourceReportMetricConfig and cms:CreateResourceReportSchedule

resource-watermark schedule delete

Deletes a resource usage report schedule

cms:DeleteResourceReportSchedule

resource-watermark schedule list

Lists resource usage report schedules

cms:DescribeResourceReportSchedule

resource-watermark schedule modify

Modifies a resource usage report schedule

cms:DescribeResourceReportMetricConfig and cms:ModifyResourceReportSchedule

resource-watermark task list

Lists resource usage report tasks

cms:DescribeResourceReportTask

resource-watermark task run-one

Triggers a one-off resource usage report task

cms:RunOneResourceReport

Alerts (alert)

CLI command

Description

Required API permissions

alert history list

Queries CMS 2.0 alert history, with filters for workspace, critical level, status, and time range

cms:ListAlertHistories

alert rule create

Creates an alert rule (ManageAlertRules action=CREATE)

cms:ManageAlertRules

alert rule delete

Deletes alert rules in batches by UUID

cms:ManageAlertRules

alert rule disable

Disables alert rules in batches

cms:ManageAlertRules

alert rule enable

Enables alert rules in batches

cms:ManageAlertRules

alert rule get

Retrieves the details of a single alert rule by UUID

cms:QueryAlertRules

alert rule list

Queries the list of alert rules in a workspace

cms:QueryAlertRules

alert rule patch

Incrementally updates an alert rule (unspecified fields keep their server-side values)

cms:ManageAlertRules

alert rule update

Fully replaces an alert rule

cms:ManageAlertRules

alert template apply

Materializes an alert template into one or more alert rules

cms:GetAlertRuleTemplate and cms:ManageAlertRules

alert template create

Creates a custom alert rule template

cms:CreateAlertRuleTemplate

alert template delete

Deletes a custom alert rule template by ID

cms:DeleteAlertRuleTemplate

alert template get

Retrieves an alert rule template by ID or UUID

cms:GetAlertRuleTemplate

alert template list

Lists alert rule templates

cms:ListAlertRuleTemplate

alert template update

Applies a field-level patch update to a custom alert rule template

cms:UpdateAlertRuleTemplate

Notification channels (notification-channel)

CLI command

Description

Required API permissions

notification-channel contact list

Lists alert contacts

cms:ListContacts

notification-channel robot list

Lists alert robots (DingTalk / Feishu / WeCom, and more)

cms:ListAlertRobots

notification-channel webhook list

Lists custom alert webhooks

cms:ListAlertWebhooks

Event Center (event-hub)

CLI command

Description

Required API permissions

event-hub addressing get

Queries the Logstore addressing of the four event types in a CMS 2.0 workspace

cms:DescribeEventStoreNaming

event-hub get

Retrieves the details of a single event by Event ID

log:GetLogStoreLogs

event-hub legacy-addressing get

Resolves the SLS destination of legacy CMS 1.0 events in the current account

log:GetProductDataCollection

event-hub list

Queries the event list from the SLS Event Store

log:GetLogStoreLogs

Metric queries (metric)

CLI command

Description

Required API permissions

metric basic cursor

Retrieves the cursor required by basic monitoring BatchExport

cms:Cursor

metric basic export

Batch exports basic monitoring time series data by cursor

cms:BatchExport

metric basic latest

Queries the latest data point of each time series (DescribeMetricLast)

cms:DescribeMetricLast

metric basic points

Queries basic monitoring time series aggregated by time window (DescribeMetricList)

cms:DescribeMetricList

metric basic range

Performs a cross-series aggregate range query on basic monitoring data (DescribeMetricData)

cms:DescribeMetricData

metric basic top

Ranks the latest data points sorted by statistic value (DescribeMetricTop)

cms:DescribeMetricTop

metric promql label-values

Passes through the Prometheus label-values API

cms:GetPrometheusInstance and Prometheus HTTP /api/v1/label/.../values (instance token or AK BasicAuth)

metric promql labels

Passes through the Prometheus labels API

cms:GetPrometheusInstance and Prometheus HTTP /api/v1/labels

metric promql query

Runs an instant PromQL query against a Prometheus instance

cms:GetPrometheusInstance and Prometheus HTTP /api/v1/query

metric promql query-range

Runs a range PromQL query against a Prometheus instance

cms:GetPrometheusInstance and Prometheus HTTP /api/v1/query_range

metric promql series

Finds time series by label matcher

cms:GetPrometheusInstance and Prometheus HTTP /api/v1/series

Entity queries (entity)

CLI command

Description

Required API permissions

entity health-rule create

Creates a health inspection rule group bound to an entity set

cms:CreateEntityHealthRules

entity health-rule delete

Deletes an entity health inspection rule group

cms:DeleteEntityHealthRules

entity health-rule list

Lists entity health inspection rule groups

cms:ListEntityHealthRules

entity health-rule update

Updates an entity health inspection rule group

cms:UpdateEntityHealthRules

entity query

Queries entity data from EntityStore or Resource Center CloudResource

cms:GetEntityStoreData (--source=EntityStore), cms:GetCloudResource (--source=CloudResource), and cms:GetCloudResourceData (--source=CloudResource)

UModel (umodel)

CLI command

Description

Required API permissions

umodel data get

Retrieves UModel objects in a workspace by domain

cms:GetEntityStoreData

umodel data list

Lists the UModel objects in a workspace

cms:GetEntityStoreData

umodel data query

Queries UModel objects with EntityStore SPL

cms:GetEntityStoreData

umodel data upload

Writes (upserts) UModel objects through a YAML or JSON body

cms:UpsertUmodelData

Metadata (meta)

CLI command

Description

Required API permissions

meta metrics

Queries Cloud Monitor metric metadata (metric name, unit, and dimensions)

cms:DescribeMetricMetaList

meta namespaces

Lists the available Cloud Monitor namespaces and service codes

cms:DescribeProjectMeta

meta regions

Lists the business regions available to the current account

cms:GetPrometheusUserSetting

Tracing Analysis (trace)

CLI command

Description

Required API permissions

trace query

Runs an SLS SQL aggregate query on the Trace Logstore

cms:GetEntityStoreData and log:GetLogStoreLogs

trace search

Searches spans by SLS filter expression

cms:GetEntityStoreData and log:GetLogStoreLogs

trace tree

Retrieves all spans by Trace ID and assembles the call tree

cms:GetEntityStoreData and log:GetLogStoreLogs

Alibaba Cloud service activation (aliyun-service)

CLI command

Description

Required API permissions

aliyun-service open

Returns the activation or purchase page URL of a specified Alibaba Cloud service. For resource-center / resource-directory, returns console URLs only, without calling OpenAPI

cms:GetPrometheusUserSetting (prometheus / prometheusgb / ackpro / grafana / cmee)

aliyun-service status

Checks the activation status of services such as Prometheus, Hybrid Cloud Monitoring, Grafana, and Resource Center

cms:GetCmsService (prometheus / ackpro), cms:DescribeMonitorResourceQuotaAttribute (cmee, CMS 2019-01-01), arms:CheckServiceStatus (grafana), resourcecenter:GetResourceCenterServiceStatus (resource-center), and resourcemanager:GetResourceDirectory (resource-directory)

Tags (tag)

CLI command

Description

Required API permissions

tag bind

Binds tags to Cloud Monitor service resources

cms:TagResources

tag list

Lists the tags on Cloud Monitor service resources

cms:ListTagResources

tag unbind

Unbinds tags from Cloud Monitor service resources

cms:UntagResources

Resource groups (resource-group)

CLI command

Description

Required API permissions

resource-group list

Lists the resource groups in an account

resourcemanager:ListResourceGroups

References