hertzbeat
hertzbeat copied to clipboard
[Task] Support Apache Doris as a time-series database for metrics.
Description
Requirements:
- 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.
- Implement an optional automatic expiration feature for time-series data.
- Implement identical functionality to existing solutions like Victoria Metrics and GrepTimeDB, ensuring seamless user switching(module located in hertzbeat-warehouse).
- Recommend stream load for metric writing and database connection pooling with MySQL JDBC for metric querying.
@zqr10159 Hi, I'd like to give it a try, could you please assign this issue to me? tks!
@Saramanda9988 Looking forward to your contribution
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 extendAbstractHistoryDataStorageand implementHistoryDataWriter/HistoryDataReaderinterfaces- Each backend uses
@ConditionalOnPropertyfor conditional assembly (e.g.,warehouse.store.greptime.enabled) hertzbeat-warehouse/pom.xmlhas no Doris-related dependencies
Suggested approach:
- Create
doris/DorisDataStorage.java(extendAbstractHistoryDataStorage, implement write via Stream Load, read via MySQL JDBC) - Create
doris/DorisProperties.javafor configuration (JDBC URL, Stream Load URL, credentials) - Add MySQL JDBC driver to
hertzbeat-warehouse/pom.xml - Configure
warehouse.store.doris.enabled=trueinapplication.yml
Questions before implementation:
- Minimum Doris version required (affects table DDL, partition/TTL, Stream Load compatibility)?
- Should TTL use Doris native
data_tiering_ttl/partition TTL or application-layer cleanup?
Implemented in #4031.