diff --git a/centreon-plugins/apps/protocols/snmp/mode/collection.pm b/centreon-plugins/apps/protocols/snmp/mode/collection.pm index 1bcc75b31..773f529b6 100644 --- a/centreon-plugins/apps/protocols/snmp/mode/collection.pm +++ b/centreon-plugins/apps/protocols/snmp/mode/collection.pm @@ -60,6 +60,7 @@ sub custom_select_perfdata { return if (!defined($self->{result_values}->{config}->{perfdatas})); foreach (@{$self->{result_values}->{config}->{perfdatas}}) { + next if (!defined($_->{value}) || $_->{value} !~ /^\d+(?:\.\d+)?$/); $self->{output}->perfdata_add(%$_); } } @@ -811,6 +812,7 @@ sub add_selection { $self->set_expand_table(section => "selection > $i > expand_table", expand => $_->{expand_table}); $self->set_expand(section => "selection > $i > expand", expand => $_->{expand}); $self->set_functions(section => "selection > $i > functions", functions => $_->{functions}); + next if ($self->check_filter(filter => $_->{filter})); next if ($self->check_filter_option()); $config->{unknow} = $self->prepare_variables(section => "selection > $i > unknown", value => $_->{unknown}); $config->{warning} = $self->prepare_variables(section => "selection > $i > warning", value => $_->{warning});