Remote access to varnish stats / nagios and varnish

Per Buer perbu at varnish-software.com
Mon Aug 13 22:59:48 CEST 2012


On Mon, Aug 13, 2012 at 5:48 PM, david raistrick <drais at icantclick.org>wrote:

> On Fri, 10 Aug 2012, Oddur Snær Magnússon wrote:
>
>  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”.
>>
>
> Um.  Sounds like you want access to the management port.
>
> from the varnishd man page:
>        -T address[:port]
>               Offer a management interface on the specified address and
> port.  See Management Interface  for
>               a list of management commands.
>
> https://www.varnish-cache.org/**trac/wiki/ManagementPort<https://www.varnish-cache.org/trac/wiki/ManagementPort>
>
>
> For us, -T :6082 does the trick - we poll our stats from there.
>
> echo "stats" | nc $server $port
>

and parse and go.
>

The implementation of "stats" wasn't really up to scratch and was ditched
in Varnish 3.0. However, wrapping "varnishstat -1 -x" in a tiny CGI service
is probably a 15 minute job.

-- 
Per Buer
Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / Skype: per.buer
*Varnish makes websites fly!*
Whitepapers <http://www.varnish-software.com/whitepapers> |
Video<http://www.youtube.com/watch?v=x7t2Sp174eI> |
Twitter <https://twitter.com/varnishsoftware>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20120813/8371885b/attachment.html>


More information about the varnish-misc mailing list