Core concepts
Metric
A metric is a criterion for measuring the status or condition of a system, such as the performance of a system, service or application. Metrics generate a series of DataPoints over time. BCM provides numerous metrics by default for cloud products such as BCC and RDS. For details, refer to Cloud Product Metric List. Users can also define custom metrics and push data to BCM using BCM's API or bcm-tool.
- Metric name: Metric name: String type. The combination of the metric name, scope, and dimension uniquely identifies a sequence of metric data.
- Metric data is of numeric type, with a retention period of 40 days. BCM collects data from all pre-configured metrics by default. Additionally, users can push data to BCM using an API or the bcm-tool.
Scope
Scope determines the visible range of metrics. Metrics in different scopes are entirely isolated from one another to avoid naming conflicts. Generally, metrics for different applications are placed in separate scopes. Scope must be specified whenever metrics are utilized.
- Pre-configured scopes: Scopes prefixed with BCE_ correspond to various cloud product monitor data. For details, refer to Cloud Product Monitor Object Type List
- Custom scopes: Users can create their own scopes. Custom scope names cannot start with "BCE" or "BCM," and data can only be pushed to custom scopes, but not to pre-configured scopes. For details, refer to Create Custom Monitor
Dimension
Dimensions refer to key-value pairs (K/V pairs) used to describe the attributes of metrics. For instance, the dimension for the BCC metric CPUUsagePercent is the BCC instance ID. By identifying the instance ID, you can access the CPU usage monitoring data for the corresponding BCC instance.
Dimension is a structured entity defined as follows:
| Name | Required or not | Types | Description |
|---|---|---|---|
| name | Yes | string | Dimension name |
| value | Yes | string | Dimension value |
DataPoint
A DataPoint is the value of a metric at a specific time or over a period, in following formates:
| Name | Description | Types |
|---|---|---|
| average | Average Value | Double |
| maximum | Maximum value | Double |
| minimum | Minimum value | Double |
| sampleCount | Sample count | Integer |
| sum | And Value | Double |
| timestamp | Timestamp | DateTime |
Timestamp
For timestamp definition, refer to General Instructions - Date and Time Standards. Each dataPoint of the metrics must include a timestamp in UTC time, for example 2014-09-03T08:08:08Z. Users can only push data from the past 2 weeks (depending on system data retention time) and within the next 2 hours.
Period
The period, also known as the time period, represents the duration for statistical data calculation. All data within this period is typically computed using a specific statistical function. The time unit is in seconds, with a minimum granularity of one minute. Therefore, any specified time period must be a multiple of 60. The minimum allowable value is one minute (60 seconds), and the maximum is two weeks (1,209,600 seconds), with the default set at 60 seconds.
Period is mainly used to:
- Specify time ranges to obtain aggregated data at varying granularities, when querying data;
- When setting alarm rules, specify a time period to retrieve aggregated data at various granularities and compare it against thresholds accordingly.
Statistic
A statistic refers to the process of aggregating metric data over a designated time period, such as consolidating hourly CPU usage data for a specific machine.
Currently provided statistic methods include (using lowerCamel naming conventions):
- minimum: The lowest value of the metric data within the defined time period.
- maximum: The highest value of the metric data within the defined time period.
- sum: The total value of the metric data within the defined time period.
- average: The mean value of the metric data within the defined time period, calculated by dividing the sum by the sample count.
- sampleCount: The total number of samples collected for the metric data within the defined time period.
