mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 02:51:03 +00:00
support multiple instances of varnish
If you make a symlink like varnish4_shop_request_rate (etc.), you can add plugin configuration [varnish4_shop_*] env.name shop and it will run all commands with -n shop to get the stats for that instance.
This commit is contained in:
parent
17c936ed96
commit
5562eec22d
1 changed files with 6 additions and 3 deletions
|
@ -631,15 +631,15 @@ my %ASPECTS = (
|
||||||
},
|
},
|
||||||
'bans_tested' => {
|
'bans_tested' => {
|
||||||
'type' => 'DERIVE',
|
'type' => 'DERIVE',
|
||||||
'min' => '0'
|
'min' => '0'
|
||||||
},
|
},
|
||||||
'bans_obj_killed' => {
|
'bans_obj_killed' => {
|
||||||
'type' => 'DERIVE',
|
'type' => 'DERIVE',
|
||||||
'min' => '0'
|
'min' => '0'
|
||||||
},
|
},
|
||||||
'bans_tests_tested' => {
|
'bans_tests_tested' => {
|
||||||
'type' => 'DERIVE',
|
'type' => 'DERIVE',
|
||||||
'min' => '0'
|
'min' => '0'
|
||||||
},
|
},
|
||||||
'bans_dups' => {
|
'bans_dups' => {
|
||||||
'type' => 'GAUGE'
|
'type' => 'GAUGE'
|
||||||
|
@ -1031,6 +1031,9 @@ sub set_aspect
|
||||||
{
|
{
|
||||||
$self = $0;
|
$self = $0;
|
||||||
$self =~ s/^.*\/varnish[0-9]?_//;
|
$self =~ s/^.*\/varnish[0-9]?_//;
|
||||||
|
return if defined($ASPECTS{$self});
|
||||||
|
# remove instance name and try again
|
||||||
|
$self =~ s/^.*?_//;
|
||||||
if (!defined($ASPECTS{$self}) && @ARGV == 0) {
|
if (!defined($ASPECTS{$self}) && @ARGV == 0) {
|
||||||
usage "No such aspect";
|
usage "No such aspect";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue