From 66d1d96bdcfa2948c45c152d821d040bc22e157e Mon Sep 17 00:00:00 2001 From: garnier-quentin Date: Thu, 23 Feb 2017 17:03:32 +0100 Subject: [PATCH] + fix fluidfs snmp mode components --- storage/dell/fluidfs/snmp/mode/components/ad.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/storage/dell/fluidfs/snmp/mode/components/ad.pm b/storage/dell/fluidfs/snmp/mode/components/ad.pm index be16bc055..5f159a89d 100644 --- a/storage/dell/fluidfs/snmp/mode/components/ad.pm +++ b/storage/dell/fluidfs/snmp/mode/components/ad.pm @@ -42,8 +42,14 @@ sub check { $self->{components}->{ad} = {name => 'ad', total => 0, skip => 0}; return if ($self->check_filter(section => 'ad')); + my $result = {}; my $instance = '0'; - my $result = $self->{snmp}->map_instance(mapping => $mapping, results => $self->{results}->{$oid_fluidFSActiveDirectoryStatus}, instance => $instance); + if (defined($self->{results}->{$oid_fluidFSActiveDirectoryStatus}->{$mapping->{fluidFSActiveDirectoryStatusConfigured}->{oid}})) { + $result->{fluidFSActiveDirectoryStatusConfigured} = $self->{results}->{$oid_fluidFSActiveDirectoryStatus}->{$mapping->{fluidFSActiveDirectoryStatusConfigured}->{oid}}; + $result->{fluidFSActiveDirectoryStatusStatus} = $self->{results}->{$oid_fluidFSActiveDirectoryStatus}->{$mapping->{fluidFSActiveDirectoryStatusStatus}->{oid}}; + } else { + $result = $self->{snmp}->map_instance(mapping => $mapping, results => $self->{results}->{$oid_fluidFSActiveDirectoryStatus}, instance => $instance); + } if (!defined($result->{fluidFSActiveDirectoryStatusConfigured}) || $result->{fluidFSActiveDirectoryStatusConfigured} !~ /Yes/i) { $self->{output}->output_add(long_msg => "skipping: active directory not configured."); return ;