Files
iAOP/core/data-bus/config/retention.template.yaml

41 lines
1.6 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# -*- coding: utf-8 -*-
# 模板「数据保留/归档/降采样策略」配置资产示例:ti-cl4(Template-Ti 一期)。
#
# 说明(issue #33 / PRD 5.2「② 数据总线 + 时序库」):
# - raw_keep_days:时序原始数据 TDengine KEEP 天数(保留期后由降采样/归档接续);
# - downsampling:按点位匹配(protocol / point_id_prefix)把高精度数据降采样
# 为低频长期保留(agg ∈ avg/max/min/last/sum,interval 为 TDengine INTERVAL);
# - archive:超保留期历史归档到 MinIO(桶 = {template}-archive,对象保留期独立);
# - 与 #31(MinIO 生命周期)策略联动:归档对象生命周期由 MinIO ILM 配置承载。
# - 换行业只改本文件,内核零改动。
template: ti-cl4
version: 1.0.0
retention:
# 时序原始数据保留(TDengine KEEP 天数)
raw_keep_days: 90
# 降采样规则(按点位匹配;多条规则按声明顺序,首个命中生效)
downsampling:
- name: raw_1m_avg
description: 常规工艺点 1Hz → 1m AVG 长期保留
match:
protocol: opcua
interval: 1m
agg: avg
keep_days: 730 # 降采样后保留 2 年
- name: energy_1h_sum
description: 能源点 1Hz → 1h SUM 保留
match:
protocol: energy
interval: 1h
agg: sum
keep_days: 3650 # 能耗长期保留 10 年
# 归档:超保留期历史 → MinIO(对象保留期独立,配合 #31 ILM)
archive:
enabled: true
bucket_suffix: archive
object_prefix: history
retention_days: 3650 # 归档对象保留 10 年