Remote access to varnish stats / nagios and varnish
Boeglin, Adam R
arboeglin at herffjones.com
Fri Aug 10 17:25:04 CEST 2012
On Fri, Aug 10, 2012 at 09:47:29, Nathan Kinkade wrote:
> Cc: varnish-misc at varnish-cache.org
> Subject: Re: Remote access to varnish stats / nagios and varnish
> 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
> > 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.
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
I think the most simple option would be to just use the Nagios check_by_ssh plugin to run the varnish-nagios command on the remote system.
More information about the varnish-misc