ClickHouse table schemas used by FastNetMon Advanced for traffic metrics persistence.
Warning: We recommend letting FastNetMon create these tables automatically rather than creating them manually. Manual table creation should only be used for reference or advanced customization scenarios.
All tables are created in the fastnetmon database, use the MergeTree engine, are partitioned by date, and have a 7-day TTL (except traffic which has no TTL).
| Table | Description |
|---|---|
asn_metrics_ipv4 |
Per-ASN IPv4 traffic metrics |
asn_metrics_ipv4_top |
Top ASN IPv4 traffic metrics |
asn_metrics_ipv6 |
Per-ASN IPv6 traffic metrics |
asn_metrics_ipv6_top |
Top ASN IPv6 traffic metrics |
attack_events |
DDoS attack event logs |
flexible_host_metrics_ipv4 |
Flexible per-host IPv4 metrics (dynamic columns) |
flexible_host_metrics_ipv6 |
Flexible per-host IPv6 metrics (dynamic columns) |
flexible_total_hostgroup_metrics |
Flexible per-hostgroup aggregate metrics |
host_metrics |
Per-host IPv4 traffic metrics |
host_metrics_ipv4_top |
Top hosts IPv4 traffic metrics |
host_metrics_ipv6 |
Per-host IPv6 traffic metrics |
host_metrics_ipv6_top |
Top hosts IPv6 traffic metrics |
interface_metrics |
Per-network-interface traffic metrics |
network_24_metrics_ipv4 |
Per /24-subnet IPv4 traffic metrics |
network_24_metrics_ipv4_top |
Top /24-subnet IPv4 traffic metrics |
network_metrics |
Per-network traffic metrics |
network_metrics_ipv4_top |
Top networks IPv4 traffic metrics |
network_metrics_ipv6 |
Per-network IPv6 traffic metrics |
network_metrics_ipv6_top |
Top networks IPv6 traffic metrics |
remote_host_metrics_ipv4_top |
Top remote host IPv4 traffic metrics |
system_metrics |
System-level named metrics |
total_hostgroup_metrics |
Aggregate traffic metrics per hostgroup |
total_metrics |
Total aggregate traffic metrics |
total_metrics_ipv4 |
Total aggregate IPv4 traffic metrics |
total_metrics_ipv6 |
Total aggregate IPv6 traffic metrics |
traffic |
Raw packet/flow-level traffic data |
SQL files can be formatted using clickhouse-format. A Makefile is provided in the schema/ directory:
cd schema
# Format all .sql files in place
make format
# Check if all files are properly formatted (useful for CI)
make checkApache License 2.0