|
|
@ -83,7 +83,7 @@ if ( $host ) { |
|
|
|
$json->{new_size_q1} = eval { int $sizes->quantile(1) } || 0; |
|
|
|
$json->{new_size_q1} = eval { int $sizes->quantile(1) } || 0; |
|
|
|
$json->{new_size_q3} = eval { int $sizes->quantile(3) } || 0; |
|
|
|
$json->{new_size_q3} = eval { int $sizes->quantile(3) } || 0; |
|
|
|
$json->{enabled} = ( $conf->{BackupsDisable} > 0 ) ? 0 : 1; |
|
|
|
$json->{enabled} = ( $conf->{BackupsDisable} > 0 ) ? 0 : 1; |
|
|
|
$json->{total_size} = $sizes->sum + $json->{full_size} - 2 * $new_size_of_last_full; |
|
|
|
$json->{total_size} = $sizes->sum + $json->{full_size} - $new_size_of_last_full; |
|
|
|
$json->{history_size} = $json->{total_size} - $json->{full_size}; |
|
|
|
$json->{history_size} = $json->{total_size} - $json->{full_size}; |
|
|
|
$json->{age} = time - $bpc_info[$i]->{startTime}; |
|
|
|
$json->{age} = time - $bpc_info[$i]->{startTime}; |
|
|
|
|
|
|
|
|
|
|
@ -149,8 +149,8 @@ if ( $host ) { |
|
|
|
|
|
|
|
|
|
|
|
# $json->{size} represents the total size used by this host. |
|
|
|
# $json->{size} represents the total size used by this host. |
|
|
|
# But we want to substract the new size of the last full, as for this one we |
|
|
|
# But we want to substract the new size of the last full, as for this one we |
|
|
|
# do not count sizeNew but size. As we've already added sizeNew we need to substract it 2 times |
|
|
|
# do not count sizeNew but size |
|
|
|
my $host_total_size = $host_new_size + $host_full_size - 2 * $host_new_size_of_last_full; |
|
|
|
my $host_total_size = $host_new_size + $host_full_size - $host_new_size_of_last_full; |
|
|
|
|
|
|
|
|
|
|
|
# This one is kept just for compatibility. New Zabbix template will use total_size |
|
|
|
# This one is kept just for compatibility. New Zabbix template will use total_size |
|
|
|
$json->{size} += $host_total_size; |
|
|
|
$json->{size} += $host_total_size; |
|
|
|