hertzbeat icon indicating copy to clipboard operation
hertzbeat copied to clipboard

[Task] Support Apache Doris as a time-series database for metrics.

Open zqr10159 opened this issue 10 months ago • 4 comments

Description

Requirements:

  1. Refer to https://doris.apache.org/docs/4.x/log-storage-analysis and create tables based on the recommended content and Apache Hetzbeat's actual implementation.
  2. Implement an optional automatic expiration feature for time-series data.
  3. Implement identical functionality to existing solutions like Victoria Metrics and GrepTimeDB, ensuring seamless user switching(module located in hertzbeat-warehouse).
  4. Recommend stream load for metric writing and database connection pooling with MySQL JDBC for metric querying.

zqr10159 avatar Jan 09 '26 00:01 zqr10159

@zqr10159 Hi, I'd like to give it a try, could you please assign this issue to me? tks!

Saramanda9988 avatar Jan 09 '26 08:01 Saramanda9988

@Saramanda9988 Looking forward to your contribution

CrazyBeeline avatar Jan 09 '26 10:01 CrazyBeeline

Thanks for the feature request! HertzBeat currently supports 8 time-series databases in the hertzbeat-warehouse module (VictoriaMetrics, GreptimeDB, IoTDB, InfluxDB, TDengine, QuestDB, DuckDB) but lacks Apache Doris implementation. This is a valid feature gap.

Current state:

  • hertzbeat-warehouse/src/main/java/org/apache/hertzbeat/warehouse/store/history/tsdb/ has existing implementations that all extend AbstractHistoryDataStorage and implement HistoryDataWriter/HistoryDataReader interfaces
  • Each backend uses @ConditionalOnProperty for conditional assembly (e.g., warehouse.store.greptime.enabled)
  • hertzbeat-warehouse/pom.xml has no Doris-related dependencies

Suggested approach:

  1. Create doris/DorisDataStorage.java (extend AbstractHistoryDataStorage, implement write via Stream Load, read via MySQL JDBC)
  2. Create doris/DorisProperties.java for configuration (JDBC URL, Stream Load URL, credentials)
  3. Add MySQL JDBC driver to hertzbeat-warehouse/pom.xml
  4. Configure warehouse.store.doris.enabled=true in application.yml

Questions before implementation:

  1. Minimum Doris version required (affects table DDL, partition/TTL, Stream Load compatibility)?
  2. Should TTL use Doris native data_tiering_ttl/partition TTL or application-layer cleanup?

DanielCarter-stack avatar Jan 13 '26 12:01 DanielCarter-stack

Implemented in #4031.

orangeCatDeveloper avatar Sep 27 '26 22:09 orangeCatDeveloper