This topic describes the terms related to time series data.
Background information
-
TSDB: Time Series Database (TSDB) provides a data management system that allows you to store, query, collect, and analyze time series data in an efficient manner.
-
Time series data: a series of metric data that is continuously generated at specific intervals. For example, when you monitor the air quality of a city, the series of data collected per second to measure the sulfur dioxide concentration is the time series data.
-
Metric: a metric used for data monitoring, for example, the wind speed and the temperature.
-
Tag: A metric specifies an item based on which objects are monitored, but does not specify which objects are monitored. A tag is used to identify the specific objects to monitor based on a specific metric. A tag is a subcategory of a specific metric.
A tag consists of a tag key and a tag value. For example, the key-value pair City = Hangzhou is a tag that consists of the tag key City and the tag value Hangzhou. The key-value pairs Data center = A and IP address = 172.220.xx.xx are also tags.
Note: Tags are the same only if the tags contain the same tag key and the same tag value. If the tags contain the same tag key but different tag values, the tags are different.
When you monitor data, if you use Temperature as the metric and City = Hangzhou as the tag, you can monitor the temperature of the Hangzhou city.
-
Tag key: the object type that you specify for a metric to monitor. Each tag key is paired with a tag value to identify a specific object of the specific type. For example, a tag key can be Country, Province, City, Data center, or IP address.
-
Tag value: the value that is paired with a tag key. For example, if you use Country as the tag key, the tag value China can be paired with the tag key.
-
Value: the value of a metric. If a metric is used to measure the wind speed at a wind power level, the metric value can be 15. If a metric is used to measure the temperature in the unit of the degree Celsius, the metric value can be 20.
-
Timestamp: the point in time at which data or a metric value is generated.
-
Data point: Data points are collected at specific intervals. A data point is a metric value that is collected based on the specific metric of a monitoring object. The intervals at which data points are collected are continuous timestamps. A data point contains a metric, one or more tags, a timestamp, and a value.
-
Time series: a series of data points that are collected for a specific monitoring object. Each monitoring object is defined by a metric and one or more tags. A time series is defined by a metric and one or more tags. Each tag is a key-value pair. When the number of data points in time series increases, the number of time series does not increase.
-
Timeline: A timeline is defined in the same manner as a time series.
-
Time granularity: the time granularity based on which data is written to time series. The time can be accurate to milliseconds, seconds, minutes, or hours. For example, temperature data is collected per second, or the data of the CPU utilization is collected at intervals of 5 minutes.
-
Data group: If you need to monitor objects based on the same metric and compare the metric data of the objects, you can divide the metric data into different data groups based on tags. The tags are used to define the objects that you want to monitor. For example, you can execute the following SQL statement to query the temperature data by city:
select avg(temperature), city from xx where xx group by city
. In this example, the data is grouped by city. -
Aggregation: If the data of a metric is collected from multiple devices and multiple time series are generated for a query, you can perform aggregate calculation to merge the time series into a time series. This way, the spatiotemporal data collected from multiple dimensions can be displayed in one time series. For example, if you want to obtain the statistical data of the pollution index of a specific district in a specific city, you can develop an aggregate pollution index based on the average value of the metric data that is collected from each monitoring point. The aggregate value is the final pollution index of the specific district. The process for calculating an aggregate value is known as spatial aggregation.
-
Downsampling: If the original time series data is collected at a fine-grained granularity and you want to query data within a long period of time, you can reduce the resolution to display the query data. This process is known as downsampling. For example, if data is collected per second within a period of one year, the query data can be displayed at a time granularity of days.
-
Data validity period: the validity period of data. If the validity period of data elapses, the data is automatically released.