| Description | This article describes per-device disk usage in ClickHouse. While ClickHouse does not track disk usage per device natively, administrators can use clickhouse queries to get these type of details. |
| Scope | FortiSIEM. |
| Solution |
This can achieve this by running below command on Supervisor cli :
This query lists the on-disk size of all active tables:
clickhouse-client --query="SELECT table, formatReadableSize(sum(bytes)) AS size FROM system.parts WHERE active GROUP BY table ORDER BY sum(bytes) DESC;" Example Output:
trace_log 1022.36 MiB
The following query calculates the total uncompressed raw event size for each device (reptDevIpAddr):
::ffff:10.5.146.54 2311644121
(Note: These are uncompressed values and do not represent exact on-disk usage.)
To get a more readable and closer approximation using the materialized _raw_event_size column:
clickhouse-client --query=" SELECT device, c, avg_raw_bytes, formatReadableSize(toUInt64(c * avg_raw_bytes)) AS approx_by_rawsize FROM ( SELECT toString(reptDevIpAddr) AS device, count() AS c, avg(_raw_event_size) AS avg_raw_bytes FROM fsiem.events_all WHERE reptDevIpAddr IS NOT NULL AND toString(reptDevIpAddr) != '::' GROUP BY device ORDER BY c DESC LIMIT 50 ); "
::ffff:10.5.146.54 12,827,883 180.28 2.15 GiB
|
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.