From 5dbcd334185a4742ae826ed6fac633d5c1de5f59 Mon Sep 17 00:00:00 2001 From: garnier-quentin Date: Wed, 18 Sep 2019 10:14:24 +0200 Subject: [PATCH] enh netapp filesys --- storage/netapp/snmp/mode/filesys.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/storage/netapp/snmp/mode/filesys.pm b/storage/netapp/snmp/mode/filesys.pm index d4695acb6..023313bc9 100644 --- a/storage/netapp/snmp/mode/filesys.pm +++ b/storage/netapp/snmp/mode/filesys.pm @@ -239,14 +239,19 @@ my $mapping3 = { sub get_vserver_state { my ($self, %options) = @_; - return if (!defined($self->{option_results}->{filter_vserver_state}) || $self->{option_results}->{filter_vserver} eq ''); + return if ( + (!defined($self->{option_results}->{filter_vserver_state}) || $self->{option_results}->{filter_vserver} eq '') && + (!defined($self->{option_results}->{warning_vserver_status}) || $self->{option_results}->{warning_vserver_status} eq '') && + (!defined($self->{option_results}->{critical_vserver_status}) || $self->{option_results}->{critical_vserver_status} eq '') && + (!defined($self->{option_results}->{unknown_vserver_status}) || $self->{option_results}->{unknown_vserver_status} eq '') + ); + my $snmp_result = $options{snmp}->get_multiple_table( oids => [ { oid => $mapping3->{vserverName}->{oid} }, { oid => $mapping3->{vserverState}->{oid} } ], return_type => 1, - nothing_quit => 1 ); $self->{vserver} = {};