fixed a bug in 'phpfpm.pm' that lead to error messages about a pool don't has an associated URL #282

This commit is contained in:
Jordi Sanfeliu 2020-06-09 13:04:21 +02:00
parent 137a51d2e8
commit aec92c36a9
1 changed files with 4 additions and 7 deletions

View File

@ -154,13 +154,7 @@ sub phpfpm_update {
foreach my $pfg (sort keys %{$phpfpm->{group}}) {
my @pfl = split(',', $phpfpm->{list}->{$pfg});
if(!scalar(@pfl)) {
for($n = 0; $n < 8; $n++) {
$rrdata .= ":0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0";
}
next;
}
for($n = 0; $n < 8; $n++) {
for($n = 0; $n < 8 && $n < scalar(@pfl); $n++) {
my $uptim = 0;
my $aconn = 0;
my $lqueu = 0;
@ -224,6 +218,9 @@ sub phpfpm_update {
}
$rrdata .= ":$uptim:$aconn:$lqueu:$mlque:$iproc:$aproc:$mapro:$mchil:$slreq:0:0:0:0:0:0:0:0:0";
}
for(; $n < 8; $n++) {
$rrdata .= ":0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0";
}
}
RRDs::update($rrd, $rrdata);