In addition to its visual console, Cloud Monitor provides several ways to interact with the service, including online OpenAPI debugging, the Alibaba Cloud SDK, the Alibaba Cloud CLI, and Terraform. To develop with Cloud Monitor more efficiently, choose the method that best fits your needs.
OpenAPI
Alibaba Cloud offers the OpenAPI Portal to help you quickly learn and use the OpenAPI of cloud services. The portal provides features such as intelligent API search, documentation, online debugging, SDK downloads, code samples, error diagnostics, and call statistics. You can use the OpenAPI Portal to call the OpenAPI operations of various Alibaba Cloud services and view the requests and responses. The portal also automatically generates SDK sample code to help you get started quickly. For more information, see What is OpenAPI?.
Version
Alibaba Cloud OpenAPI uses version numbers to manage the API lists for major versions of its cloud services. For example, Cloud Monitor currently supports the API version 2019-01-01. The string 2019-01-01 is a version identifier, not a date. This identifier always provides access to the latest API data and does not mean the API is unchanged since that date.
|
Version |
Description |
|
Recommended |
Online debugging
Cloud Monitor provides API debugging features in the OpenAPI Portal. Before calling an API, you must know the service version, endpoints, and integration methods.
In the OpenAPI Portal, select the CreateMonitorGroup (create application group) operation of Cloud Monitor. Set the service region to China (Hangzhou). Specify the GroupName (application group name, for example, ECS_Group) and ContactGroups (alert contact group, for example, ECS_Alert_Group, whose value can be obtained from the response of the DescribeContactGroupList operation). Then, click Send Request.
Debugging page
To debug an API, go to the Cloud Monitor API debugging list.
Endpoints
Select the endpoint address for the region where your resources are located to obtain the lowest latency. For example, the public endpoint for Cloud Monitor in the China (Zhangjiakou) region is metrics.cn-zhangjiakou.aliyuncs.com, and the VPC endpoint is metrics-vpc.cn-zhangjiakou.aliyuncs.com.
-
Public endpoints are globally accessible.
-
VPC endpoints are accessible only from a VPC in the same region.
-
High security: VPC endpoints can be accessed only from within a VPC, which provides enhanced security and privacy.
-
Faster response times: Because they use the internal network, VPC endpoints typically offer faster response times and avoid public network latency or bandwidth limits.
-
Lower costs: VPC endpoints use internal network communication.
-
For more information, see Endpoints.
User identities
By default, the OpenAPI Portal uses your Alibaba Cloud account to make API calls. Because an Alibaba Cloud account has full access to all APIs, using it for routine operations poses a high security risk. For improved security, we recommend creating and using a RAM user for API access and daily O&M. Grant permissions to the RAM user based on your business requirements before you make API calls. The RAM user must have the required permissions to manage Cloud Monitor resources. For more information, see Grant permissions to a RAM user.
|
Identity |
Supported |
|
Yes |
|
|
RAM user (Recommended) |
Yes |
|
RAM role (Recommended) |
Yes |
More information
Integration methods
Using an SDK is the easiest and most supported way to call OpenAPI operations.
Integration methods
|
Method |
Supported |
|
Alibaba Cloud SDK (Recommended) |
Yes |
|
Yes |
|
|
Yes |
|
|
No |
|
|
Yes |
-
Alibaba Cloud SDK
-
Alibaba Cloud provides SDKs in multiple programming languages, including Java, C#, Go, Python, Node.js/TypeScript, PHP, and C++. You can integrate an SDK into your application to call API operations. SDKs simplify development by handling tasks like request signing, timeouts, retries, and response marshalling. For more information about Alibaba Cloud SDKs, see Alibaba Cloud SDK.
-
You can use an Alibaba Cloud SDK to call Cloud Monitor API operations. For information about the supported languages and dependencies, see Cloud Monitor SDK.
-
-
Alibaba Cloud CLI
-
The Alibaba Cloud CLI is a unified tool built on OpenAPI that lets you manage your Alibaba Cloud services from a command-line shell. For more information about Alibaba Cloud CLI, see What is Alibaba Cloud CLI?.
-
You can use Alibaba Cloud CLI to call Cloud Monitor API operations. For more information, see CLI integration examples.
-
-
Terraform
-
Terraform is an open-source tool that allows you to safely and efficiently preview, provision, and manage cloud infrastructure and resources. It operates similarly to Resource Orchestration Service (ROS) by converting templates into internal data to make OpenAPI calls. For more information, see What is Terraform?.
-
You can use Terraform to orchestrate and manage Cloud Monitor. A range of regular and data resources are supported. For a complete list, see Cloud Monitor Terraform resources and data sources.
-
To get started with Terraform for Cloud Monitor, see Use Terraform to create an alert contact.
-
-
Resource Orchestration Service (ROS)
-
Resource Orchestration Service (ROS) is an Alibaba Cloud service that simplifies the management of cloud resources. You can write templates to define the required Alibaba Cloud resources, such as ECS instances and ApsaraDB for RDS instances, and their dependencies. The ROS orchestration engine automatically creates and configures all resources based on your templates to automate deployment and O&M. For more information, see What is Resource Orchestration Service?.
-
You cannot use ROS to call Cloud Monitor API operations.
-
-
Direct HTTP calls
To make direct HTTP calls, you must implement the request signing algorithm and construct the requests yourself. For more information about the signing mechanism, see Cloud Monitor API overview and V3 request body and signature mechanism.
Notes
If an API call returns an error, check the request parameters and their values against the returned error code.
You can also record the request ID or SDK error message from the response and use the Alibaba Cloud OpenAPI Diagnostic Platform to diagnose the issue.
FAQ
-
Cloud Monitor provides basic monitoring for IT infrastructure and public network quality monitoring. It also provides business monitoring based on events, custom metrics, and logs to deliver a comprehensive and efficient monitoring service. To learn more about the product, see What is Cloud Monitor?.
-
In addition to Java, SDKs are available for other programming languages, including C#, Go, Python, TypeScript, PHP, and C++. For more information, see SDK Reference.