diff --git a/centreon-plugins/apps/protocols/bgp/4/mode/bgppeerstate.pm b/centreon-plugins/apps/protocols/bgp/4/mode/bgppeerstate.pm index 151eb8878..9632165c2 100644 --- a/centreon-plugins/apps/protocols/bgp/4/mode/bgppeerstate.pm +++ b/centreon-plugins/apps/protocols/bgp/4/mode/bgppeerstate.pm @@ -162,7 +162,7 @@ sub manage_selection { next; } if (defined($self->{option_results}->{filter_as}) && $self->{option_results}->{filter_as} ne '' && - $instance !~ /$self->{option_results}->{filter_as}/) { + $mapped_value->{bgpPeerRemoteAs} !~ /$self->{option_results}->{filter_as}/) { $self->{output}->output_add( long_msg => "skipping AS '" . $mapped_value->{bgpPeerRemoteAs} . "': no matching filter.", debug => 1