From b5f5cf1473da84a6e12f6611df45fd29b110ff27 Mon Sep 17 00:00:00 2001 From: qgarnier Date: Mon, 1 Aug 2022 10:18:13 +0200 Subject: [PATCH] snmp_standard::mode::storage - empty --filter-storage-type option (#3795) --- centreon-plugins/snmp_standard/mode/storage.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/centreon-plugins/snmp_standard/mode/storage.pm b/centreon-plugins/snmp_standard/mode/storage.pm index 7cfb5991b..10494d45b 100644 --- a/centreon-plugins/snmp_standard/mode/storage.pm +++ b/centreon-plugins/snmp_standard/mode/storage.pm @@ -31,7 +31,7 @@ my %oids_hrStorageTable = ( 'hrstoragedescr' => '.1.3.6.1.2.1.25.2.3.1.3', 'hrfsmountpoint' => '.1.3.6.1.2.1.25.3.8.1.2', 'hrfsstorageindex' => '.1.3.6.1.2.1.25.3.8.1.7', - 'hrstoragetype' => '.1.3.6.1.2.1.25.2.3.1.2', + 'hrstoragetype' => '.1.3.6.1.2.1.25.2.3.1.2' ); my %storage_types_manage = ( '.1.3.6.1.2.1.25.2.1.1' => 'hrStorageOther', @@ -492,7 +492,10 @@ sub reload_cache { sub filter_type { my ($self, %options) = @_; - + + # some equipments doesn't have hrstoragetype + return 1 if ($self->{option_results}->{filter_storage_type} eq ''); + my $storage_type = $self->{statefile_cache}->get(name => "hrstoragetype_" . $options{id}); if (defined($storage_type) && ($storage_types_manage{$storage_type} =~ /$self->{option_results}->{filter_storage_type}/i)) {