https://www.binarytides.com/linux-commands-monitor-network/
There's already a ton of tools that do this. It's a nice show-off project but I doubt OP is in for the long haul.