fix(netdata): mode traffic - no speed value (#3285)
This commit is contained in:
parent
71957e883e
commit
3a89dc62e7
|
@ -114,12 +114,14 @@ sub manage_selection {
|
||||||
$count++;
|
$count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
my $speed = defined($int->{speed}) ? $int->{speed} * 1000 * 1000 : '';
|
||||||
|
$speed = $self->{option_results}->{speed}
|
||||||
|
if (defined($self->{option_results}->{speed}) && $self->{option_results}->{speed} ne '');
|
||||||
$self->{interfaces}->{ $int->{name} } = {
|
$self->{interfaces}->{ $int->{name} } = {
|
||||||
display => $int->{name},
|
display => $int->{name},
|
||||||
traffic_in => $metrics->{received} * 1000,
|
traffic_in => $metrics->{received} * 1000,
|
||||||
traffic_out => $metrics->{sent} * 1000,
|
traffic_out => $metrics->{sent} * 1000,
|
||||||
speed => defined($self->{option_results}->{speed}) && $self->{option_results}->{speed} ne '' ?
|
speed => $speed
|
||||||
$self->{option_results}->{speed} : $int->{speed} * 1000 * 1000
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue