Metrics¶
Metrics are the core data units in the Guance system used for continuously tracking system status. They consist of three parts: numerical values, timestamps, and dimensional tags. They record quantifiable system characteristics (such as resource utilization, business throughput) in the form of time series. Through tags (such as host, service, region), they enable multi-dimensional analysis, providing precise data support for real-time monitoring, performance optimization, and trend prediction.
Data Architecture¶
Guance's metric data processing is divided into three layers:
-
Collection Layer: Handled by DataKit (a lightweight agent deployed in the user's environment, analogous to Prometheus Exporters, directly interfacing with data sources, undertaking core responsibilities of collection, preprocessing, and secure transmission). It is responsible for capturing raw metrics from sources like hosts, applications, and middleware.
-
Transmission Layer: DataKit encrypts the data and sends it to the Guance data center via HTTP/HTTPS.
-
Storage and Analysis Layer: Guance cleanses, stores the data, and provides visualization and analysis capabilities.
Metric Data Composition¶
A complete metric data unit contains three core elements:
-
Measurement: The classification identifier for the data (e.g.,
cpufor CPU metrics). -
Tags: Dimensions used for data filtering and grouping (e.g.,
host=server01,region=cn). -
Fields: Specific numerical metrics (e.g.,
usage=58.3).
For example:
- Measurement:
cpu - Tags:
host=server01,core=0(marking the source server and CPU core). - Fields:
usage_user=12.3(user space CPU usage),usage_system=5.7(system space usage). - Timestamp:
1690524000000000000 (2023-07-28 12:00:00 UTC).
Core Concepts¶
Measurement¶
A Measurement is a collection of similar metrics, containing multiple metrics and tags. For example, the cpu Measurement includes CPU-related metrics like usage_user, usage_system.
Metric¶
A Metric reflects the system's operational status (such as CPU usage, page load time, etc.). It consists of a Metric Name (identifier) and a Metric Value (specific numerical value).
Tag¶
Attributes of the data point collection object are identified through Tags, presented as key-value pairs, consisting of a Tag Key and a Tag Value. A data point can carry multiple tags, used for data filtering and grouping.
Time Series¶
A Time Series is dynamically generated by tag combinations, containing the metric, tags (fields), and data retention duration. Among these, "Metric + Tags (field combination)" constitutes the primary key for data storage. The number of time series directly impacts storage costs and query performance.
Field¶
A Field is a specific numerical metric, such as usage=58.3. Metric values change over time, forming time series data.
Data Visualization¶
Metric data is visualized in the following forms:
- Metric Analysis: Perform metric queries and analysis based on various query methods like DQL, PromQL.
- Metric Management: Display all reported Measurements and their associated metrics, tags, time series count statistics, day-over-day changes, and data storage policies in a list format.
- Visualization Charts: Use metric data in Dashboards to create time series charts, bar charts, pie charts, etc.
Getting Started¶
-
Guance metric collection is implemented based on DataKit (data collector), supporting Standard Collection and Custom Collection.
-
After completing metric data collection, you can view all reported Measurements and their associated metrics, tags, time series count statistics, day-over-day changes, and data storage policies in Metric Management.
-
Generate new metric data using existing data within the current workspace (Logs, APM, RUM, Metrics, Synthetic Tests, Infrastructure Objects, Resource Catalog) to meet custom business monitoring requirements.