mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-24 06:05:17 +02:00
+ enhance output for aruba (can manage an error if no ap associated)
This commit is contained in:
parent
b5e0a0b5fe
commit
6ee977033d
@ -149,7 +149,7 @@ sub check_options {
|
|||||||
sub skip_global {
|
sub skip_global {
|
||||||
my ($self, %options) = @_;
|
my ($self, %options) = @_;
|
||||||
|
|
||||||
scalar(keys %{$self->{ap}}) > 1 ? return(0) : return(1);
|
scalar(keys %{$self->{ap}}) == 1 ? return(1) : return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
sub prefix_ap_output {
|
sub prefix_ap_output {
|
||||||
@ -208,7 +208,7 @@ sub manage_selection {
|
|||||||
my $result3 = $options{snmp}->map_instance(mapping => $mapping3, results => $self->{results}->{ $mapping3->{bsnAPAdminStatus}->{oid} }, instance => $instance);
|
my $result3 = $options{snmp}->map_instance(mapping => $mapping3, results => $self->{results}->{ $mapping3->{bsnAPAdminStatus}->{oid} }, instance => $instance);
|
||||||
if (defined($self->{option_results}->{filter_name}) && $self->{option_results}->{filter_name} ne '' &&
|
if (defined($self->{option_results}->{filter_name}) && $self->{option_results}->{filter_name} ne '' &&
|
||||||
$result->{bsnAPName} !~ /$self->{option_results}->{filter_name}/) {
|
$result->{bsnAPName} !~ /$self->{option_results}->{filter_name}/) {
|
||||||
$self->{output}->output_add(long_msg => "Skipping '" . $result->{bsnAPName} . "': no matching filter.", debug => 1);
|
$self->{output}->output_add(long_msg => "skipping '" . $result->{bsnAPName} . "': no matching filter.", debug => 1);
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -220,8 +220,7 @@ sub manage_selection {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (scalar(keys %{$self->{ap}}) <= 0) {
|
if (scalar(keys %{$self->{ap}}) <= 0) {
|
||||||
$self->{output}->output_add(severity => 'OK',
|
$self->{output}->output_add(long_msg => 'no AP associated (can be: slave wireless controller or your filter)');
|
||||||
short_msg => 'No AP associated (can be: slave wireless controller or your filter)');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user