From 2d7115486d6c815696724eacd3dca2433a3e50c3 Mon Sep 17 00:00:00 2001 From: Shini31 Date: Mon, 20 Jul 2015 14:02:24 +0200 Subject: [PATCH] delete exclude option --- apps/docker/mode/containerstate.pm | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/apps/docker/mode/containerstate.pm b/apps/docker/mode/containerstate.pm index be4b13e23..4d9e070a7 100644 --- a/apps/docker/mode/containerstate.pm +++ b/apps/docker/mode/containerstate.pm @@ -75,7 +75,6 @@ sub new { "cacert-file:s" => { name => 'cacert_file' }, "timeout:s" => { name => 'timeout', default => '3' }, "threshold-overload:s@" => { name => 'threshold_overload' }, - "exclude:s" => { name => 'exclude' }, }); return $self; @@ -137,22 +136,6 @@ sub get_severity { return $status; } -sub check_exclude { - my ($self, %options) = @_; - - if (defined($self->{option_results}->{exclude}) && $self->{option_results}->{exclude} eq 'Running') { - $self->{output}->output_add(long_msg => sprintf("Skipping Running containers.")); - return 1; - } elsif (defined($self->{option_results}->{exclude}) && $self->{option_results}->{exclude} eq 'Paused') { - $self->{output}->output_add(long_msg => sprintf("Skipping Paused containers.")); - return 1; - } elsif (defined($self->{option_results}->{exclude}) && $self->{option_results}->{exclude} eq 'Exited') { - $self->{output}->output_add(long_msg => sprintf("Skipping Exited containers.")); - return 1; - } - return 0; -} - sub run { my ($self, %options) = @_; @@ -206,8 +189,8 @@ sub run { $containername =~ s/^\///; if (($val->{Status} =~ m/^Up/) && ($val->{Status} =~ m/^(?:(?!Paused).)*$/)) { - $nbrunning++; $result = 'Running'; + $nbrunning++; } elsif ($val->{Status} =~ m/^Exited/) { $result = 'Exited'; $nbexited++;