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 email@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 (firstname.lastname@example.org).