optimize snapmirrorlag
This commit is contained in:
parent
91f92ae1dc
commit
b0f582ea6b
|
@ -146,12 +146,11 @@ sub manage_selection {
|
||||||
my $snmp_result = $options{snmp}->get_leef(nothing_quit => 1);
|
my $snmp_result = $options{snmp}->get_leef(nothing_quit => 1);
|
||||||
|
|
||||||
$self->{snapmirror} = {};
|
$self->{snapmirror} = {};
|
||||||
foreach my $oid (keys %{$snmp_result}) {
|
|
||||||
next if ($oid !~ /^$mapping->{snapmirrorLag}->{oid}\.(.*)$/);
|
foreach (@{$id_selected}) {
|
||||||
my $instance = $1;
|
my $result = $options{snmp}->map_instance(mapping => $mapping, results => $snmp_result, instance => $_);
|
||||||
my $result = $options{snmp}->map_instance(mapping => $mapping, results => $snmp_result, instance => $instance);
|
$self->{snapmirror}->{$_} = {
|
||||||
$self->{snapmirror}->{$instance} = {
|
display => $snmp_result_name->{$oid_snapmirrorSrc . '.' . $_},
|
||||||
display => $snmp_result_name->{$oid_snapmirrorSrc . '.' . $instance},
|
|
||||||
status => $result->{snapmirrorState},
|
status => $result->{snapmirrorState},
|
||||||
lag => int($result->{snapmirrorLag} / 100),
|
lag => int($result->{snapmirrorLag} / 100),
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue