- What's New
- Function Overview
- Service Overview
- Getting Started
-
User Guide
- Overview
- Permissions Management
-
Cloud Resource Monitoring
- Resource Groups
-
Server Monitoring
- Overview
- Cloud Eye Plug-in (Agent)
- Process Monitoring
- Viewing Server Monitoring Metrics
- Creating an Alarm Rule to Monitor a Server
- Viewing Server Monitoring Details
- Cloud Service Monitoring
- Task Center
- Visualization (Dashboards)
-
Alarm Management
- Overview
- Alarm Rules
- Alarm Records
-
Alarm Templates
- Viewing Alarm Templates
- Creating a Custom Template or Custom Event Template
- Modifying a Custom Template or Custom Event Template
- Deleting a Custom Template or Custom Event Template
- Copying a Custom Template or Custom Event Template
- Associating a Custom Template with a Resource Group
- Importing and Exporting Custom Template or Custom Event Templates
- Alarm Notifications
- Example: Creating an Alarm Rule to Monitor ECS CPU Usage
- One-Click Monitoring
- Alarm Masking
- Event Monitoring
- Access Center
- Data Dump
- Quotas and Audit
- Cloud Product Metrics
- Change History
- Best Practices
-
API Reference
- Before You Start
- API Overview
- Calling APIs
- Getting Started
-
API V1
- API Version Management
- Metrics
-
Alarm Rules
- Querying Alarm Rules
- Querying Details of an Alarm Rule
- Enabling or Disabling an Alarm Rule
- Deleting an Alarm Rule
- Creating an Alarm Rule
- Creating a Custom Alarm Template
- Deleting a Custom Alarm Template
- Querying the Alarm History of an Alarm Rule
- Querying Custom Alarm Templates
- Updating a Custom Alarm Template
- Modifying an Alarm Rule
- Monitoring Data
- Quotas
- Resource Groups
- Event Monitoring
-
API V2
- Alarm Rules
- Resources in an Alarm Rule
- Alarm Policies
- Alarm Notifications
- Alarm Records
- Alarm Templates
- Alarm Rules Associated with an Alarm Template
- Resource Groups
- Resources in a Resource Group
-
One-Click Monitoring
- Enabling One-Click Monitoring
- Querying Services and Resources That Support One-Click Monitoring
- Querying Alarm Rules of One Service in One-Click Monitoring
- Batch Enabling or Disabling Alarm Rules of One Service in One-Click Monitoring
- Batch Disabling One-Click Motoring
- Batch Modifying Alarm Notifications in Alarm Rules for One Service That Has One-Click Monitoring Enabled
- Batch Enabling or Disabling Alarm Policies in Alarm Rules for One Service That Has One-Click Monitoring Enabled
-
Alarm Notification Masking
- Creating Alarm Notification Masking Rules in Batches
- Modifying the Masking Time of Alarm Notification Masking Rules in Batches
- Modifying an Alarm Notification Masking Rule
- Deleting Alarm Notification Masking Rules in Batches
- Querying Alarm Notification Masking Rules
- Querying Resources for Which Alarm Notifications Have Been Masked
- Dashboards
- Graphs
- Resource Tags
- Metric Management
- API V3
-
Permissions Policies and Supported Actions
- Introduction
- Supported Actions of the API Version Management APIs
- Supported Actions of the Metric Management API
- Supported Actions of the Alarm Rule Management APIs
- Supported Actions of the Monitoring Data Management APIs
- Supported Actions of the Quota Management API
- Supported Actions of the Event Monitoring API
- Common Parameters
- Appendix
- Change History
- SDK Reference
-
FAQs
-
General Consulting
- What Is Rollup?
- How Long Is Metric Data Retained?
- How Many Rollup Methods Does Cloud Eye Support?
- How Can I Export Collected Data?
- What Should I Do If I See Garbled Chinese Characters in an Exported CSV File?
- Why Can't a User of an Enterprise Project View the One-Click Monitoring Function?
- Why Can't a User of an Enterprise Project Select All Resources When Configuring Alarm Rules?
-
Server Monitoring
-
Agent Installation
- How Do I Configure DNS and Security Groups?
- How Do I Configure an Agency?
- How Does the Cloud Eye Agent Obtain a Temporary AK/SK by Authorization?
- What OSs Does the Agent Support?
- Resource Usage and Circuit Breaker Pattern of Agent
- What Should I Do If the Monitoring Is Periodically Interrupted or the Agent Status Keeps Changing?
- What Should I Do If a Service Port Is Used by the Agent?
- Troubleshooting Agent One-Click Restoration Failures
- No Monitoring Data Is Displayed After One-Click Restoration Performed for the Agent
- Does the Server Monitoring Agent Affect Server Performance?
- Troubleshooting the Problem of Reported Metrics Being Discarded
- Metrics
-
Agent Statuses
- How Can I Quickly Restore Agent Configurations?
- What Should I Do If the Agent Status Is Faulty?
- What Should I Do If the Agent Status Is Stopped?
- What Should I Do If the Agent Status Is Running But There Is No Monitoring Data?
- What Can I Do If No Monitoring Data Is Displayed After One-Click Agent Restoration? (Old Agent)
- How Can I Enable the OS Monitoring for a New ECS?
- Agent Status Description and Troubleshooting Methods
- How Do I Obtain Debug Logs of the Agent?
-
Agent Installation
-
Alarm Notifications or False Alarms
- What Is an Alarm Notification? How Many Types of Alarm Notifications Are There? How Can I Configure an Alarm Notification?
- What Alarm Status Does Cloud Eye Support?
- What Alarm Severities Does Cloud Eye Support?
- When Will an "Insufficient data" Alarm Be Triggered?
- How Do I Monitor and View the Disk Usage?
- How Can I Change the Phone Number and Email Address for Receiving Alarm Notifications?
- How Can a User Account Receive Alarm Notifications?
- Why Did I Receive a Bandwidth Overflow Notification While There Being No Bandwidth Overflow Record in the Monitoring Data?
-
Monitored Data Exceptions
- Why Is the Monitoring Data Not Displayed on the Cloud Eye Console?
- Why I Cannot See the Monitoring Data on the Cloud Eye Console After Purchasing Cloud Service Resources?
- Why Doesn't the Cloud Eye Console Display the OS Monitoring Data or Why Isn't the Data Displayed Immediately After the Agent Is Installed and Configured on an ECS?
- Why Is Basic Monitoring Data Inconsistent with Data Monitored by the OS?
- Why Are the Network Traffic Metric Values in Cloud Eye Different from Those Detected in ECS?
- Why Is the Metric Collection Point Lost During Certain Periods of Time?
- Why Are the Four Metrics Memory Usage, Disk Usage, Inband Incoming Rate, and Inband Outgoing Rate Not Displayed for an ECS?
- What Are the Impacts on ECS Metrics If UVP VMTools Is Not Installed on ECSs?
- Why Are the Inbound Bandwidth and Outbound Bandwidth Negative?
- Metric Descriptions
-
User Permissions
- What Should I Do If the IAM Account Permissions Are Abnormal?
- What Can I Do If the System Displays a Message Indicating Insufficient Permissions When I Access Cloud Eye?
- What Can I Do If the System Displays a Message Indicating Insufficient Permissions When I Click Configure on the Server Monitoring Page?
-
General Consulting
- Videos
-
More Documents
-
User Guide (ME-Abu Dhabi Region)
- Product Introduction
- Getting Started
- Dashboards
- Resource Groups
- Using the Alarm Function
-
Server Monitoring
- Introduction to Server Monitoring
- Agent Installation and Configuration
- Agent Features per Version
- Installing and Configuring the Agent on a Linux ECS or BMS
- Installing and Configuring the Agent on a Windows ECS
- Installing the Agents in Batches on Linux ECSs
- Managing the Agent
- Installing the Direct Connect Metric Collection Plug-ins
- Process Monitoring
- Viewing Server Monitoring Metrics
- Creating an Alarm Rule to Monitor a Server
- Custom Monitoring
- Event Monitoring
- Task Center
- Data Dump
- Cloud Service Monitoring
- Auditing Operation Records on Cloud Eye
- Permissions Management
- Quota Adjustment
- Services Interconnected with Cloud Eye
-
FAQs
-
General Consulting
- What Is Rollup?
- How Long Is Metric Data Retained?
- How Many Rollup Methods Does Cloud Eye Support?
- How Can I Export Collected Data?
- Which Services Does Cloud Eye Support Permission- and Region-based Monitoring in the Enterprise Project Dimension?
- Which Cloud Eye Resources Support the Enterprise Project Feature?
- Why Can a User of an Enterprise Project View the Resource Information of the Account on the Overview Page?
-
Server Monitoring
- How Can I Quickly Restore the Agent Configuration?
- How Can I Make a Newly Purchased ECS Monitor Its OS?
- Why Is a BMS with the Agent Installed Displayed in the ECS List on the Server Monitoring Page?
- What OSs Does the Agent Support?
- What Statuses Does the Agent Have?
- What Should I Do If the Monitoring Period Is Interrupted or the Agent Status Keeps Changing?
- What Should I Do If the Service Port Is Used by the Agent?
- How Can I Create an Agency?
- What Can't I Create Another Agency?
- What Should I Do If Agency CESAgentAutoConfigAgency Failed to Be Automatically Created?
- What Can I Do If Agency CESAgentAutoConfigAgency Is Invalid?
- Will the Agent Affect the Server Performance?
- What Should I Do If the Agent Status Is Faulty?
- What Should I Do If the Agent Status Is Stopped?
- What Should I Do If the Agent Status Is Running But There Is No Monitoring Data?
- How Do I Troubleshoot the Agent One-Click Restoration Failure?
- What Can I Do If No Monitoring Data Is Displayed After One-Click Agent Restoration?
-
Alarm Notifications or False Alarms
- What Is an Alarm Notification? How Many Types of Alarm Notifications Are There?
- What Alarm Status Does Cloud Eye Support?
- What Alarm Severities Does Cloud Eye Support?
- When Will an "Insufficient data" Alarm Be Triggered?
- How Do I Monitor and View the Disk Usage?
- How Can I Change the Mobile Number and Email Address for Receiving Alarm Notifications?
- How Can an IAM User Receive Alarm Notifications?
- Why Did I Receive a Bandwidth Overflow Notification While There Being No Bandwidth Overflow Record in the Monitoring Data?
-
Monitored Data Exceptions
- Why Is the Monitoring Data Not Displayed on the Cloud Eye Console?
- Why I Cannot See the Monitoring Data on the Cloud Eye Console After Purchasing Cloud Service Resources?
- Why Is OS Monitoring Data Not Displayed or Not Displayed Immediately After the Agent Is Installed and Configured on a server?
- Why Is Basic Monitoring Data Inconsistent with the Data Monitored by the OS?
- Why Are the Network Traffic Metric Values in Cloud Eye Different from Those Detected in ECS?
- Why Is the Metric Collection Point Lost During a Certain Period of Time?
- Why Are Memory Usage, Disk Usage, Inband Incoming Rate, and Inband Outgoing Rate Not Displayed for an ECS?
- What Are the Impacts on ECS Metrics If UVP VMTools Is Not Installed on ECSs?
- Why Are the Inbound Bandwidth and Outbound Bandwidth Negative?
- Metric Descriptions
- User Permissions
-
General Consulting
-
API Reference (ME-Abu Dhabi Region)
- Before You Start
- API Overview
- Calling APIs
- API DescriptionAPI V1
- API v2
-
Permissions Policies and Supported Actions
- Introduction
- Supported Actions of the API Version Management APIs
- Supported Actions of the Metric Management API
- Supported Actions of the Alarm Rule Management APIs
- Supported Actions of the Monitoring Data Management APIs
- Supported Actions of the Quota Management API
- Supported Actions of the Event Monitoring API
- Common Parameters
- Appendix
- Change History
-
User Guide (Paris Region)
- Product Introduction
- Getting Started
- Monitoring Panels
- Using the Alarm Function
- Custom Monitoring
- Services Interconnected with Cloud Eye
- FAQs
- Change History
- API Reference (Paris Region)
-
User Guide (Kuala Lumpur Region)
- Product Introduction
- Getting Started
- Dashboards
- Resource Groups
- Using the Alarm Function
-
Server Monitoring
- Introduction to Server Monitoring
- Agent Installation and Configuration
- Agent Features per Version
- Installing and Configuring the Agent on a Linux ECS or BMS
- Installing and Configuring the Agent on a Windows ECS
- Installing the Agents in Batches on Linux ECSs
- Managing the Agent
- Process Monitoring
- Viewing Server Monitoring Metrics
- Creating an Alarm Rule to Monitor a Server
- Custom Monitoring
- Event Monitoring
- Data Dump
- Auditing Operation Records on Cloud Eye
- Permissions Management
- Quota Adjustment
- Services Interconnected with Cloud Eye
-
FAQs
- General Consulting
-
Server Monitoring
- How Can I Quickly Restore the Agent Configuration?
- Why Is a BMS with the Agent Installed Displayed in the ECS List on the Server Monitoring Page?
- What OSs Does the Agent Support?
- What Statuses Does the Agent Have?
- What Should I Do If the Monitoring Period Is Interrupted or the Agent Status Keeps Changing?
- What Should I Do If the Service Port Is Used by the Agent?
- How Can I Create an Agency?
- What Can't I Create Another Agency?
- What Should I Do If Agency CESAgentAutoConfigAgency Failed to Be Automatically Created?
- What Can I Do If Agency CESAgentAutoConfigAgency Is Invalid?
- Will the Agent Affect the Server Performance?
- What Should I Do If the Agent Status Is Faulty?
-
Alarm Notifications or False Alarms
- What Is an Alarm Notification? How Many Types of Alarm Notifications Are There?
- What Alarm Status Does Cloud Eye Support?
- What Alarm Severities Does Cloud Eye Support?
- When Will an "Insufficient data" Alarm Be Triggered?
- How Can I Change the Mobile Number and Email Address for Receiving Alarm Notifications?
- How Can an IAM User Receive Alarm Notifications?
- Why Did I Receive a Bandwidth Overflow Notification While There Being No Bandwidth Overflow Record in the Monitoring Data?
-
Monitored Data Exceptions
- Why Is the Monitoring Data Not Displayed on the Cloud Eye Console?
- Why I Cannot See the Monitoring Data on the Cloud Eye Console After Purchasing Cloud Service Resources?
- Why Is OS Monitoring Data Not Displayed or Not Displayed Immediately After the Agent Is Installed and Configured on a server?
- Why Is Basic Monitoring Data Inconsistent with the Data Monitored by the OS?
- Why Are the Network Traffic Metric Values in Cloud Eye Different from Those Detected in ECS?
- Why Is the Metric Collection Point Lost During a Certain Period of Time?
- Why Are Memory Usage, Disk Usage, Inband Incoming Rate, and Inband Outgoing Rate Not Displayed for an ECS?
- What Are the Impacts on ECS Metrics If UVP VMTools Is Not Installed on ECSs?
- User Permissions
- Change History
- API Reference (Kuala Lumpur Region)
-
User Guide (Ankara Region)
- Product Introduction
- Getting Started
- Dashboards
- Resource Groups
- Using the Alarm Function
-
Server Monitoring
- Introduction to Server Monitoring
- Agent Installation and Configuration
- Installing and Configuring the Agent on a Linux ECS
- Installing and Configuring the Agent on a Windows ECS
- Installing the Agents in Batches on Linux ECSs
- Managing the Agent
- Process Monitoring
- Viewing Server Monitoring Metrics
- Creating an Alarm Rule to Monitor a Server
- Custom Monitoring
- Event Monitoring
- Cloud Service Monitoring
- Permissions Management
- Quota Adjustment
- Services Interconnected with Cloud Eye
-
FAQs
- General Consulting
-
Server Monitoring
- How Can I Quickly Restore the Agent Configuration?
- What OSs Does the Agent Support?
- How Do I Query the Current Agent Version?
- What Should I Do If the Service Port Is Used by the Agent?
- How Can I Create an Agency?
- What Can't I Create Another Agency?
- What Should I Do If Agency CESAgentAutoConfigAgency Failed to Be Automatically Created?
- What Can I Do If Agency CESAgentAutoConfigAgency Is Invalid?
- Will the Agent Affect the Server Performance?
- What Should I Do If the Agent Status Is Faulty?
- Alarm Notifications or False Alarms
- Monitored Data Exceptions
- User Permissions
- Change History
- API Reference (Ankara Region)
-
User Guide (ME-Abu Dhabi Region)
- General Reference
Copied.
Querying Monitoring Data of a Metric
Function
This API is used to query the monitoring data of a specified metric at a specified granularity in a specified time range. You can specify the dimension of data to be queried.
Debugging
You can debug the API in API Explorer which supports automatic authentication. API Explorer can automatically generate and debug example SDK code.
URI
GET /V1.0/{project_id}/metric-data?namespace={namespace}&metric_name={metric_name}&dim.{i}=key,value&from={from}&to={to}&period={period}&filter={filter}
- Parameter description
Table 1 Parameter description Parameter
Mandatory
Description
project_id
Yes
Specifies the project ID.
For details about how to obtain the project ID, see Obtaining a Project ID.
Table 2 Query parameter description Parameter
Mandatory
Type
Description
namespace
Yes
String
Specifies the namespace of a service. For details, see Services Interconnected with Cloud Eye.
The namespace must be in the service.item format and contain 3 to 32 characters. service and item each must start with a letter and contain only letters, digits, and underscores (_).
metric_name
Yes
String
Specifies the metric name. You can obtain the metric names of existing alarm rules by referring to Querying Metrics.
from
Yes
String
Specifies the start time of the query. The time is a UNIX timestamp and the unit is ms.
Rollup aggregates the raw data generated within a period to the start time of the period. If from and to are within a period, the query result will be empty due to the rollup failure. Set from to at least one period earlier than the current time.
Take the 5-minute period as an example. If it is 10:35 now, the raw data generated between 10:30 and 10:35 will be aggregated to 10:30. In this example, if period is 5 minutes, from should be 10:30.
NOTE:
Cloud Eye rounds up from based on the level of granularity required to perform the rollup.
to
Yes
String
Specifies the end time of the query.
The time is a UNIX timestamp and the unit is ms.
from must be earlier than to.
period
Yes
Integer
Specifies how often Cloud Eye aggregates data, which can be
- 1: Cloud Eye performs no aggregation and displays raw data.
- 300: Cloud Eye aggregates data every 5 minutes.
- 1200: Cloud Eye aggregates data every 20 minutes.
- 3600: Cloud Eye aggregates data every hour.
- 14400: Cloud Eye aggregates data every 4 hours.
- 86400: Cloud Eye aggregates data every 24 hours.
filter
Yes
String
Specifies the data rollup method, which can be
- average: Cloud Eye calculates the average value of metric data within a rollup period.
- max: Cloud Eye calculates the maximum value of metric data within a rollup period.
- min: Cloud Eye calculates the minimum value of metric data within a rollup period.
- sum: Cloud Eye calculates the sum of metric data within a rollup period.
- variance: Cloud Eye calculates the variance value of metric data within a rollup period.
NOTE:
Rollup uses a rollup method to aggregate raw data generated within a specific period. Take the 5-minute period as an example. If it is 10:35 now, the raw data generated between 10:30 and 10:35 will be aggregated to 10:30.
dim
Yes
String
A maximum of three metric dimensions are supported, and the dimensions are numbered from zero in the dim.{i}=key,value format. key cannot exceed 32 characters and value cannot exceed 256 characters.
The following dimensions are only examples. For details about whether multiple dimensions are supported, see the dimension description in the monitoring indicator description of each service.
Single dimension: dim.0=instance_id,i-12345
Multiple dimensions: dim.0=instance_id,i-12345&dim.1=instance_name,i-1234
NOTE:
- dimensions can be obtained from the response body by calling the API for Querying Metrics.
- OBS metric data can be queried only when the related OBS APIs are called.
- Example:
Request example 1: View the CPU usage of ECS whose ID is 6f3c6f91-4b24-4e1b-b7d1-a94ac1cb011d from 2019-04-30 20:00:00 to 2019-04-30 22:00:00. The monitoring interval is 20 minutes.
GET https://{Cloud Eye endpoint}/V1.0/{project_id}/metric-data?namespace=SYS.ECS&metric_name=cpu_util&dim.0=instance_id,6f3c6f91-4b24-4e1b-b7d1-a94ac1cb011d&from=1556625600000&to=1556632800000&period=1200&filter=min
Request
None
Response
- Response parameters
Table 3 Parameter description Parameter
Type
Description
datapoints
Array of objects
Specifies the metric data list. For details, see Table 4.
Since Cloud Eye rounds up from based on the level of granularity for data query, datapoints may contain more data points than expected.
metric_name
String
Specifies the metric ID. For example, if the monitoring metric of an ECS is CPU usage, metric_name is cpu_util. For details, see Services Interconnected with Cloud Eye.
Table 4 datapoints data structure description Parameter
Type
Description
average
Double
Specifies the average value of metric data within a rollup period.
max
Double
Specifies the maximum value of metric data within a rollup period.
min
Double
Specifies the minimum value of metric data within a rollup period.
sum
Double
Specifies the sum of metric data within a rollup period.
variance
Double
Specifies the variance of metric data within a rollup period.
timestamp
Long
Specifies when the metric is collected. It is a UNIX timestamp in milliseconds.
unit
String
Specifies the metric unit.
- Example response
Example response 1: The dimension is SYS.ECS, and the average CPU usage of ECSs is displayed.
{ "datapoints": [ { "average": 0.23, "timestamp": 1442341200000, "unit": "%" } ], "metric_name": "cpu_util" }
Example response 2: The dimension is SYS.ECS, and the sum CPU usage of ECSs is displayed.{ "datapoints": [ { "sum": 0.53, "timestamp": 1442341200000, "unit": "%" } ], "metric_name": "cpu_util" }
Example response 3: The dimension is SYS.ECS, and the maximum CPU usage of ECSs is displayed.{ "datapoints": [ { "max": 0.13, "timestamp": 1442341200000, "unit": "%" } ], "metric_name": "cpu_util" }
Returned Values
- Normal
- Abnormal
Returned Value
Description
400 Bad Request
Request error.
401 Unauthorized
The authentication information is not provided or is incorrect.
403 Forbidden
Access to the requested page is forbidden.
408 Request Timeout
The request timed out.
429 Too Many Requests
Concurrent requests are excessive.
500 Internal Server Error
Failed to complete the request because of an internal service error.
503 Service Unavailable
The service is currently unavailable.
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot