varnishlog top pages by IP address

Here are some quick recipes for getting information from varnish about top offending IP addresses, which pages those IP addresses are accessing, and which IPs are hitting particular pages.

# top IP addresses
varnishtop -i TxHeader -I '^X-Forwarded-For:'
# which pages the IP address is hitting
varnishncsa |grep |awk '{print $7}'
# IP addresses hitting the /client-perf URL
varnishlog -m 'RxURL:/client-perf' |grep 'X-Forwarded-For'

I'm currently working at NerdWallet, a startup in San Francisco trying to bring clarity to all of life's financial decisions. We're hiring like crazy. Hit me up on Twitter, I would love to talk.

Follow @chase_seibert on Twitter