Indentation

master
Heuzef 5 years ago
parent 71c97c7012
commit 1eb89e149c
  1. 17
      backuppc_check.pl

@ -59,16 +59,15 @@ if ( $host ) {
# Ignore the last backup if it's not full or incr (which means it's either partial or active)
my $i = ( $bpc_info[-1]->{type} =~ m/^full|incr$/ ) ? -1 : -2;
$json->{errors} = $bpc_info[$i]->{xferErrs};
$json->{new_size} = $bpc_info[$i]->{sizeNew};
$json->{new_size_avg} = int $sizes->mean;
$json->{new_size_median} = int $sizes->median;
# Some old versions of Statistics::Descriptive (eg, on el5) do not support quantile
$json->{new_size_q1} = eval { int $sizes->quantile(1) } || 0;
$json->{new_size_q3} = eval { int $sizes->quantile(3) } || 0;
$json->{age} = time - $bpc_info[$i]->{startTime};
$json->{errors} = $bpc_info[$i]->{xferErrs};
$json->{new_size} = $bpc_info[$i]->{sizeNew};
$json->{new_size_avg} = int $sizes->mean;
$json->{new_size_median} = int $sizes->median;
$json->{new_size_q1} = eval { int $sizes->quantile(1) } || 0;
$json->{new_size_q3} = eval { int $sizes->quantile(3) } || 0;
$json->{age} = time - $bpc_info[$i]->{startTime};
$json->{last_age} = sprintf("%.1f", ($json->{age}) / 84600);
$json->{max_errors} = $conf->{MaxXferError} || 0;
$json->{max_errors} = $conf->{MaxXferError} || 0;
}
}

Loading…
Cancel
Save