diff --git a/storage/fujitsu/eternus/dx/ssh/mode/cpu.pm b/storage/fujitsu/eternus/dx/ssh/mode/cpu.pm index 93e6dbfb0..54f48bd33 100644 --- a/storage/fujitsu/eternus/dx/ssh/mode/cpu.pm +++ b/storage/fujitsu/eternus/dx/ssh/mode/cpu.pm @@ -196,8 +196,8 @@ sub manage_selection { $self->{cpu}->{$cpu_name} = { display => $cpu_name, usage => $cpu_value }; } - if (defined($self->{option_results}->{no_component}) && scalar(keys %{$self->{cpu}}) <= 0) { - $self->{output}->output_add(severity => $self->{no_components}, + if (scalar(keys %{$self->{cpu}}) <= 0) { + $self->{output}->output_add(severity => defined($self->{no_components}) ? $self->{no_components} : 'unknown', short_msg => 'No components are checked.'); } } @@ -247,8 +247,7 @@ Command options (Default: 'performance -type cm'). =item B<--no-component> -Return an error if no compenents are checked. -If total (with skipped) is 0. (Default: 'critical' returns). +Set the threshold where no components (Default: 'unknown' returns). =item B<--filter-name> diff --git a/storage/fujitsu/eternus/dx/ssh/mode/portstats.pm b/storage/fujitsu/eternus/dx/ssh/mode/portstats.pm index 2fdc8dca8..c93e152aa 100644 --- a/storage/fujitsu/eternus/dx/ssh/mode/portstats.pm +++ b/storage/fujitsu/eternus/dx/ssh/mode/portstats.pm @@ -227,8 +227,8 @@ sub manage_selection { }; } - if (defined($self->{option_results}->{no_component}) && scalar(keys %{$self->{port}}) <= 0) { - $self->{output}->output_add(severity => $self->{no_components}, + if (scalar(keys %{$self->{port}}) <= 0) { + $self->{output}->output_add(severity => defined($self->{no_components}) ? $self->{no_components} : 'unknown', short_msg => 'No components are checked.'); } } @@ -278,8 +278,7 @@ Command options (Default: 'performance -type port'). =item B<--no-component> -Return an error if no compenents are checked. -If total (with skipped) is 0. (Default: 'critical' returns). +Set the threshold where no components (Default: 'unknown' returns). =item B<--filter-name> diff --git a/storage/fujitsu/eternus/dx/ssh/mode/raidgroups.pm b/storage/fujitsu/eternus/dx/ssh/mode/raidgroups.pm index efb6d2e0b..2392dfa7b 100644 --- a/storage/fujitsu/eternus/dx/ssh/mode/raidgroups.pm +++ b/storage/fujitsu/eternus/dx/ssh/mode/raidgroups.pm @@ -294,8 +294,8 @@ sub manage_selection { display => $raid_name }; } - if (defined($self->{option_results}->{no_component}) && scalar(keys %{$self->{rg}}) <= 0) { - $self->{output}->output_add(severity => $self->{no_components}, + if (scalar(keys %{$self->{rg}}) <= 0) { + $self->{output}->output_add(severity => defined($self->{no_components}) ? $self->{no_components} : 'unknown', short_msg => 'No components are checked.'); } } @@ -373,8 +373,7 @@ Example: --threshold-overload='rg,CRITICAL,^(?!(Available|Spare)$)' =item B<--no-component> -Return an error if no compenents are checked. -If total (with skipped) is 0. (Default: 'critical' returns). +Set the threshold where no components (Default: 'unknown' returns). =item B<--filter-name> diff --git a/storage/fujitsu/eternus/dx/ssh/mode/volumestats.pm b/storage/fujitsu/eternus/dx/ssh/mode/volumestats.pm index 59c4f6dbc..31669fdcf 100644 --- a/storage/fujitsu/eternus/dx/ssh/mode/volumestats.pm +++ b/storage/fujitsu/eternus/dx/ssh/mode/volumestats.pm @@ -290,8 +290,8 @@ sub manage_selection { }; } - if (defined($self->{option_results}->{no_component}) && scalar(keys %{$self->{vol}}) <= 0) { - $self->{output}->output_add(severity => $self->{no_components}, + if (scalar(keys %{$self->{vol}}) <= 0) { + $self->{output}->output_add(severity => defined($self->{no_components}) ? $self->{no_components} : 'unknown', short_msg => 'No components are checked.'); } } @@ -341,8 +341,7 @@ Command options (Default: 'performance -type host-io'). =item B<--no-component> -Return an error if no compenents are checked. -If total (with skipped) is 0. (Default: 'critical' returns). +Set the threshold where no components (Default: 'unknown' returns). =item B<--filter-name>