mirror of
https://github.com/munin-monitoring/contrib.git
synced 2024-09-10 10:42:43 +02:00
nginx_byprojects: use more compatible perl expression
"%ENV{foo}" does not work with older perl versions (e.g. v5.14).
This commit is contained in:
parent
74b58a592a
commit
a836f07d56
3 changed files with 3 additions and 3 deletions
|
@ -38,7 +38,7 @@ my $statepath = $ENV{MUNIN_PLUGSTATE};
|
||||||
my $logtail = $ENV{logtail_path} || '/usr/local/bin/logtail';
|
my $logtail = $ENV{logtail_path} || '/usr/local/bin/logtail';
|
||||||
|
|
||||||
my @loglist = grep {$_ =~ /site\./} keys(%ENV);
|
my @loglist = grep {$_ =~ /site\./} keys(%ENV);
|
||||||
my %envLogs = %ENV{@loglist};
|
my %envLogs = $ENV{@loglist};
|
||||||
my %logs;
|
my %logs;
|
||||||
while(my($k, $v) = each %envLogs) { @logs{substr($k, 5)} = decode_json($v); }
|
while(my($k, $v) = each %envLogs) { @logs{substr($k, 5)} = decode_json($v); }
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ my $statepath = $ENV{MUNIN_PLUGSTATE};
|
||||||
my $logtail = $ENV{logtail_path} || '/usr/local/bin/logtail';
|
my $logtail = $ENV{logtail_path} || '/usr/local/bin/logtail';
|
||||||
|
|
||||||
my @loglist = grep {$_ =~ /site\./} keys(%ENV);
|
my @loglist = grep {$_ =~ /site\./} keys(%ENV);
|
||||||
my %envLogs = %ENV{@loglist};
|
my %envLogs = $ENV{@loglist};
|
||||||
my %logs;
|
my %logs;
|
||||||
while(my($k, $v) = each %envLogs) { @logs{substr($k, 5)} = decode_json($v); }
|
while(my($k, $v) = each %envLogs) { @logs{substr($k, 5)} = decode_json($v); }
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ my $statepath = $ENV{MUNIN_PLUGSTATE};
|
||||||
my $logtail = $ENV{logtail_path} || '/usr/local/bin/logtail';
|
my $logtail = $ENV{logtail_path} || '/usr/local/bin/logtail';
|
||||||
|
|
||||||
my @loglist = grep {$_ =~ /site\./} keys(%ENV);
|
my @loglist = grep {$_ =~ /site\./} keys(%ENV);
|
||||||
my %envLogs = %ENV{@loglist};
|
my %envLogs = $ENV{@loglist};
|
||||||
my %logs;
|
my %logs;
|
||||||
while(my($k, $v) = each %envLogs) { @logs{substr($k, 5)} = decode_json($v); }
|
while(my($k, $v) = each %envLogs) { @logs{substr($k, 5)} = decode_json($v); }
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue