I need a way to measure how many times different files have been accessed and when. My setup consists of several low capacity servers spread out over the world running Varnish behind Nginx (for SSL support). No content is actually stored on the servers, it's loaded from a central storage point and cached in Varnish for up to an hour.
What I need is to measure how many times a day any given file have been accessed. I figured that this should be quite easy to do with access logs but I need some way to aggregate the log data to a common database.
I have no idea how to best solve this. I am able to script an aggregator in PHP or Python if necessary, and have thought of using that on a FIFO-file or pipe from Nginx but can't figure out how to work it remotely.