Fix #1564
This commit is contained in:
parent
da66677575
commit
6de0c11cd7
|
@ -125,9 +125,8 @@ sub new {
|
||||||
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
|
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
|
||||||
bless $self, $class;
|
bless $self, $class;
|
||||||
|
|
||||||
$options{options}->add_options(arguments =>
|
$options{options}->add_options(arguments => {
|
||||||
{
|
'filter-ssid:s' => { name => 'filter_ssid' },
|
||||||
"filter-ssid:s" => { name => 'filter_ssid' },
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return $self;
|
return $self;
|
||||||
|
@ -161,6 +160,12 @@ sub manage_selection {
|
||||||
my $instance = $1;
|
my $instance = $1;
|
||||||
my $result = $options{snmp}->map_instance(mapping => $mapping, results => $snmp_result, instance => $instance);
|
my $result = $options{snmp}->map_instance(mapping => $mapping, results => $snmp_result, instance => $instance);
|
||||||
|
|
||||||
|
if (defined($self->{option_results}->{filter_ssid}) && $self->{option_results}->{filter_ssid} ne '' &&
|
||||||
|
$result->{ruckusWLANStatsSSID} !~ /$self->{option_results}->{filter_ssid}/) {
|
||||||
|
$self->{output}->output_add(long_msg => "skipping '" . $result->{ruckusWLANStatsSSID} . "': no matching filter.", debug => 1);
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
|
||||||
$self->{ssid}->{$result->{ruckusWLANStatsSSID}} = { display => $result->{ruckusWLANStatsSSID}, total => $result->{ruckusWLANStatsNumSta} };
|
$self->{ssid}->{$result->{ruckusWLANStatsSSID}} = { display => $result->{ruckusWLANStatsSSID}, total => $result->{ruckusWLANStatsNumSta} };
|
||||||
$self->{global}->{total} += $result->{ruckusWLANStatsNumSta};
|
$self->{global}->{total} += $result->{ruckusWLANStatsNumSta};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue