Monitoring Varnish Cache: a Really Simple Varnish Panel
I was looking for a Varnish Cache GUI in order to test, monitor and adjust my Varnish configuration.
Maybe I did not look hard enough but I found none.
So I decided to write one: “Really Simple Varnish Panel”.
NB: Do not use on production server. Use for testing purpose only.
- Display real-time varnishstat with HIT/(HIT+MISS) ratio
- Display real-time varnishlog
- Ban every URL from cache
- Restart Varnish cache
That’s it. Nothing more. But it was all I needed.
Get the source code
- Obviously, you need a Vanish cache server (version 3) up and running.
- You need Apache running on the same server, different ip port, let’s say 81, but anyone will do.
- You need Apache to be able to connect to varnishadm, so copy /etc/varnish/secret to /etc/varnish/secret.www-data and chown it to www-data:www-data.
- I strongly suggest that you protect your server with some authentification (.htpasswd with Basic AuthType should be enough).
- Copy rsvp directory to /var/, www-data should have write access to /var/rsvp/www/logs/ directory.
- You need also to know how to create an Apache VHOST. That’s about it!
Like this Article? Share it!
About the Author
Paris, Beirut, NYC & Agen // e-commerce, social media, open-source & geek // follow me on twitter: @benjaminbellamy.