(plugin) storage::netapp::ontap::restapi - mode hardware skip uninstalled fru

This commit is contained in:
garnier-quentin 2023-08-29 10:09:52 +02:00
parent baaaa811d7
commit 718ca457fe
2 changed files with 15 additions and 2 deletions

View File

@ -43,9 +43,22 @@ sub check {
next if ($self->check_filter(section => 'shelf', instance => $shelf_instance));
foreach my $fru (@{$shelf->{frus}}) {
my $instance = $fru->{serial_number};
my $name = $fru->{type} . ':' . $fru->{id};
if ($fru->{installed} !~ /true|1/i) {
$self->{output}->output_add(
long_msg => sprintf(
"fru '%s' shelf '%s' is uninstalled",
$name,
$shelf_name
)
);
next;
}
my $instance = $fru->{serial_number};
next if ($self->check_filter(section => 'fru', instance => $instance));
$self->{components}->{fru}->{total}++;

View File

@ -96,7 +96,7 @@ Check hardware.
=item B<--component>
Which component to check (Default: '.*').
Can be: 'shelf', 'bay', 'fru'.
Can be: 'bay', 'disk', 'fru', 'shelf'.
=item B<--filter>