diff options
author | Timotej S <6674623+underhood@users.noreply.github.com> | 2023-01-25 18:19:50 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-25 18:19:50 +0700 |
commit | 2b8b8bc89693dbe7d4b5b35f5d7493c10b266e6d (patch) | |
tree | 19c47c1669f028f130011677aa000609339140e8 /database | |
parent | 2516d29ceb2f99f87831a38a81fb59bf330ab9ca (diff) |
minor - kaitai for netdata datafiles (#14312)
Diffstat (limited to 'database')
-rw-r--r-- | database/engine/datafile.ksy | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/database/engine/datafile.ksy b/database/engine/datafile.ksy new file mode 100644 index 0000000000..28d4b39355 --- /dev/null +++ b/database/engine/datafile.ksy @@ -0,0 +1,74 @@ +meta: + id: netdata_datafile + endian: le + +seq: + - id: hdr + type: header + size: 4096 + - id: extents + type: extent + repeat: eos + +types: + header: + seq: + - id: magic + contents: "netdata-data-file" + - id: reserved + size: 15 + - id: version + contents: "1.0" + - id: reserved1 + size: 13 + - id: tier + type: u1 + extent_page_descr: + seq: + - id: type + type: u1 + enum: page_type + - id: uuid + size: 16 + - id: page_len + type: u4 + - id: start_time_ut + type: u8 + - id: end_time_ut + type: u8 + enums: + page_type: + 0: metrics + 1: tier + extent_header: + seq: + - id: payload_length + type: u4 + - id: compression_algorithm + type: u1 + enum: compression_algos + - id: number_of_pages + type: u1 + - id: page_descriptors + type: extent_page_descr + repeat: expr + repeat-expr: number_of_pages + enums: + compression_algos: + 0: rrd_no_compression + 1: rrd_lz4 + extent_trailer: + seq: + - id: crc32_checksum + type: u4 + extent: + seq: + - id: header + type: extent_header + - id: payload + size: header.payload_length + - id: trailer + type: extent_trailer + - id: padding + size: (((_io.pos + 4095) / 4096) * 4096) - _io.pos + # the extent size is made to always be a multiple of 4096 |