stathat-line-counter is a Go program that reads stdin and periodically logs lines read to StatHat.
It's useful for tracking statistics like web server hits, DNS queries etc.
go get github.com/jbarham/stathat-line-counter
go install github.com/jbarham/stathat-line-counter
To log the number of Nginx hits every minute:
tail -F /var/log/nginx/access.log | stathat-line-counter -stat "web hits" -ezkey yourname@example.com
(Note the use of the -F vs. -f flag to re-open the log file when it's rotated.)
stathat-line-counter was written by John Barham (jbarham@gmail.com).
It assumes you have an account with StatHat, which is a great statistics tracking service, and coincidentally is largely written in Go.