munin plugin with multiple instances of varnish

Paul Mansfield paul.mansfield at taptu.com
Wed Dec 16 11:15:06 CET 2009


On 15/12/09 15:21, Kristian Lyngstol wrote:
> On Fri, Dec 11, 2009 at 05:10:39PM +0000, Paul Mansfield wrote:
>> I revamped my hacks and have attached my munin plugin, I renamed it to
>> vanishm_ for multi instance.
> 
> Could you provide a diff/patch? Easier to read...

sure, it's appended

> Is it compatible with varnish_ syntax? (Ie: should we just replace it?)

yes, you can use either "multi-varnish syntax" varnishm_NAME__ASPECT or
single varnish instance syntax as before varnishm_ASPECT

since you seem to be happy to replace yours (I didn't want to tread on
your toes and assume my hack was worthy!), I've renamed my plugin to
varnish_; I've attached it too.

> Also: you may want to add your own copyright notice below ours if you've
> done significant work.

I added a comment below your copyright to reflect my simple amendment


Hope it proves useful to someone. We are using varnish quite extensively
now and it's pretty good, thanks!

Paul


$ diff varnish_.old varnish_
3c3
< # varnish_ - Munin plugin to for Varnish
---
> # varnish_ - Munin plugin for Multiple Varnish Servers
7c7,9
< #
---
> # Modified by Paul Mansfield so that it can be used with multiple
> # varnish instances
> #
641c643,645
<               print "$title $values{$value}{$field}\n";
---
>               print "$title $values{$value}{$field}";
>               print " - $varnishname" if ($title eq 'graph_title');
>               print "\n";
684c688,689
< # Read and verify the aspect ($self).
---
> # Read and verify the aspect ($self) -
> # the format is varnish_NAME__aspect or varnish_aspect
688a694,699
>
>       if ($self =~ /^(\w+)__(.*)$/)
>       {
>               $varnishname = $1;
>               $self = $2;
>       }
788a800
>               #print "$varnishname.$value.value ";
792a805,806
>
> # end varnish_ plugin
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: varnish_
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20091216/841e78c9/attachment-0001.ksh>


More information about the varnish-dev mailing list