I have an Ubuntu Server which is using nginx reverse_proxy to deliver some static files to my customers through different domains. for instance dl1.exmaple.com delivers my first download host files and dl2.exmaple.com deliver the second download host and so on.
My need is to monitor and log the server Upload Traffic to my users and distinct them based on different ISPs. right now I'm doing it using IPtables rules for each ISP subnet I want and works great! using rules that calculate the data and store somewhere. and that calculates the whole Server Upload Traffic based on ISP1 , ISP2 which each of them have their own IP Range.
But now I have a new need which is:
How to calculate this Upload Traffic to the users per Domain? IPtables does not work with domains! one way was using different Ports for each domain but that does not work in my network policy and I can not use that.
Can you point me in the right direction on how to check that users from ISP1 downloaded how much data from each domain? or in general how to Monitor my server Upload Traffic based on domain and ISP (GEOIP database)?
any tools or any ways?
Thanks
Tried Awstats or Zabbix but could not find my needs as I need to distinguish the amount of Upload Traffic based on each ISP that I have their IP ranges as well and also know which domain delivered how much.