diff --git a/centreon-plugins/database/cassandra/jmx/mode/cachesusage.pm b/centreon-plugins/database/cassandra/jmx/mode/cachesusage.pm index 0d35b7bb0..74913e218 100644 --- a/centreon-plugins/database/cassandra/jmx/mode/cachesusage.pm +++ b/centreon-plugins/database/cassandra/jmx/mode/cachesusage.pm @@ -73,6 +73,7 @@ sub custom_usage_output { sub custom_usage_calc { my ($self, %options) = @_; + return -10 if ($options{new_datas}->{$self->{instance} . '_Capacity_Value'} <= 0); $self->{result_values}->{display} = $options{new_datas}->{$self->{instance} . '_display'}; $self->{result_values}->{total} = $options{new_datas}->{$self->{instance} . '_Capacity_Value'}; $self->{result_values}->{used} = $options{new_datas}->{$self->{instance} . '_Size_Value'}; @@ -135,8 +136,8 @@ sub manage_selection { my $name = $1; if (defined($self->{option_results}->{filter_name}) && $self->{option_results}->{filter_name} ne '' && - $name !~ /$self->{option_results}->{filter_name}/) { - $self->{output}->output_add(long_msg => "skipping '" . $name . "': no matching filter.", debug => 1); + $scope !~ /$self->{option_results}->{filter_name}/) { + $self->{output}->output_add(long_msg => "skipping '" . $scope . "': no matching filter.", debug => 1); next; } diff --git a/centreon-plugins/database/cassandra/jmx/mode/clientrequestsusage.pm b/centreon-plugins/database/cassandra/jmx/mode/clientrequestsusage.pm index 3b18e8a96..47e50c3db 100644 --- a/centreon-plugins/database/cassandra/jmx/mode/clientrequestsusage.pm +++ b/centreon-plugins/database/cassandra/jmx/mode/clientrequestsusage.pm @@ -86,7 +86,7 @@ sub new { return $self; } -sub prefix_thpool_output { +sub prefix_cr_output { my ($self, %options) = @_; return "Client Request '" . $options{instance_value}->{display} . "' "; @@ -111,8 +111,8 @@ sub manage_selection { my $name = $1; if (defined($self->{option_results}->{filter_name}) && $self->{option_results}->{filter_name} ne '' && - $name !~ /$self->{option_results}->{filter_name}/) { - $self->{output}->output_add(long_msg => "skipping '" . $name . "': no matching filter.", debug => 1); + $scope !~ /$self->{option_results}->{filter_name}/) { + $self->{output}->output_add(long_msg => "skipping '" . $scope . "': no matching filter.", debug => 1); next; } diff --git a/centreon-plugins/database/cassandra/jmx/mode/threadpoolsusage.pm b/centreon-plugins/database/cassandra/jmx/mode/threadpoolsusage.pm index c5cabfa5f..f741903fb 100644 --- a/centreon-plugins/database/cassandra/jmx/mode/threadpoolsusage.pm +++ b/centreon-plugins/database/cassandra/jmx/mode/threadpoolsusage.pm @@ -121,8 +121,8 @@ sub manage_selection { my $name = $1; if (defined($self->{option_results}->{filter_name}) && $self->{option_results}->{filter_name} ne '' && - $name !~ /$self->{option_results}->{filter_name}/) { - $self->{output}->output_add(long_msg => "skipping '" . $name . "': no matching filter.", debug => 1); + $scope !~ /$self->{option_results}->{filter_name}/) { + $self->{output}->output_add(long_msg => "skipping '" . $scope . "': no matching filter.", debug => 1); next; }