Skip to content

Metering Data Structure and Usage

Overview

When data is written to a specific workspace, Guance will monitor and count the volume of data written in real-time. It records statistical information according to a preset time cycle and stores it in the database.

By combining DQL query statements, users can easily build a usage analysis dashboard. This dashboard can provide an intuitive analysis of data usage, helping users understand data traffic trends, optimize resource allocation, and monitor data usage.

Data Structure

{
    "time": 1720584000000,
    "__docid": "fb4d3b817fdc08a266bfefe85049d279",
    "count": "0",
    "create_time": "1720591166343",
    "date": "1720584000000",
    "hour_count": "0",
    "project": "logging",
    "sub_project": "default",
    "workspaceUUID": "wksp_3c5cc6626cb64550b401347931fcf467"
}

Field Description

Field Type Description Example
time int64 Metric item time, unit in ms, e.g., 1720584000000 equivalent to 2024-07-10 12:00:00, indicating the metric item time range from 2024-07-10 12:00:00 to 2024-07-10 13:00:00 (left-closed right-open). 1720584000000
date int64 Same as time
__docid string Uniquely identifies a database record fb4d3b817fdc08a266bfefe85049d279
workspaceUUID string Workspace ID wksp_3c5cc6626cb64550b401347931fcf467
project string Metering project, see detailed explanation below logging
sub_project string Metering sub-project, see detailed explanation below default
count int64 Total metering 2345
hour_count int64 Hourly metering data 1234
create_time int64 Actual write time to the database, unit in ms 1720591166343

Metering Project (project) Explanation

Note⚠️: For total statistics, use count for counting; for incremental statistics, use hour_count for counting.

Metric Item project sub_project Statistical Cycle Method of Statistics Description
Datakit Quantity datakit Counted hourly Total Specific workspace's Datakit usage amount
Entire Site Datakit Quantity cluster_datakit Counted hourly Total Represents the entire site's Datakit usage amount, unrelated to any specific workspace
HTTP API Quantity api_test Counted hourly Incremental
PV Quantity rum_pv Executed hourly Total
RUM Others rum_others Counted hourly Incremental Resource, Action, LongTask, Error quantities
RUM Write Traffic Billing Items rum_bytes Counted hourly Incremental
Trace Quantity tracing Counted hourly Incremental
Tracing Write Traffic Billing Items tracing_bytes Counted hourly Incremental
Event Quantity keyevent Counted hourly Total
Backup Data to Customer S3 Object Storage backup_log_s3_bytes Optional values are logging/tracing/rum, representing backup information for corresponding data types Counted hourly Incremental
Backup Data to Customer Message Engine backup_log_kafka_bytes Optional values are logging/tracing/rum, representing backup information for corresponding data types Counted hourly Incremental
Backup Data to Customer OSS Object Storage backup_log_oss_bytes Optional values are logging/tracing/rum, representing backup information for corresponding data types Counted hourly Incremental
Backup Data to Customer OBS Object Storage backup_log_obs_bytes Optional values are logging/tracing/rum, representing backup information for corresponding data types Counted hourly Incremental
Backup Data to Guance Object Storage backup_log_guance_bytes Optional values are logging/tracing/rum, representing backup information for corresponding data types Counted hourly Total
Security Check security Counted hourly Incremental
Scheduled Reports report Executed every 5 minutes Incremental
Object Quantity object Counted hourly Total
Pipeline Byte Processing Volume pipeline_processed_bytes Counted hourly Incremental
Sensitive Data Scan Traffic Billing Items privacy_scan_bytes Counted hourly Incremental
Log Write Traffic Billing Items logging_bytes Optional values are index names for multi-index logs Counted hourly Incremental
Log Quantity logging Optional values are index names for multi-index logs Counted hourly Incremental
Time Series ts Counted hourly Total
Pipeline Traffic Statistics pipeline_processed_bytes Counted hourly Incremental

Metering Data Query

# By using DQL statements, you can view the log write volume within a day for a specific workspace.

metering::`*`:(sum(hour_count)) {project="logging", workspaceUUID="wksp_xxx"}

Feedback

Is this page helpful? ×