Hi,
Has anyone tried creating sql query to check bandwidth to specific destination tcp port?
Hi Joseppo
I tried it with chart builder and it seems working fine. You can see the aggregated sent/received bytes for each destination port.
SQL:
select `dstport`, string_agg(distinct `app`, ' ') as `app__agg_`, string_agg(distinct `user`, ' ') as `user__agg_`, string_agg(distinct ipstr(`dstip`), ' ') as `dstip__agg_`, string_agg(distinct `service`, ' ') as `service__agg_`, sum(sentbyte) as `sentbyte`, sum(rcvdbyte) as `rcvdbyte` from ###(select `dstport`, `app`, `user`, `dstip`, `service`, sum(sentbyte) as sentbyte, sum(rcvdbyte) as rcvdbyte from $log where $filter and (logflag&1>0) group by `dstport`, `app`, `user`, `dstip`, `service` order by `dstport`)### t group by `dstport` order by `dstport`
Hope it helps.
User | Count |
---|---|
2549 | |
1356 | |
795 | |
646 | |
455 |
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.