Manage integrations
The Cloud Monitor Integration Center CLI aliyun cms2 manages monitoring data ingestion for applications deployed in Conatiner Service for Kubernetes (ACK), Elastic Compute Service (ECS), and other cloud services. The management is built around integration policies and add-on releases: you create an integration policy first, then deploy one or more add-ons under the policy.
Subcommand overview
Subcommand | Description |
| Query the add-on catalog (metadata, parameter schema, and code templates). This is the first step before integration. |
| Manage integration policies (create, query, update, delete, and list). |
| Manage add-on releases under a policy (deploy, query, update, and delete). |
| Query collectors, custom collection jobs, and collection targets. Run with |
| Query dashboards, storage requirements, and resources associated with an integration policy. Run with |
| Pre-check collection target connectivity and metric analysis. Run with |
| Dry-run a deployed scrape configuration (service discovery and relabel verification). Run with |
Prerequisites
The CLI tool is installed and configured.
You have an AccessKey for the target Alibaba Cloud account with the
AliyunCloudMonitorFullAccesspermission granted.A workspace is created. The workspace name is typically in the format
default-cms-{userId}-{regionId}.
Typical workflow
# 1. Discover available addons and view the parameter schema and integration guide
aliyun cms2 integration addon list --search ack
aliyun cms2 integration addon --addon-name cloud-acs-ack
# 2. Create an integration policy
aliyun cms2 integration policy create --body '{
"policyType": "CS",
"policyName": "my-ack-policy",
"workspace": "default-cms-12345-cn-hangzhou",
"entityGroup": {
"clusterEntityType": "acs.ack.cluster",
"clusterId": "c1234567890abcdef"
}
}'
# The response returns a policyId, such as ip-abc123
# 3. Deploy an addon under the policy
aliyun cms2 integration addon-release create --policy-id ip-abc123 --body '{
"addonName": "cloud-acs-ack",
"version": "*",
"envType": "CS",
"workspace": "default-cms-12345-cn-hangzhou",
"values": "{\"clusterId\":\"c1234567890abcdef\"}"
}'
# 4. Verify the deployment
aliyun cms2 integration addon-release list --policy-id ip-abc123Add-on catalog
The add-on catalog lets you discover available add-ons and their parameter schemas before integration. Before you integrate a cloud service, run integration addon to view the add-on's policyType, envType, and values parameter schema.
integration addon — View add-on details
When you specify --addon-name, the integration addon command outputs the add-on metadata, parameter schema, and integration guide. If one of the underlying API calls fails, the command still returns partial results.
# View the complete addon information (metadata + schema + integration guide)
aliyun cms2 integration addon --addon-name cloud-acs-ack
# Specify the environment type
aliyun cms2 integration addon --addon-name cloud-acs-ack --env-type CSParameter | Type | Description |
| string | Add-on name. When specified, the command displays details and the integration guide. |
| string | Environment type ( |
| string | Add-on version. Default: latest. |
| string | Language ( |
integration addon list — List add-ons
# List all addons
aliyun cms2 integration addon list
# Filter by category
aliyun cms2 integration addon list --category database
# Search by keyword
aliyun cms2 integration addon list --search ack
# Filter by entity type (OR semantics, comma-separated)
aliyun cms2 integration addon list --entity-type acs.ecs.instance,acs.rds.instanceParameter | Type | Description |
| string | Filter by category, such as |
| string | Filter by keyword. |
| string | Filter by entity type (comma-separated, OR semantics). |
| string | Language ( |
integration addon get — Get add-on details
The integration addon get command combines the GetAddon, GetAddonSchema, and GetAddonCodeTemplate APIs and returns the add-on metadata, parameter schema, and code template. If any API call fails, the command fails immediately. For fault-tolerant discovery, use integration addon --addon-name instead.
aliyun cms2 integration addon get --addon-name cloud-acs-ack --env-type CSParameter | Type | Description |
| string | Add-on name. Required. |
| string | Environment type ( |
| string | Add-on version. Default: latest. |
| string | Language ( |
Integration policies
The integration policy subcommand manages the lifecycle of integration policies, including creation, query, update, deletion, and listing.
integration policy create — Create a policy
# Create a policy for cloud service integration
aliyun cms2 integration policy create --body '{
"policyType": "Cloud",
"policyName": "my-rds-policy",
"workspace": "default-cms-12345-cn-hangzhou"
}'
# Create a policy for ACK integration
aliyun cms2 integration policy create --body '{
"policyType": "CS",
"policyName": "my-ack-policy",
"workspace": "default-cms-12345-cn-hangzhou",
"entityGroup": {
"clusterEntityType": "acs.ack.cluster",
"clusterId": "c1234567890abcdef"
}
}'
# Create a policy from a JSON file
aliyun cms2 integration policy create --body @./policy.jsonParameter | Type | Description |
| string | Request body as inline JSON or |
| bool | Print an example request body and exit. |
| bool | Print the JSON schema of the request body and exit. |
Required body fields
Field | Description |
| Policy type, such as |
| Policy name. Must not be empty. |
| Workspace name. |
For container scenarios (policyType=CS), entityGroup.clusterEntityType (acs.ack.cluster) and entityGroup.clusterId (ACK cluster ID) are also required. For cross-account scenarios, specify the UID of the account that owns the target instance in entityGroup.entityUserId. The response returns the generated policyId.
integration policy get — Query a policy
aliyun cms2 integration policy get --policy-id ip-abc123def456Parameter | Type | Description |
| string | Integration policy ID. Required. |
integration policy update — Update a policy
Only the fields included in the body are modified. Common uses include renaming the policy, changing feePackage, or updating resourceGroupId or tags.
aliyun cms2 integration policy update --policy-id ip-abc123def456 --body '{
"policyName": "new-policy-name",
"feePackage": "CS_Pro",
"resourceGroupId": "rg-aekzoiafjtr7zyq",
"tags": [{"key": "env", "value": "production"}]
}'Parameter | Type | Description |
| string | Integration policy ID. Required. |
| string | Request body as inline JSON or |
integration policy delete — Delete a policy
Deleting a policy triggers a cascade delete of all add-on releases under it. You do not need to delete add-on releases separately beforehand.
This operation is irreversible.
aliyun cms2 integration policy delete --policy-id ip-abc123def456Parameter | Type | Description |
| string | Integration policy ID. Required. |
integration policy list — List policies
# List all policies
aliyun cms2 integration policy list
# Filter by type
aliyun cms2 integration policy list --policy-type CS
# Filter by workspace and region
aliyun cms2 integration policy list --workspace default-cms-12345-cn-hangzhou \
--filter-region-ids cn-hangzhou,cn-shanghai
# Search by keyword
aliyun cms2 integration policy list --query my-policy
# Paged query
aliyun cms2 integration policy list --max-results 10 --next-token "eyJ..."Parameter | Type | Description |
| string | Filter by policy type ( |
| string | Filter by policy ID. |
| string | Filter by policy name. |
| string | Filter by workspace. |
| string | Filter by region ID (comma-separated). |
| string | Filter by Prometheus instance ID. |
| string | Filter by bound resource ID. |
| string | Filter by entity group ID (comma-separated). |
| string | Filter by resource group. |
| string | Filter by add-on name. |
| string | Filter by keyword. |
| string | Filter by tag (JSON array, such as |
| int32 | Maximum number of results to return. Default: 30. Maximum: 100. |
| string | Pagination token. |
Add-on releases
An add-on release represents a deployed monitoring add-on that contains the add-on name, version, parameter values (values, an escaped JSON string), and environment type. All subcommands require --policy-id to specify the parent integration policy.
integration addon-release create — Deploy an add-on
# Deploy a CS addon (values carry cluster parameters)
aliyun cms2 integration addon-release create --policy-id ip-abc123 --body '{
"addonName": "cloud-acs-ack", "version": "*", "envType": "CS",
"workspace": "default-cms-12345-cn-hangzhou",
"values": "{\"clusterId\":\"c123\",\"clusterName\":\"my-cluster\"}"
}'
# Deploy a cloud addon with entity type and region filtering
aliyun cms2 integration addon-release create --policy-id ip-abc123 --body '{
"addonName": "cloud-rds", "version": "1.2.29", "envType": "Cloud",
"workspace": "my-ws", "values": "{}",
"entityRules": { "entityTypes": ["acs.rds.instance"], "regionIds": ["cn-hangzhou"] }
}'
# Deploy from a JSON file
aliyun cms2 integration addon-release create --policy-id ip-abc123 --body @./release.jsonParameter | Type | Description |
| string | Integration policy ID. Required. |
| string | Request body as inline JSON or |
| bool | Print an example request body and exit. |
| bool | Print the JSON schema of the request body and exit. |
Required body fields
Field | Description |
| Add-on name from the add-on catalog, such as |
| Add-on version. Use |
| Environment type ( |
| Workspace name. |
| An escaped JSON string that conforms to the add-on parameter schema, such as |
Usage notes
valuesis an escaped JSON string, not a nested object.For cloud-type add-ons, you can use the optional
entityRulestop-level field to control the monitoring scope:entityTypes(required, wildcards not supported) andregionIds(optional). You can further narrow the scope with one ofresourceGroupId,tags, orinstanceIds.For cross-account CS integration,
values.feePackagemust be set toCS_Pro.Before deployment, run
integration addon get --addon-name <NAME>to viewdependencies.services, and usealiyun-service status --service-name <svc>to confirm that dependent services are activated (skip entries whose names containroleas these are service-linked roles).
Get, list, update, and delete add-on releases
# Query a single addon release
aliyun cms2 integration addon-release get --policy-id ip-abc123 --release-id <id>
# List all addon releases under a policy
aliyun cms2 integration addon-release list --policy-id ip-abc123
# Update addon parameters
aliyun cms2 integration addon-release update --policy-id ip-abc123 --body @./release-update.json
# Delete an addon release
aliyun cms2 integration addon-release delete --policy-id ip-abc123 --release-id <id>All subcommands above require --policy-id. For detailed parameter information on get, update, and delete, run the respective command with --help.
Limits
The
listcommand returns a single page. It does not paginate automatically. Use thenextTokenin the response to request the next page.The
createandupdatecommands do not perform client-side schema validation on the request body. Field-level constraints are validated by the API.The
--tagparameter must be a JSON array with lowercase field names:[{"key":"k","value":"v"}].For specific parameters of each subcommand, run
aliyun cms2 integration <subcommand> --help.