We need to add per protocol traffic counters for networks and interfaces.
complete
F
FastNetMon
We can export per protocol counters to Clickhouse but we do not export them via API:
```JSON_MODE=on sudo -E fcli show network_counters
{"success":true,"values":[{"network_name":"1.2.3.4/22","incoming_packets":69471,"outgoing_packets":31680,"incoming_bytes":82167074,"outgoing_bytes":6743429}]}```
We need to add this missing capability.
F
FastNetMon
complete
F
FastNetMon
Such capability was added and will be released in 2.0.366.
Examples:
JSON_MODE=on sudo -E fcli show network_counters
{"success":true,"values":[{"network_name":"xxxxx/22","incoming_packets":116009,"incoming_bytes":146371767,"fragmented_incoming_packets":0,"fragmented_incoming_bytes":0,"dropped_incoming_packets":0,"dropped_incoming_bytes":0,"tcp_incoming_packets":70155,"tcp_incoming_bytes":93500709,"tcp_syn_incoming_packets":16607,"tcp_syn_incoming_bytes":21092081,"udp_incoming_packets":45712,"udp_incoming_bytes":52859972,"icmp_incoming_packets":108,"icmp_incoming_bytes":9740,"outgoing_packets":46660,"outgoing_bytes":8536505,"fragmented_outgoing_packets":0,"fragmented_outgoing_bytes":0,"dropped_outgoing_packets":0,"dropped_outgoing_bytes":0,"tcp_outgoing_packets":33318,"tcp_outgoing_bytes":4261866,"tcp_syn_outgoing_packets":9008,"tcp_syn_outgoing_bytes":1191208,"udp_outgoing_packets":13168,"udp_outgoing_bytes":4258691,"icmp_outgoing_packets":128,"icmp_outgoing_bytes":14013}]}
Per /24:
JSON_MODE=on sudo -E fcli show network_counters_24
{"success":true,"values":[{"network_name":"xxxx/24","incoming_packets":51213,"incoming_bytes":65603474,"fragmented_incoming_packets":0,"fragmented_incoming_bytes":0,"dropped_incoming_packets":0,"dropped_incoming_bytes":0,"tcp_incoming_packets":28469,"tcp_incoming_bytes":38907871,"tcp_syn_incoming_packets":4794,"tcp_syn_incoming_bytes":5871156,"udp_incoming_packets":22690,"udp_incoming_bytes":26691587,"icmp_incoming_packets":16,"icmp_incoming_bytes":2908,"outgoing_packets":19523,"outgoing_bytes":3535811,"fragmented_outgoing_packets":0,"fragmented_outgoing_bytes":0,"dropped_outgoing_packets":0,"dropped_outgoing_bytes":0,"tcp_outgoing_packets":13730,"tcp_outgoing_bytes":1492347,"tcp_syn_outgoing_packets":2982,"tcp_syn_outgoing_bytes":525943,"udp_outgoing_packets":5702,"udp_outgoing_bytes":2034307,"icmp_outgoing_packets":53,"icmp_outgoing_bytes":8335},{"network_name":"xxx/24","incoming_packets":34735,"incoming_bytes":44754356,"fragmented_incoming_packets":0,"fragmented_incoming_bytes":0,"dropped_incoming_packets":0,"dropped_incoming_bytes":0,"tcp_incoming_packets":21180,"tcp_incoming_bytes":28990879,"tcp_syn_incoming_packets":5091,"tcp_syn_incoming_bytes":6668087,"udp_incoming_packets":13522,"udp_incoming_bytes":15762411,"icmp_incoming_packets":4,"icmp_incoming_bytes":1033,"outgoing_packets":14149,"outgoing_bytes":2213629,"fragmented_outgoing_packets":0,"fragmented_outgoing_bytes":0,"dropped_outgoing_packets":0,"dropped_outgoing_bytes":0,"tcp_outgoing_packets":10163,"tcp_outgoing_bytes":1138000,"tcp_syn_outgoing_packets":3056,"tcp_syn_outgoing_bytes":318590,"udp_outgoing_packets":3951,"udp_outgoing_bytes":1074406,"icmp_outgoing_packets":5,"icmp_outgoing_bytes":1190},{"network_name":"xxxx/24","incoming_packets":25533,"incoming_bytes":31984229,"fragmented_incoming_packets":0,"fragmented_incoming_bytes":0,"dropped_incoming_packets":0,"dropped_incoming_bytes":0,"tcp_incoming_packets":15134,"tcp_incoming_bytes":20473818,"tcp_syn_incoming_packets":3027,"tcp_syn_incoming_bytes":3910586,"udp_incoming_packets":10363,"udp_incoming_bytes":11508319,"icmp_incoming_packets":3,"icmp_incoming_bytes":1538,"outgoing_packets":10790,"outgoing_bytes":2315977,"fragmented_outgoing_packets":0,"fragmented_outgoing_bytes":0,"dropped_outgoing_packets":0,"dropped_outgoing_bytes":0,"tcp_outgoing_packets":7559,"tcp_outgoing_bytes":1359672,"tcp_syn_outgoing_packets":1838,"tcp_syn_outgoing_bytes":191789,"udp_outgoing_packets":3194,"udp_outgoing_bytes":953618,"icmp_outgoing_packets":3,"icmp_outgoing_bytes":1676},{"network_name":"xxx/24","incoming_packets":2929,"incoming_bytes":1728096,"fragmented_incoming_packets":0,"fragmented_incoming_bytes":0,"dropped_incoming_packets":0,"dropped_incoming_bytes":0,"tcp_incoming_packets":2770,"tcp_incoming_bytes":1652423,"tcp_syn_incoming_packets":1568,"tcp_syn_incoming_bytes":1576433,"udp_incoming_packets":100,"udp_incoming_bytes":72936,"icmp_incoming_packets":29,"icmp_incoming_bytes":2695,"outgoing_packets":560,"outgoing_bytes":244872,"fragmented_outgoing_packets":0,"fragmented_outgoing_bytes":0,"dropped_outgoing_packets":0,"dropped_outgoing_bytes":0,"tcp_outgoing_packets":373,"tcp_outgoing_bytes":57377,"tcp_syn_outgoing_packets":3,"tcp_syn_outgoing_bytes":2874,"udp_outgoing_packets":134,"udp_outgoing_bytes":185444,"icmp_outgoing_packets":20,"icmp_outgoing_bytes":1911}]}
And interfaces:
JSON_MODE=on sudo -E fcli show interface_counters
"success":true,"values":[{"interface_name":"xxxx_27","incoming_packets":50954,"incoming_bytes":65297094,"fragmented_incoming_packets":0,"fragmented_incoming_bytes":0,"dropped_incoming_packets":0,"dropped_incoming_bytes":0,"tcp_incoming_packets":27859,"tcp_incoming_bytes":38036737,"tcp_syn_incoming_packets":3862,"tcp_syn_incoming_bytes":4545182,"udp_incoming_packets":23056,"udp_incoming_bytes":27257593,"icmp_incoming_packets":2,"icmp_incoming_bytes":1720,"outgoing_packets":19306,"outgoing_bytes":3595077,"fragmented_outgoing_packets":0,"fragmented_outgoing_bytes":0,"dropped_outgoing_packets":0,"dropped_outgoing_bytes":0,"tcp_outgoing_packets":13665,"tcp_outgoing_bytes":1464196,"tcp_syn_outgoing_packets":2505,"tcp_syn_outgoing_bytes":492099,"udp_outgoing_packets":5563,"udp_outgoing_bytes":2122927,"icmp_outgoing_packets":43,"icmp_outgoing_bytes":7454},{"interface_name":"xxxx_64","incoming_packets":11619,"incoming_bytes":14970332,"fragmented_incoming_packets":0,"fragmented_incoming_bytes":0,"dropped_incoming_packets":0,"dropped_incoming_bytes":0,"tcp_incoming_packets":6584,"tcp_incoming_bytes":9015521,"tcp_syn_incoming_packets":1861,"tcp_syn_incoming_bytes":2485473,"udp_incoming_packets":5015,"udp_incoming_bytes":5954360,"icmp_incoming_packets":0,"icmp_incoming_bytes":420,"outgoing_packets":4420,"outgoing_bytes":472275,"fragmented_outgoing_packets":0,"fragmented_outgoing_bytes":0,"dropped_outgoing_packets":0,"dropped_outgoing_bytes":0,"tcp_outgoing_packets":2978,"tcp_outgoing_bytes":273486,"tcp_syn_outgoing_packets":1126,"tcp_syn_outgoing_bytes":105627,"udp_outgoing_packets":1420,"udp_outgoing_bytes":198314,"icmp_outgoing_packets":0,"icmp_outgoing_bytes":448},{"interface_name":"xxxx_31","incoming_packets":48393,"incoming_bytes":13113778