diff --git a/centreon/plugins/templates/counter.pm b/centreon/plugins/templates/counter.pm index e0951f33d..eff2518d3 100644 --- a/centreon/plugins/templates/counter.pm +++ b/centreon/plugins/templates/counter.pm @@ -528,9 +528,13 @@ sub run_multiple_instances { push @exits, $exit2; my $output = $obj->output(); - $long_msg .= $long_msg_append . $output; - $long_msg_append = $message_separator; - + if (!defined($_->{display_ok}) || $_->{display_ok} != 0 || + (defined($self->{option_results}->{display_ok_counters}) && $self->{option_results}->{display_ok_counters} ne '' && + $_->{label} =~ /$self->{option_results}->{display_ok_counters}/)) { + $long_msg .= $long_msg_append . $output; + $long_msg_append = $message_separator; + } + if (!$self->{output}->is_status(litteral => 1, value => $exit2, compare => 'ok')) { $short_msg .= $short_msg_append . $output; $short_msg_append = $message_separator;