From 65e993c01eb2ac9ccf2bd72341e360047e4cb64f Mon Sep 17 00:00:00 2001 From: garnier-quentin Date: Tue, 12 May 2015 10:02:27 +0200 Subject: [PATCH] Fix #25 --- centreon-plugins/os/aix/snmp/mode/swap.pm | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/centreon-plugins/os/aix/snmp/mode/swap.pm b/centreon-plugins/os/aix/snmp/mode/swap.pm index 217c1f4b2..0917652dd 100644 --- a/centreon-plugins/os/aix/snmp/mode/swap.pm +++ b/centreon-plugins/os/aix/snmp/mode/swap.pm @@ -50,9 +50,8 @@ sub new { { "warning:s" => { name => 'warning' }, "critical:s" => { name => 'critical' }, + "paging-state-buggy" => { name => 'paging_state_buggy' }, }); - - $self->{swap_memory_id} = undef; return $self; } @@ -116,6 +115,13 @@ sub run { if ($results->{$oid_sysDescr}->{$oid_sysDescr . ".0"} =~ /AIX version: 05\./i) { $active_swap = 1; } + if (defined($self->{option_results}->{paging_state_buggy})) { + if ($active_swap == 2) { + $active_swap = 1; + } else { + $active_swap = 2; + } + } $self->{output}->output_add(severity => 'OK', short_msg => 'All Page spaces are ok.'); @@ -180,6 +186,10 @@ Threshold warning in percent. Threshold critical in percent. +=item B<--paging-state-buggy> + +Paging state can be buggy. Please use the following option to swap state value. + =back =cut