Replace json entry last_age

master
Heuzef 5 years ago
parent 8a661dbc83
commit aedf147a2e
  1. 5
      backuppc_check.pl

@ -31,6 +31,7 @@ if ( $host ) {
my $age = -1;
$json = {
bkp => 0,
last_age => 0,
errors => 0,
new_size => 0,
new_size_avg => 0,
@ -70,7 +71,7 @@ if ( $host ) {
$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->{lastAge} = sprintf("%.1f", ($json->{age}) / 84600);
$json->{last_age} = sprintf("%.1f", ($json->{age}) / 84600);
$json->{max_errors} = $conf->{MaxXferError} || 0;
}
}
@ -85,7 +86,7 @@ EOF
# Print results
print("\n----------------\n");
print("Last Backup : $json->{$lastAge}");
print("Last Backup : $json->{$last_age}");
print("\n");
print("Errors : $json->{errors}");
print("\n");

Loading…
Cancel
Save