+ fix change_bytes_network option (#3452)

This commit is contained in:
Simon Bomm 2022-02-01 17:30:39 +01:00 committed by GitHub
parent ff422e4db7
commit fe23be0829
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -136,7 +136,7 @@ sub custom_metric_calc {
$change_bytes_network = $config_data->{formatting}->{change_bytes_network};
}
if ($change_bytes) {
if ($change_bytes || $change_bytes_network) {
($self->{result_values}->{value}, $self->{result_values}->{unit}) = $self->{perfdata}->change_bytes(
value => $self->{result_values}->{value},
network => defined($change_bytes_network) && $change_bytes_network ? 1 : undef