Remote access to varnish stats / nagios and varnish

Nathan Kinkade nkinkade at creativecommons.org
Fri Aug 10 15:47:29 CEST 2012


On Fri, Aug 10, 2012 at 7:00 AM, Oddur Snær Magnússon
<oddur at ccpgames.com> wrote:
>
> Hi,
>
> I want to monitor some varnishstats (cache hits/misses/bandwith) from my varnish instances with nagios. I’ve found this https://github.com/varnish/varnish-nagios/commits/master but it seems you are running varnish and nagios on the same machine (or using a npre agent on the varnish box).
>
> What would be ideal for me is to expose a single url that just responds with counter values, possibly just the full output of “varnishstat –x”.
>
> Very similar to http://wiki.nginx.org/NginxHttpStubStatusModule for nginx.
>
> If it’s possible to access to counter values using inline C, I guess this would be possible using that.
>
> Best regards,
>
> Oddur Snær Magnússon
>
> Senior Programmer | Reykjavík | Iceland

I feel like I may be missing something in what you're looking for, but
if all you want is a URL that produces the output of `varnishstat -x`,
then it seems trivial to write a practically one line CGI script for
this purpose.  Or to have a cron job dump the output to a text file in
your webroot every so often, and then just accessing that file
directly when you need it.

Nathan



More information about the varnish-misc mailing list