diff --git a/apps/apache/serverstatus/mode/cpuload.pm b/apps/apache/serverstatus/mode/cpuload.pm new file mode 100644 index 000000000..2c02c695e --- /dev/null +++ b/apps/apache/serverstatus/mode/cpuload.pm @@ -0,0 +1,178 @@ +############################################################################### +# Copyright 2005-2013 MERETHIS +# Centreon is developped by : Julien Mathis and Romain Le Merlus under +# GPL Licence 2.0. +# +# This program is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free Software +# Foundation ; either version 2 of the License. +# +# This program is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along with +# this program; if not, see . +# +# Linking this program statically or dynamically with other modules is making a +# combined work based on this program. Thus, the terms and conditions of the GNU +# General Public License cover the whole combination. +# +# As a special exception, the copyright holders of this program give MERETHIS +# permission to link this program with independent modules to produce an timeelapsedutable, +# regardless of the license terms of these independent modules, and to copy and +# distribute the resulting timeelapsedutable under terms of MERETHIS choice, provided that +# MERETHIS also meet, for each linked independent module, the terms and conditions +# of the license of that module. An independent module is a module which is not +# derived from this program. If you modify this program, you may extend this +# exception to your version of the program, but you are not obliged to do so. If you +# do not wish to do so, delete this exception statement from your version. +# +# For more information : contact@centreon.com +# Author : Simon BOMM +# +# Based on De Bodt Lieven plugin +#################################################################################### + +package apps::apache::serverstatus::mode::cpuload; + +use base qw(centreon::plugins::mode); + +use strict; +use warnings; +use centreon::plugins::httplib; + +sub new { + my ($class, %options) = @_; + my $self = $class->SUPER::new(package => __PACKAGE__, %options); + bless $self, $class; + + $self->{version} = '1.0'; + $options{options}->add_options(arguments => + { + "hostname:s" => { name => 'hostname' }, + "port:s" => { name => 'port', }, + "proto:s" => { name => 'proto', default => "http" }, + "urlpath:s" => { name => 'url_path', default => "/server-status/?auto" }, + "credentials" => { name => 'credentials' }, + "username:s" => { name => 'username' }, + "password:s" => { name => 'password' }, + "proxyurl:s" => { name => 'proxyurl' }, + "warning:s" => { name => 'warning' }, + "critical:s" => { name => 'critical' }, + "timeout:s" => { name => 'timeout', default => '3' }, + }); + return $self; +} + +sub check_options { + my ($self, %options) = @_; + $self->SUPER::init(%options); + + if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{option_results}->{warning})) == 0) { + $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'."); + $self->{output}->option_exit(); + } + if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) { + $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'."); + $self->{output}->option_exit(); + } + if (!defined($self->{option_results}->{hostname})) { + $self->{output}->add_option_msg(short_msg => "Please set the hostname option"); + $self->{output}->option_exit(); + } + if ((defined($self->{option_results}->{credentials})) && (!defined($self->{option_results}->{username}) || !defined($self->{option_results}->{password}))) { + $self->{output}->add_option_msg(short_msg => "You need to set --username= and --password= options when --credentials is used"); + $self->{output}->option_exit(); + } +} + +sub run { + my ($self, %options) = @_; + + my $webcontent = centreon::plugins::httplib::connect($self); + # If not present: cpuload is 0 + my ($cpuload) = 0; + + if ($webcontent !~ /^ReqPerSec:\s+([^\s]+)/mi) { + $self->{output}->add_option_msg(short_msg => "Apache 'ExtendedStatus' option is off."); + $self->{output}->option_exit(); + } + if ($webcontent =~ /^CPULoad:\s+([^\s]+)/mi) { + $cpuload = $1; + $cpuload = '0' . $cpuload if ($cpuload =~ /^\./); + } + + my $exit = $self->{perfdata}->threshold_check(value => $cpuload, threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]); + + $self->{output}->output_add(severity => $exit, + short_msg => sprintf("CPU Load: %.2f %%", $cpuload)); + $self->{output}->perfdata_add(label => "cpuload", unit => '%', + value => sprintf("%.2f", $cpuload), + warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'), + critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'), + min => 0 + ); + + $self->{output}->display(); + $self->{output}->exit(); + +} + +1; + +__END__ + +=head1 MODE + +Check Apache WebServer CpuLoad + +=over 8 + +=item B<--hostname> + +IP Addr/FQDN of the webserver host + +=item B<--port> + +Port used by Apache + +=item B<--proxyurl> + +Proxy URL if any + +=item B<--proto> + +Specify https if needed + +=item B<--urlpath> + +Set path to get server-status page in auto mode (Default: '/server-status/?auto') + +=item B<--credentials> + +Specify this option if you access server-status page over basic authentification + +=item B<--username> + +Specify username for basic authentification (Mandatory if --credentials is specidied) + +=item B<--password> + +Specify password for basic authentification (Mandatory if --credentials is specidied) + +=item B<--timeout> + +Threshold for HTTP timeout + +=item B<--warning> + +Warning Threshold for CpuLoad + +=item B<--critical> + +Critical Threshold for CpuLoad + +=back + +=cut diff --git a/apps/apache/serverstatus/mode/requests.pm b/apps/apache/serverstatus/mode/requests.pm index 21256d7f3..6c3a7d233 100644 --- a/apps/apache/serverstatus/mode/requests.pm +++ b/apps/apache/serverstatus/mode/requests.pm @@ -40,7 +40,8 @@ use base qw(centreon::plugins::mode); use strict; use warnings; -use apps::apache::serverstatus::mode::libconnect; +use centreon::plugins::httplib; +use centreon::plugins::statefile; sub new { my ($class, %options) = @_; @@ -51,8 +52,9 @@ sub new { $options{options}->add_options(arguments => { "hostname:s" => { name => 'hostname' }, - "port:s" => { name => 'port', default => '80' }, + "port:s" => { name => 'port', }, "proto:s" => { name => 'proto', default => "http" }, + "urlpath:s" => { name => 'url_path', default => "/server-status/?auto" }, "credentials" => { name => 'credentials' }, "username:s" => { name => 'username' }, "password:s" => { name => 'password' }, @@ -61,13 +63,15 @@ sub new { "critical:s" => { name => 'critical' }, "warning-bytes:s" => { name => 'warning_bytes' }, "critical-bytes:s" => { name => 'critical_bytes' }, + "warning-access:s" => { name => 'warning_access' }, + "critical-access:s" => { name => 'critical_access' }, "timeout:s" => { name => 'timeout', default => '3' }, }); + $self->{statefile_value} = centreon::plugins::statefile->new(%options); return $self; } sub check_options { - my ($self, %options) = @_; $self->SUPER::init(%options); @@ -87,6 +91,14 @@ sub check_options { $self->{output}->add_option_msg(short_msg => "Wrong critical-bytes threshold '" . $self->{option_results}->{critical_bytes} . "'."); $self->{output}->option_exit(); } + if (($self->{perfdata}->threshold_validate(label => 'warning-access', value => $self->{option_results}->{warning_access})) == 0) { + $self->{output}->add_option_msg(short_msg => "Wrong warning-access threshold '" . $self->{option_results}->{warning_access} . "'."); + $self->{output}->option_exit(); + } + if (($self->{perfdata}->threshold_validate(label => 'critical-access', value => $self->{option_results}->{critical_access})) == 0) { + $self->{output}->add_option_msg(short_msg => "Wrong critical-access threshold '" . $self->{option_results}->{critical_access} . "'."); + $self->{output}->option_exit(); + } if (!defined($self->{option_results}->{hostname})) { $self->{output}->add_option_msg(short_msg => "Please set the hostname option"); $self->{output}->option_exit(); @@ -95,76 +107,101 @@ sub check_options { $self->{output}->add_option_msg(short_msg => "You need to set --username= and --password= options when --credentials is used"); $self->{output}->option_exit(); } - + + $self->{statefile_value}->check_options(%options); } sub run { - my ($self, %options) = @_; - - my $webcontent = apps::apache::serverstatus::mode::libconnect::connect($self); + + my $webcontent = centreon::plugins::httplib::connect($self); + my ($rPerSec, $bPerReq, $total_access, $total_bytes, $avg_bPerSec); + + $total_access = $1 if ($webcontent =~ /^Total Accesses:\s+([^\s]+)/mi); + $total_bytes = $1 * 1024 if ($webcontent =~ /^Total kBytes:\s+([^\s]+)/mi); - my @webcontentarr = split("\n", $webcontent); - my $i = 0; - my ($rPerSec, $rPerSecSfx, $bPerSec, $bPerSecSfx, $bPerReq, $bPerReqSfx); - - while (($i < @webcontentarr) && ((!defined($rPerSec)) || (!defined($bPerSec)) || (!defined($bPerReq)))) { - if ($webcontentarr[$i] =~ /([0-9]*\.?[0-9]+)\s([A-Za-z]+)\/sec\s-\s([0-9]*\.?[0-9]+)\s([A-Za-z]+)\/second\s-\s([0-9]*\.?[0-9]+)\s([A-Za-z]+)\/request/) { - ($rPerSec, $rPerSecSfx, $bPerSec, $bPerSecSfx, $bPerReq, $bPerReqSfx) = ($webcontentarr[$i] =~ /([0-9]*\.?[0-9]+)\s([A-Za-z]+)\/sec\s-\s([0-9]*\.?[0-9]+)\s([A-Za-z]+)\/second\s-\s([0-9]*\.?[0-9]+)\s([A-Za-z]+)\/request/); - } - $i++; + $rPerSec = $1 if ($webcontent =~ /^ReqPerSec:\s+([^\s]+)/mi); + # Need a little time to init + if ($webcontent =~ /^BytesPerReq:\s+([^\s]+)/mi) { + $bPerReq = $1 + } else { + $bPerReq = 0; } + $avg_bPerSec = $1 if ($webcontent =~ /^BytesPerSec:\s+([^\s]+)/mi); - if (!defined($rPerSec)) { + if (!defined($avg_bPerSec)) { $self->{output}->add_option_msg(short_msg => "Apache 'ExtendedStatus' option is off."); $self->{output}->option_exit(); } - if ($rPerSec =~ /^\./) { - $rPerSec = '0' . $rPerSec; - } + $rPerSec = '0' . $rPerSec if ($rPerSec =~ /^\./); + $avg_bPerSec = '0' . $avg_bPerSec if ($avg_bPerSec =~ /^\./); + $bPerReq = '0' . $bPerReq if ($bPerReq =~ /^\./); - if ($bPerReqSfx eq 'kB') { - $bPerReq = $bPerReq * 1024; - } elsif ($bPerReqSfx eq 'mB') { - $bPerReq = $bPerReq * 1024 * 1024; - } elsif ($bPerReqSfx eq 'gB') { - $bPerReq = $bPerReq * 1024 * 1024 * 1024; - } + $self->{statefile_value}->read(statefile => 'apache_' . $self->{option_results}->{hostname} . '_' . centreon::plugins::httplib::get_port($self) . '_' . $self->{mode}); + my $old_timestamp = $self->{statefile_value}->get(name => 'last_timestamp'); + my $old_total_access = $self->{statefile_value}->get(name => 'total_access'); + my $old_total_bytes = $self->{statefile_value}->get(name => 'total_bytes'); - if ($bPerSecSfx eq 'kB') { - $bPerSec = $bPerSec * 1024; - } elsif ($bPerSecSfx eq 'mB') { - $bPerSec = $bPerSec * 1024 * 1024; - } elsif ($bPerSecSfx eq 'gB') { - $bPerSec = $bPerSec * 1024 * 1024 * 1024; + my $new_datas = {}; + $new_datas->{last_timestamp} = time(); + $new_datas->{total_bytes} = $total_bytes; + $new_datas->{total_access} = $total_access; + + $self->{statefile_value}->write(data => $new_datas); + if (!defined($old_timestamp) || !defined($old_total_access)) { + $self->{output}->output_add(severity => 'OK', + short_msg => "Buffer creation..."); + $self->{output}->display(); + $self->{output}->exit(); } - + $old_total_access = 0 if ($old_total_access > $new_datas->{total_access}); + $old_total_bytes = 0 if ($old_total_bytes > $new_datas->{total_bytes}); + my $delta_time = $new_datas->{last_timestamp} - $old_timestamp; + $delta_time = 1 if ($delta_time == 0); # One seconds ;) + + my $bPerSec = ($new_datas->{total_bytes} - $old_total_bytes) / $delta_time; + my $aPerSec = ($new_datas->{total_access} - $old_total_access) / $delta_time; + my $exit1 = $self->{perfdata}->threshold_check(value => $rPerSec, threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]); - my $exit2 = $self->{perfdata}->threshold_check(value => $bPerReq, threshold => [ { label => 'critical-bytes', 'exit_litteral' => 'critical' }, { label => 'warning-bytes', exit_litteral => 'warning' } ]); - - my $exit = $self->{output}->get_most_critical(status => [ $exit1, $exit2 ]); + my $exit2 = $self->{perfdata}->threshold_check(value => $bPerSec, threshold => [ { label => 'critical-bytes', 'exit_litteral' => 'critical' }, { label => 'warning-bytes', exit_litteral => 'warning' } ]); + my $exit3 = $self->{perfdata}->threshold_check(value => $aPerSec, threshold => [ { label => 'critical-access', 'exit_litteral' => 'critical' }, { label => 'warning-access', exit_litteral => 'warning' } ]); + + my $exit = $self->{output}->get_most_critical(status => [ $exit1, $exit2, $exit3 ]); my ($bPerSec_value, $bPerSec_unit) = $self->{perfdata}->change_bytes(value => $bPerSec); my ($bPerReq_value, $bPerReq_unit) = $self->{perfdata}->change_bytes(value => $bPerReq); $self->{output}->output_add(severity => $exit, - short_msg => sprintf("RequestPerSec: %s BytesPerSecond: %s BytesPerRequest: %s", $rPerSec, - $bPerSec_value . ' ' . $bPerSec_unit, - $bPerReq_value . ' ' . $bPerReq_unit)); - $self->{output}->perfdata_add(label => "requestPerSec", - value => $rPerSec, - unit => $rPerSecSfx, + short_msg => sprintf("BytesPerSec: %s AccessPerSec: %.2f RequestPerSec: %.2f BytesPerRequest: %s ", + $bPerSec_value . ' ' . $bPerSec_unit, + $aPerSec, + $rPerSec, + $bPerReq_value . ' ' . $bPerReq_unit + )); + $self->{output}->perfdata_add(label => "avg_RequestPerSec", + value => sprintf("%.2f", $rPerSec), warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'), - critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical') + critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'), + min => 0 ); - $self->{output}->perfdata_add(label => "bytesPerSec", - value => $bPerSec, - unit => 'B'); - $self->{output}->perfdata_add(label => "bytesPerRequest", unit => 'B', - value => $bPerReq, + $self->{output}->perfdata_add(label => "bytesPerSec", unit => 'B', + value => sprintf("%.2f", $bPerSec), warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-bytes'), critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical-bytes'), + min => 0); + $self->{output}->perfdata_add(label => "avg_bytesPerRequest", unit => 'B', + value => $bPerReq, + min => 0 ); + $self->{output}->perfdata_add(label => "avg_bytesPerSec", unit => 'B', + value => $avg_bPerSec, + min => 0 + ); + $self->{output}->perfdata_add(label => "accessPerSec", + value => sprintf("%.2f", $aPerSec), + warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-access'), + critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical-access'), + min => 0); $self->{output}->display(); $self->{output}->exit(); @@ -197,6 +234,10 @@ Proxy URL if any Specify https if needed +=item B<--urlpath> + +Set path to get server-status page in auto mode (Default: '/server-status/?auto') + =item B<--credentials> Specify this option if you access server-status page over basic authentification @@ -209,8 +250,6 @@ Specify username for basic authentification (Mandatory if --credentials is speci Specify password for basic authentification (Mandatory if --credentials is specidied) -=item B<--password> - =item B<--timeout> Threshold for HTTP timeout @@ -225,11 +264,19 @@ Critical Threshold for Request per seconds =item B<--warning-bytes> -Warning Threshold for Bytes Per Request +Warning Threshold for Bytes per seconds =item B<--critical-bytes> -Critical Threshold for Bytes Per Request +Critical Threshold for Bytes per seconds + +=item B<--warning-access> + +Warning Threshold for Access per seconds + +=item B<--critical-access> + +Critical Threshold for Access per seconds =back diff --git a/apps/apache/serverstatus/mode/responsetime.pm b/apps/apache/serverstatus/mode/responsetime.pm index 7f7a5827f..610f75a0c 100644 --- a/apps/apache/serverstatus/mode/responsetime.pm +++ b/apps/apache/serverstatus/mode/responsetime.pm @@ -41,7 +41,7 @@ use base qw(centreon::plugins::mode); use strict; use warnings; use Time::HiRes qw(gettimeofday tv_interval); -use apps::apache::serverstatus::mode::libconnect; +use centreon::plugins::httplib; sub new { my ($class, %options) = @_; @@ -52,8 +52,9 @@ sub new { $options{options}->add_options(arguments => { "hostname:s" => { name => 'hostname' }, - "port:s" => { name => 'port', default => '80' }, + "port:s" => { name => 'port', }, "proto:s" => { name => 'proto', default => "http" }, + "urlpath:s" => { name => 'url_path', default => "/server-status/?auto" }, "credentials" => { name => 'credentials' }, "username:s" => { name => 'username' }, "password:s" => { name => 'password' }, @@ -98,47 +99,21 @@ sub run { my $timing0 = [gettimeofday]; - my $webcontent = apps::apache::serverstatus::mode::libconnect::connect($self, connection_exit => 'critical'); + my $webcontent = centreon::plugins::httplib::connect($self, connection_exit => 'critical'); my $timeelapsed = tv_interval ($timing0, [gettimeofday]); - if (defined $webcontent) { - my @webcontentarr = split("\n", $webcontent); - my $i = 0; - my $ScoreBoard = ""; - my $PosPreBegin = undef; - my $PosPreEnd = undef; - while (($i < @webcontentarr) && ((!defined($PosPreBegin)) || (!defined($PosPreEnd)))) { - if (!defined($PosPreBegin)) { - if ($webcontentarr[$i] =~ m/
/i) {
-                    $PosPreBegin = $i;
-                }
-            }
-            if (defined($PosPreBegin)) {
-                if ($webcontentarr[$i] =~ m/<\/pre>/i) {
-                    $PosPreEnd = $i;
-                }
-            }
-            $i++;
-        }
-        for ($i = $PosPreBegin; $i <= $PosPreEnd; $i++) {
-           $ScoreBoard = $ScoreBoard . $webcontentarr[$i];
-        }
-        $ScoreBoard =~ s/^.*<[Pp][Rr][Ee]>//;
-        $ScoreBoard =~ s/<\/[Pp][Rr][Ee].*>//;
-        my $CountOpenSlots = ($ScoreBoard =~ tr/\.//);
-        my $exit = $self->{perfdata}->threshold_check(value => $timeelapsed,
-                                                      threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
-        $self->{output}->output_add(severity => $exit,
-                                    short_msg => sprintf("Response time %fs ", $timeelapsed));
-        $self->{output}->perfdata_add(label => "time",
-                                      value => $timeelapsed,
-                                      warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
-                                      critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'));
-     }
+    my $exit = $self->{perfdata}->threshold_check(value => $timeelapsed,
+                                                  threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
+    $self->{output}->output_add(severity => $exit,
+                                short_msg => sprintf("Response time %fs ", $timeelapsed));
+    $self->{output}->perfdata_add(label => "time",
+                                  value => $timeelapsed,
+                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
+                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'));
 
-       $self->{output}->display();
-       $self->{output}->exit();
+    $self->{output}->display();
+    $self->{output}->exit();
 }
 
 1;
@@ -147,7 +122,7 @@ __END__
 
 =head1 MODE
 
-Check Apache WebServer statistics informations
+Check Apache WebServer Time Response
 
 =over 8
 
@@ -163,6 +138,10 @@ Port used by Apache
 
 Specify https if needed
 
+=item B<--urlpath>
+
+Set path to get server-status page in auto mode (Default: '/server-status/?auto')
+
 =item B<--credentials>
 
 Specify this option if you access server-status page over basic authentification
diff --git a/apps/apache/serverstatus/mode/slotstates.pm b/apps/apache/serverstatus/mode/slotstates.pm
index 1bb81396b..e5d65182c 100644
--- a/apps/apache/serverstatus/mode/slotstates.pm
+++ b/apps/apache/serverstatus/mode/slotstates.pm
@@ -40,7 +40,7 @@ use base qw(centreon::plugins::mode);
 
 use strict;
 use warnings;
-use apps::apache::serverstatus::mode::libconnect;
+use centreon::plugins::httplib;
 
 sub new {
     my ($class, %options) = @_;
@@ -51,8 +51,9 @@ sub new {
     $options{options}->add_options(arguments =>
             {
             "hostname:s"    => { name => 'hostname' },
-            "port:s"        => { name => 'port', default => '80' },
+            "port:s"        => { name => 'port', },
             "proto:s"       => { name => 'proto', default => "http" },
+            "urlpath:s"     => { name => 'url_path', default => "/server-status/?auto" },
             "credentials"   => { name => 'credentials' },
             "username:s"    => { name => 'username' },
             "password:s"    => { name => 'password' },
@@ -65,7 +66,6 @@ sub new {
 }
 
 sub check_options {
-
     my ($self, %options) = @_;
     $self->SUPER::init(%options);
 
@@ -96,40 +96,17 @@ sub check_options {
 sub run {
     my ($self, %options) = @_;
     
-    my $webcontent = apps::apache::serverstatus::mode::libconnect::connect($self);
-    my @webcontentarr = split("\n", $webcontent);
-    my $i = 0;
+    my $webcontent = centreon::plugins::httplib::connect($self);
     my $ScoreBoard = "";
-    my $PosPreBegin = undef;
-    my $PosPreEnd = undef;
-    
-    while (($i < @webcontentarr) && ((!defined($PosPreBegin)) || (!defined($PosPreEnd)))) {
-        if (!defined($PosPreBegin)) {
-            if ( $webcontentarr[$i] =~ m/
/i ) {
-                $PosPreBegin = $i;
-            }
-        }
-        if (defined($PosPreBegin)) {
-            if ( $webcontentarr[$i] =~ m/<\/pre>/i ) {
-                $PosPreEnd = $i;
-            }
-        }
-        $i++;
+    if ($webcontent =~ /^Scoreboard:\s+([^\s]+)/mi) {
+        $ScoreBoard = $1;
     }
-
-    for ($i = $PosPreBegin; $i <= $PosPreEnd; $i++) {
-        $ScoreBoard = $ScoreBoard . $webcontentarr[$i];
-    }
-  
-    $ScoreBoard =~ s/^.*<[Pp][Rr][Ee]>//;
-    $ScoreBoard =~ s/<\/[Pp][Rr][Ee].*>//;
-    
+   
     my $srvLimit = length($ScoreBoard);
-
     my $CountOpenSlots = ($ScoreBoard =~ tr/\.//);
 
     my $exit = $self->{perfdata}->threshold_check(value => $CountOpenSlots,
-                                                 threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
+                                                  threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
 
     $self->{output}->output_add(severity => $exit,
                                 short_msg => sprintf("Free slots: %d", $CountOpenSlots));
@@ -190,6 +167,10 @@ Proxy URL if any
 
 Protocol used http or https
 
+=item B<--urlpath>
+
+Set path to get server-status page in auto mode (Default: '/server-status/?auto')
+
 =item B<--credentials>
 
 Specify this option if you access server-status page over basic authentification
diff --git a/apps/apache/serverstatus/mode/workers.pm b/apps/apache/serverstatus/mode/workers.pm
new file mode 100644
index 000000000..24effb81e
--- /dev/null
+++ b/apps/apache/serverstatus/mode/workers.pm
@@ -0,0 +1,188 @@
+###############################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an timeelapsedutable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting timeelapsedutable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Author : Simon BOMM 
+#
+# Based on De Bodt Lieven plugin
+####################################################################################
+
+package apps::apache::serverstatus::mode::workers;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+use centreon::plugins::httplib;
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+            {
+            "hostname:s"    => { name => 'hostname' },
+            "port:s"        => { name => 'port', },
+            "proto:s"       => { name => 'proto', default => "http" },
+            "urlpath:s"     => { name => 'url_path', default => "/server-status/?auto" },
+            "credentials"   => { name => 'credentials' },
+            "username:s"    => { name => 'username' },
+            "password:s"    => { name => 'password' },
+            "proxyurl:s"    => { name => 'proxyurl' },
+            "warning:s"     => { name => 'warning' },
+            "critical:s"    => { name => 'critical' },
+            "timeout:s"     => { name => 'timeout', default => '3' },
+            });
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+
+    if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{option_results}->{warning})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'.");
+        $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'.");
+        $self->{output}->option_exit();
+    }
+    if (($self->{option_results}->{proto} ne 'http') && ($self->{option_results}->{proto} ne 'https')) {
+        $self->{output}->add_option_msg(short_msg => "Unsupported protocol specified '" . $self->{option_results}->{proto} . "'.");
+        $self->{output}->option_exit();
+    }
+    if (!defined($self->{option_results}->{hostname})) {
+        $self->{output}->add_option_msg(short_msg => "Please set the hostname option");
+        $self->{output}->option_exit();
+    }
+    if ((defined($self->{option_results}->{credentials})) && (!defined($self->{option_results}->{username}) || !defined($self->{option_results}->{password}))) {
+        $self->{output}->add_option_msg(short_msg => "You need to set --username= and --password= options when --credentials is used");
+        $self->{output}->option_exit();
+    }
+
+}
+
+sub run {
+    my ($self, %options) = @_;
+        
+    my $webcontent = centreon::plugins::httplib::connect($self);
+    my ($BusyWorkers, $IdleWorkers, $ScoreBoard);
+    if ($webcontent =~ /^BusyWorkers:\s+([^\s]+)/mi) {
+        $BusyWorkers = $1;
+    }
+    if ($webcontent =~ /^IdleWorkers:\s+([^\s]+)/mi) {
+        $IdleWorkers = $1;
+    }
+    if ($webcontent =~ /^Scoreboard:\s+([^\s]+)/mi) {
+        $ScoreBoard = $1;
+    }
+    
+    my $srvLimit = length($ScoreBoard);
+    my $prct_busy = $BusyWorkers / $srvLimit * 100;
+    
+    my $exit = $self->{perfdata}->threshold_check(value => $prct_busy,
+                                                 threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
+    $self->{output}->output_add(severity => $exit,
+                                short_msg => sprintf("Busy workers: %d Idle workers: %d (Server Limit: %d - %d %% Busy)", $BusyWorkers, $IdleWorkers, $srvLimit, $prct_busy));
+    $self->{output}->perfdata_add(label => "idle_workers",
+                                  value => $IdleWorkers,
+                                  min => 0,
+                                  max => $srvLimit);
+    $self->{output}->perfdata_add(label => "busy_workers",
+                                  value => $BusyWorkers,
+                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
+                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'),
+                                  min => 0,
+                                  max => $srvLimit);
+
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check Apache WebServer busy processes.
+
+=over 8
+
+=item B<--hostname>
+
+IP Addr/FQDN of the webserver host
+
+=item B<--port>
+
+Port used by Apache
+
+=item B<--proxyurl>
+
+Proxy URL if any
+
+=item B<--proto>
+
+Protocol to use http or https, http is default
+
+=item B<--urlpath>
+
+Set path to get server-status page in auto mode (Default: '/server-status/?auto')
+
+=item B<--credentials>
+
+Specify this option if you access server-status page over basic authentification
+
+=item B<--username>
+
+Specify username for basic authentification (Mandatory if --credentials is specidied)
+
+=item B<--password>
+
+Specify password for basic authentification (Mandatory if --credentials is specidied)
+
+=item B<--timeout>
+
+Threshold for HTTP timeout
+
+=item B<--warning>
+
+Warning Threshold (%) of busy workers
+
+=item B<--critical>
+
+Critical Threshold (%) of busy workers
+
+=back
+
+=cut
\ No newline at end of file
diff --git a/apps/apache/serverstatus/plugin.pm b/apps/apache/serverstatus/plugin.pm
index ae1288ff8..5b0c1a875 100644
--- a/apps/apache/serverstatus/plugin.pm
+++ b/apps/apache/serverstatus/plugin.pm
@@ -47,9 +47,11 @@ sub new {
 
 	$self->{version} = '0.1';
 	%{$self->{modes}} = (
-			'responsetime'	=> 'apps::apache::serverstatus::mode::responsetime',
-			'requests'	=> 'apps::apache::serverstatus::mode::requests',
-			'slotstates'	=> 'apps::apache::serverstatus::mode::slotstates',
+            'cpuload'       => 'apps::apache::serverstatus::mode::cpuload',
+            'responsetime'  => 'apps::apache::serverstatus::mode::responsetime',
+            'requests'      => 'apps::apache::serverstatus::mode::requests',
+            'slotstates'	=> 'apps::apache::serverstatus::mode::slotstates',
+            'workers'       => 'apps::apache::serverstatus::mode::workers',
 			);
 
 	return $self;
diff --git a/apps/exchange/2010/local/mode/activesyncmailbox.pm b/apps/exchange/2010/local/mode/activesyncmailbox.pm
new file mode 100644
index 000000000..f339ea2ad
--- /dev/null
+++ b/apps/exchange/2010/local/mode/activesyncmailbox.pm
@@ -0,0 +1,182 @@
+################################################################################
+# Copyright 2005-2014 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package apps::exchange::2010::local::mode::activesyncmailbox;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+use centreon::common::powershell::exchange::2010::activesyncmailbox;
+
+my %threshold = ('warning' => 'warning', 'critical' => 'critical');
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+                                { 
+                                  "no-ps"               => { name => 'no_ps', },
+                                  "timeout:s"           => { name => 'timeout', default => 50 },
+                                  "command:s"           => { name => 'command', default => 'powershell.exe' },
+                                  "command-path:s"      => { name => 'command_path' },
+                                  "command-options:s"   => { name => 'command_options', default => '-InputFormat none -NoLogo -EncodedCommand' },
+                                  "ps-exec-only"        => { name => 'ps_exec_only', },
+                                  "warning:s"           => { name => 'warning', },
+                                  "critical:s"          => { name => 'critical', },
+                                  "mailbox:s"           => { name => 'mailbox', },
+                                  "password:s"          => { name => 'password', },
+                                  "no-trust-ssl"        => { name => 'no_trust_ssl', },
+                                });
+    $self->{thresholds} = {};
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+
+    if (!defined($self->{option_results}->{mailbox}) || $self->{option_results}->{mailbox} eq '') {
+        $self->{output}->add_option_msg(short_msg => "Need to specify '--mailbox' option.");
+        $self->{output}->option_exit();
+    }
+    if (!defined($self->{option_results}->{password}) || $self->{option_results}->{password} eq '') {
+        $self->{output}->add_option_msg(short_msg => "Need to specify '--password' option.");
+        $self->{output}->option_exit();
+    }
+    foreach my $th (keys %threshold) {
+        next if (!defined($self->{option_results}->{$th}));
+        if ($self->{option_results}->{$th} !~ /^(\!=|=){0,1}(.*){0,1}/) {
+            $self->{output}->add_option_msg(short_msg => "Wrong threshold for option '--" . $th . "': " . $self->{option_results}->{$th});
+            $self->{output}->option_exit();
+        }
+        
+        my $operator = defined($1) && $1 ne '' ? $1 : '!=';
+        my $state = defined($2) && $2 ne '' ? $2 : 'Success';
+        $self->{thresholds}->{$th} = { state => $state, operator => $operator, out => $threshold{$th} };
+    }
+}
+
+sub run {
+    my ($self, %options) = @_;
+    
+    my $ps = centreon::common::powershell::exchange::2010::activesyncmailbox::get_powershell(mailbox => $self->{option_results}->{mailbox},
+                                                                                             password => $self->{option_results}->{password}, 
+                                                                                             no_ps => $self->{option_results}->{no_ps},
+                                                                                             no_trust_ssl => $self->{option_results}->{no_trust_ssl}
+                                                                                             );
+    $self->{option_results}->{command_options} .= " " . $ps . " 2>&1";
+    my $stdout = centreon::plugins::misc::windows_execute(output => $self->{output},
+                                                          timeout => $self->{option_results}->{timeout},
+                                                          command => $self->{option_results}->{command},
+                                                          command_path => $self->{option_results}->{command_path},
+                                                          command_options => $self->{option_results}->{command_options});
+    if (defined($self->{option_results}->{ps_exec_only})) {
+        $self->{output}->output_add(severity => 'OK',
+                                    short_msg => $stdout);
+        $self->{output}->display(nolabel => 1, force_ignore_perfdata => 1, force_long_output => 1);
+        $self->{output}->exit();
+    }
+    centreon::common::powershell::exchange::2010::activesyncmailbox::check($self, stdout => $stdout, mailbox => $self->{option_results}->{mailbox});
+    
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check activesync to a mailbox.
+
+=over 8
+
+=item B<--timeout>
+
+Set timeout time for command execution (Default: 50 sec)
+
+=item B<--no-ps>
+
+Don't encode powershell. To be used with --command and 'type' command.
+
+=item B<--command>
+
+Command to get information (Default: 'powershell.exe').
+Can be changed if you have output in a file. To be used with --no-ps option!!!
+
+=item B<--command-path>
+
+Command path (Default: none).
+
+=item B<--command-options>
+
+Command options (Default: '-InputFormat none -NoLogo -EncodedCommand').
+
+=item B<--ps-exec-only>
+
+Print powershell output.
+
+=item B<--warning>
+
+Warning threshold
+(If set without value, it's: "!=Success". Need to change if your not US language.
+Regexp can be used)
+
+=item B<--critical>
+
+Critical threshold
+(If set without value, it's: "!=Success". Need to change if your not US language.
+Regexp can be used)
+
+=item B<--mailbox>
+
+Set the mailbox to check (Required).
+
+=item B<--password>
+
+Set the password for the mailbox (Required).
+
+=item B<--no-trust-ssl>
+
+By default, SSL certificate validy is not checked.
+
+=back
+
+=cut
\ No newline at end of file
diff --git a/apps/exchange/2010/local/mode/databases.pm b/apps/exchange/2010/local/mode/databases.pm
new file mode 100644
index 000000000..d57b6bf2c
--- /dev/null
+++ b/apps/exchange/2010/local/mode/databases.pm
@@ -0,0 +1,195 @@
+################################################################################
+# Copyright 2005-2014 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package apps::exchange::2010::local::mode::databases;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+use centreon::common::powershell::exchange::2010::databases;
+
+my %threshold = ('warning_mapi' => 'warning', 'critical_mapi' => 'critical',
+                 'warning_mailflow' => 'warning', 'critical_mailflow' => 'critical');
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+                                { 
+                                  "no-ps"             => { name => 'no_ps', },
+                                  "no-mailflow"       => { name => 'no_mailflow', },
+                                  "no-mapi"           => { name => 'no_mapi', },
+                                  "timeout:s"         => { name => 'timeout', default => 50 },
+                                  "command:s"         => { name => 'command', default => 'powershell.exe' },
+                                  "command-path:s"    => { name => 'command_path' },
+                                  "command-options:s"         => { name => 'command_options', default => '-InputFormat none -NoLogo -EncodedCommand' },
+                                  "ps-exec-only"              => { name => 'ps_exec_only', },
+                                  "ps-database-filter:s"      => { name => 'ps_database_filter', },
+                                  "ps-database-test-filter:s" => { name => 'ps_database_test_filter', },
+                                  "warning-mapi:s"            => { name => 'warning_mapi', },
+                                  "critical-mapi:s"           => { name => 'critical_mapi', },
+                                  "warning-mailflow:s"        => { name => 'warning_mailflow', },
+                                  "critical-mailflow:s"       => { name => 'critical_mailflow', },
+                                });
+    $self->{thresholds} = {};
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+    
+    foreach my $th (keys %threshold) {
+        next if (!defined($self->{option_results}->{$th}));
+        if ($self->{option_results}->{$th} !~ /^(\!=|=){0,1}(.*){0,1}/) {
+            $th =~ s/_/-/;
+            $self->{output}->add_option_msg(short_msg => "Wrong threshold for option '--" . $th . "': " . $self->{option_results}->{$th});
+            $self->{output}->option_exit();
+        }
+        
+        my $operator = defined($1) && $1 ne '' ? $1 : '!=';
+        my $state = defined($2) && $2 ne '' ? $2 : 'Success';
+        $self->{thresholds}->{$th} = { state => $state, operator => $operator, out => $threshold{$th} };
+    }
+}
+
+sub run {
+    my ($self, %options) = @_;
+    
+    my $ps = centreon::common::powershell::exchange::2010::databases::get_powershell(no_mailflow => $self->{option_results}->{no_mailflow},
+                                                                                     no_ps => $self->{option_results}->{no_ps},
+                                                                                     no_mapi => $self->{option_results}->{no_mapi},
+                                                                                     filter_database => $self->{option_results}->{ps_database_filter},
+                                                                                     filter_database_test => $self->{option_results}->{ps_database_test_filter});
+    $self->{option_results}->{command_options} .= " " . $ps . " 2>&1";
+    my $stdout = centreon::plugins::misc::windows_execute(output => $self->{output},
+                                                          timeout => $self->{option_results}->{timeout},
+                                                          command => $self->{option_results}->{command},
+                                                          command_path => $self->{option_results}->{command_path},
+                                                          command_options => $self->{option_results}->{command_options});
+    if (defined($self->{option_results}->{ps_exec_only})) {
+        $self->{output}->output_add(severity => 'OK',
+                                    short_msg => $stdout);
+        $self->{output}->display(nolabel => 1, force_ignore_perfdata => 1, force_long_output => 1);
+        $self->{output}->exit();
+    }
+    centreon::common::powershell::exchange::2010::databases::check($self, stdout => $stdout);
+    
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check: Exchange Databases are Mounted, Mapi/Mailflow Connectivity to all databases are working.
+
+=over 8
+
+=item B<--no-mailflow>
+
+Don't check mailflow connectivity.
+
+=item B<--no-mapi>
+
+Don't check mapi connectivity.
+
+=item B<--timeout>
+
+Set timeout time for command execution (Default: 50 sec)
+
+=item B<--no-ps>
+
+Don't encode powershell. To be used with --command and 'type' command.
+
+=item B<--command>
+
+Command to get information (Default: 'powershell.exe').
+Can be changed if you have output in a file. To be used with --no-ps option!!!
+
+=item B<--command-path>
+
+Command path (Default: none).
+
+=item B<--command-options>
+
+Command options (Default: '-InputFormat none -NoLogo -EncodedCommand').
+
+=item B<--ps-exec-only>
+
+Print powershell output.
+
+=item B<--ps-database-filter>
+
+Filter database (only wilcard '*' can be used. In Powershell).
+
+=item B<--ps-database-test-filter>
+
+Skip mapi/mailflow test (regexp can be used. In Powershell).
+
+=item B<--warning-mapi>
+
+Warning threshold
+(If set without value, it's: "!=Success". Need to change if your not US language.
+Regexp can be used)
+
+=item B<--critical-mapi>
+
+Critical threshold
+(If set without value, it's: "!=Success". Need to change if your not US language.
+Regexp can be used)
+
+=item B<--warning-mailflow>
+
+Warning threshold
+(If set without value, it's: "!=Success". Need to change if your not US language.
+Regexp can be used)
+
+=item B<--critical-mailflow>
+
+Critical threshold
+(If set without value, it's: "!=Success". Need to change if your not US language.
+Regexp can be used)
+
+=back
+
+=cut
\ No newline at end of file
diff --git a/apps/exchange/2010/local/mode/imapmailbox.pm b/apps/exchange/2010/local/mode/imapmailbox.pm
new file mode 100644
index 000000000..d27853791
--- /dev/null
+++ b/apps/exchange/2010/local/mode/imapmailbox.pm
@@ -0,0 +1,176 @@
+################################################################################
+# Copyright 2005-2014 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package apps::exchange::2010::local::mode::imapmailbox;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+use centreon::common::powershell::exchange::2010::imapmailbox;
+
+my %threshold = ('warning' => 'warning', 'critical' => 'critical');
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+                                { 
+                                  "no-ps"               => { name => 'no_ps', },
+                                  "timeout:s"           => { name => 'timeout', default => 50 },
+                                  "command:s"           => { name => 'command', default => 'powershell.exe' },
+                                  "command-path:s"      => { name => 'command_path' },
+                                  "command-options:s"   => { name => 'command_options', default => '-InputFormat none -NoLogo -EncodedCommand' },
+                                  "ps-exec-only"        => { name => 'ps_exec_only', },
+                                  "warning:s"           => { name => 'warning', },
+                                  "critical:s"          => { name => 'critical', },
+                                  "mailbox:s"           => { name => 'mailbox', },
+                                  "password:s"          => { name => 'password', },
+                                });
+    $self->{thresholds} = {};
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+
+    if (!defined($self->{option_results}->{mailbox}) || $self->{option_results}->{mailbox} eq '') {
+        $self->{output}->add_option_msg(short_msg => "Need to specify '--mailbox' option.");
+        $self->{output}->option_exit();
+    }
+    if (!defined($self->{option_results}->{password}) || $self->{option_results}->{password} eq '') {
+        $self->{output}->add_option_msg(short_msg => "Need to specify '--password' option.");
+        $self->{output}->option_exit();
+    }
+    foreach my $th (keys %threshold) {
+        next if (!defined($self->{option_results}->{$th}));
+        if ($self->{option_results}->{$th} !~ /^(\!=|=){0,1}(.*){0,1}/) {
+            $self->{output}->add_option_msg(short_msg => "Wrong threshold for option '--" . $th . "': " . $self->{option_results}->{$th});
+            $self->{output}->option_exit();
+        }
+        
+        my $operator = defined($1) && $1 ne '' ? $1 : '!=';
+        my $state = defined($2) && $2 ne '' ? $2 : 'Success';
+        $self->{thresholds}->{$th} = { state => $state, operator => $operator, out => $threshold{$th} };
+    }
+}
+
+sub run {
+    my ($self, %options) = @_;
+    
+    my $ps = centreon::common::powershell::exchange::2010::imapmailbox::get_powershell(mailbox => $self->{option_results}->{mailbox},
+                                                                                             password => $self->{option_results}->{password}, 
+                                                                                             no_ps => $self->{option_results}->{no_ps},
+                                                                                             );
+    $self->{option_results}->{command_options} .= " " . $ps . " 2>&1";
+    my $stdout = centreon::plugins::misc::windows_execute(output => $self->{output},
+                                                          timeout => $self->{option_results}->{timeout},
+                                                          command => $self->{option_results}->{command},
+                                                          command_path => $self->{option_results}->{command_path},
+                                                          command_options => $self->{option_results}->{command_options});
+    if (defined($self->{option_results}->{ps_exec_only})) {
+        $self->{output}->output_add(severity => 'OK',
+                                    short_msg => $stdout);
+        $self->{output}->display(nolabel => 1, force_ignore_perfdata => 1, force_long_output => 1);
+        $self->{output}->exit();
+    }
+    centreon::common::powershell::exchange::2010::imapmailbox::check($self, stdout => $stdout, mailbox => $self->{option_results}->{mailbox});
+    
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check imap to a mailbox.
+
+=over 8
+
+=item B<--timeout>
+
+Set timeout time for command execution (Default: 50 sec)
+
+=item B<--no-ps>
+
+Don't encode powershell. To be used with --command and 'type' command.
+
+=item B<--command>
+
+Command to get information (Default: 'powershell.exe').
+Can be changed if you have output in a file. To be used with --no-ps option!!!
+
+=item B<--command-path>
+
+Command path (Default: none).
+
+=item B<--command-options>
+
+Command options (Default: '-InputFormat none -NoLogo -EncodedCommand').
+
+=item B<--ps-exec-only>
+
+Print powershell output.
+
+=item B<--warning>
+
+Warning threshold
+(If set without value, it's: "!=Success". Need to change if your not US language.
+Regexp can be used)
+
+=item B<--critical>
+
+Critical threshold
+(If set without value, it's: "!=Success". Need to change if your not US language.
+Regexp can be used)
+
+=item B<--mailbox>
+
+Set the mailbox to check (Required).
+
+=item B<--password>
+
+Set the password for the mailbox (Required).
+
+=back
+
+=cut
\ No newline at end of file
diff --git a/apps/exchange/2010/local/mode/mapimailbox.pm b/apps/exchange/2010/local/mode/mapimailbox.pm
new file mode 100644
index 000000000..6f74610a2
--- /dev/null
+++ b/apps/exchange/2010/local/mode/mapimailbox.pm
@@ -0,0 +1,167 @@
+################################################################################
+# Copyright 2005-2014 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package apps::exchange::2010::local::mode::mapimailbox;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+use centreon::common::powershell::exchange::2010::mapimailbox;
+
+my %threshold = ('warning_mapi' => 'warning', 'critical_mapi' => 'critical');
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+                                { 
+                                  "no-ps"               => { name => 'no_ps', },
+                                  "timeout:s"           => { name => 'timeout', default => 50 },
+                                  "command:s"           => { name => 'command', default => 'powershell.exe' },
+                                  "command-path:s"      => { name => 'command_path' },
+                                  "command-options:s"   => { name => 'command_options', default => '-InputFormat none -NoLogo -EncodedCommand' },
+                                  "ps-exec-only"        => { name => 'ps_exec_only', },
+                                  "warning-mapi:s"      => { name => 'warning_mapi', },
+                                  "critical-mapi:s"     => { name => 'critical_mapi', },
+                                  "mailbox:s"           => { name => 'mailbox', },
+                                });
+    $self->{thresholds} = {};
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+
+    if (!defined($self->{option_results}->{mailbox}) || $self->{option_results}->{mailbox} eq '') {
+        $self->{output}->add_option_msg(short_msg => "Need to specify '--mailbox' option.");
+        $self->{output}->option_exit();
+    }
+    foreach my $th (keys %threshold) {
+        next if (!defined($self->{option_results}->{$th}));
+        if ($self->{option_results}->{$th} !~ /^(\!=|=){0,1}(.*){0,1}/) {
+            $th =~ s/_/-/;
+            $self->{output}->add_option_msg(short_msg => "Wrong threshold for option '--" . $th . "': " . $self->{option_results}->{$th});
+            $self->{output}->option_exit();
+        }
+        
+        my $operator = defined($1) && $1 ne '' ? $1 : '!=';
+        my $state = defined($2) && $2 ne '' ? $2 : 'Success';
+        $self->{thresholds}->{$th} = { state => $state, operator => $operator, out => $threshold{$th} };
+    }
+}
+
+sub run {
+    my ($self, %options) = @_;
+    
+    my $ps = centreon::common::powershell::exchange::2010::mapimailbox::get_powershell(mailbox => $self->{option_results}->{mailbox},
+                                                                                       no_ps => $self->{option_results}->{no_ps},
+                                                                                       );
+    $self->{option_results}->{command_options} .= " " . $ps . " 2>&1";
+    my $stdout = centreon::plugins::misc::windows_execute(output => $self->{output},
+                                                          timeout => $self->{option_results}->{timeout},
+                                                          command => $self->{option_results}->{command},
+                                                          command_path => $self->{option_results}->{command_path},
+                                                          command_options => $self->{option_results}->{command_options});
+    if (defined($self->{option_results}->{ps_exec_only})) {
+        $self->{output}->output_add(severity => 'OK',
+                                    short_msg => $stdout);
+        $self->{output}->display(nolabel => 1, force_ignore_perfdata => 1, force_long_output => 1);
+        $self->{output}->exit();
+    }
+    centreon::common::powershell::exchange::2010::mapimailbox::check($self, stdout => $stdout, mailbox => $self->{option_results}->{mailbox});
+    
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check mapi connection to a mailbox.
+
+=over 8
+
+=item B<--timeout>
+
+Set timeout time for command execution (Default: 50 sec)
+
+=item B<--no-ps>
+
+Don't encode powershell. To be used with --command and 'type' command.
+
+=item B<--command>
+
+Command to get information (Default: 'powershell.exe').
+Can be changed if you have output in a file. To be used with --no-ps option!!!
+
+=item B<--command-path>
+
+Command path (Default: none).
+
+=item B<--command-options>
+
+Command options (Default: '-InputFormat none -NoLogo -EncodedCommand').
+
+=item B<--ps-exec-only>
+
+Print powershell output.
+
+=item B<--warning-mapi>
+
+Warning threshold
+(If set without value, it's: "!=Success". Need to change if your not US language.
+Regexp can be used)
+
+=item B<--critical-mapi>
+
+Critical threshold
+(If set without value, it's: "!=Success". Need to change if your not US language.
+Regexp can be used)
+
+=item B<--mailbox>
+
+Set the mailbox to check (Required).
+
+=back
+
+=cut
\ No newline at end of file
diff --git a/apps/exchange/2010/local/plugin.pm b/apps/exchange/2010/local/plugin.pm
new file mode 100644
index 000000000..beb839455
--- /dev/null
+++ b/apps/exchange/2010/local/plugin.pm
@@ -0,0 +1,68 @@
+################################################################################
+# Copyright 2005-2014 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package apps::exchange::2010::local::plugin;
+
+use strict;
+use warnings;
+use base qw(centreon::plugins::script_simple);
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    # $options->{options} = options object
+
+    $self->{version} = '0.1';
+    %{$self->{modes}} = (
+                         'activesync-mailbox'   => 'apps::exchange::2010::local::mode::activesyncmailbox',
+                         'databases'            => 'apps::exchange::2010::local::mode::databases',
+                         'imap-mailbox'         => 'apps::exchange::2010::local::mode::imapmailbox',
+                         'mapi-mailbox'         => 'apps::exchange::2010::local::mode::mapimailbox',                         
+                         );
+
+    return $self;
+}
+
+1;
+
+__END__
+
+=head1 PLUGIN DESCRIPTION
+
+Check Windows Exchange 2010 locally.
+!!! Experimental system !!!
+
+=cut
diff --git a/apps/hddtemp/mode/listdrives.pm b/apps/hddtemp/mode/listdrives.pm
index 9527d0928..207dfecc5 100644
--- a/apps/hddtemp/mode/listdrives.pm
+++ b/apps/hddtemp/mode/listdrives.pm
@@ -106,8 +106,11 @@ sub manage_selection {
     while ($line =~ /\|([^|]+)\|([^|]+)\|([^|]+)\|(C|F)\|/g) {
         my ($drive, $serial, $temperature, $unit) = ($1, $2, $3, $4);
                
-        next if (defined($self->{option_results}->{filter_name}) && $self->{option_results}->{filter_name} ne '' &&
-                 $drive !~ /$self->{option_results}->{filter_name}/);
+        if (defined($self->{option_results}->{filter_name}) && $self->{option_results}->{filter_name} ne '' &&
+            $drive !~ /$self->{option_results}->{filter_name}/) {
+            $self->{output}->output_add(long_msg => "Skipping drive '" . $drive . "': no matching filter name");
+            next;
+        }
 
         $self->{result}->{$drive} = {serial => $serial, temperature => $temperature, unit => $unit};
     }
@@ -117,17 +120,13 @@ sub run {
     my ($self, %options) = @_;
     
     $self->manage_selection();
-
-    my $drive_display = '';
-    my $drive_display_append = '';
     foreach my $name (sort(keys %{$self->{result}})) {
-        $drive_display .= $drive_display_append . 'name = ' . $name . ' [temperature = ' . $self->{result}->{$name}->{temperature} . $self->{result}->{$name}->{unit} . ']';
-        $drive_display_append = ', ';
+        $self->{output}->output_add(long_msg => "'" . $name . "' [temperature = " . $self->{result}->{$name}->{temperature} . $self->{result}->{$name}->{unit} . ']');
     }
     
     $self->{output}->output_add(severity => 'OK',
-                                short_msg => 'List Drives: ' . $drive_display);
-    $self->{output}->display(nolabel => 1);
+                                short_msg => 'List Drives:');
+    $self->{output}->display(nolabel => 1, force_ignore_perfdata => 1, force_long_output => 1);
     $self->{output}->exit();
 }
 
diff --git a/apps/iis/local/mode/listapplicationpools.pm b/apps/iis/local/mode/listapplicationpools.pm
index 2e536b0f0..e681de2fd 100644
--- a/apps/iis/local/mode/listapplicationpools.pm
+++ b/apps/iis/local/mode/listapplicationpools.pm
@@ -87,11 +87,18 @@ sub manage_selection {
         my $state = $obj->GetState();
 		
         if (defined($self->{option_results}->{filter_state}) && $state_map{$state} !~ /$self->{option_results}->{filter_state}/) {
+            $self->{output}->output_add(long_msg => "Skipping application pool '" . $name . "': no matching filter state");
             next;
         }
 		
-        next if (defined($self->{option_results}->{name}) && !defined($self->{option_results}->{use_regexp}) && $name ne $self->{option_results}->{name});
-        next if (defined($self->{option_results}->{name}) && defined($self->{option_results}->{use_regexp}) && $name !~ /$self->{option_results}->{name}/);
+        if (defined($self->{option_results}->{name}) && !defined($self->{option_results}->{use_regexp}) && $name ne $self->{option_results}->{name}) {
+            $self->{output}->output_add(long_msg => "Skipping application pool '" . $name . "': no matching filter name");
+            next;
+        }
+        if (defined($self->{option_results}->{name}) && defined($self->{option_results}->{use_regexp}) && $name !~ /$self->{option_results}->{name}/) {
+            $self->{output}->output_add(long_msg => "Skipping application pool '" . $name . "': no matching filter name (regexp)");
+            next;
+        }
 
         $self->{result}->{$name} = {AutoStart => $auto_start, State => $state};	
     }
@@ -101,19 +108,15 @@ sub run {
     my ($self, %options) = @_;
 	
     $self->manage_selection();
-    my $pools_display = '';
-    my $pools_display_append = '';
     foreach my $name (sort(keys %{$self->{result}})) {
-        $pools_display .= $pools_display_append . 'name = ' . $name  . 
-                                ' [AutoStart = ' . $self->{result}->{$name}->{AutoStart} . ', ' . 
-                                 'State = ' . $state_map{$self->{result}->{$name}->{State}} .
-                                ']';
-        $pools_display_append = ', ';
+        $self->{output}->output_add(long_msg => "'" . $name . "' [AutoStart = " . $self->{result}->{$name}->{AutoStart} . '] [' . 
+                                                'State = ' . $state_map{$self->{result}->{$name}->{State}} .
+                                                ']');
     }
     
     $self->{output}->output_add(severity => 'OK',
-                                short_msg => 'List application pools: ' . $pools_display);
-    $self->{output}->display(nolabel => 1);
+                                short_msg => 'List application pools:');
+    $self->{output}->display(nolabel => 1, force_ignore_perfdata => 1, force_long_output => 1);
     $self->{output}->exit();
 }
 
diff --git a/apps/iis/local/mode/listsites.pm b/apps/iis/local/mode/listsites.pm
index 0749d9476..69b7bf72c 100644
--- a/apps/iis/local/mode/listsites.pm
+++ b/apps/iis/local/mode/listsites.pm
@@ -87,11 +87,18 @@ sub manage_selection {
         my $state = $obj->GetState();
 		
         if (defined($self->{option_results}->{filter_state}) && $state_map{$state} !~ /$self->{option_results}->{filter_state}/) {
+            $self->{output}->output_add(long_msg => "Skipping site '" . $name . "': no matching filter state");
             next;
         }
 		
-        next if (defined($self->{option_results}->{name}) && !defined($self->{option_results}->{use_regexp}) && $name ne $self->{option_results}->{name});
-        next if (defined($self->{option_results}->{name}) && defined($self->{option_results}->{use_regexp}) && $name !~ /$self->{option_results}->{name}/);
+        if (defined($self->{option_results}->{name}) && !defined($self->{option_results}->{use_regexp}) && $name ne $self->{option_results}->{name}) {
+            $self->{output}->output_add(long_msg => "Skipping site '" . $name . "': no matching filter name");
+            next;
+        }
+        if (defined($self->{option_results}->{name}) && defined($self->{option_results}->{use_regexp}) && $name !~ /$self->{option_results}->{name}/) {
+            $self->{output}->output_add(long_msg => "Skipping site '" . $name . "': no matching filter name (regexp)");
+            next;
+        }
 
         $self->{result}->{$name} = {AutoStart => $auto_start, State => $state};	
     }
@@ -101,19 +108,15 @@ sub run {
     my ($self, %options) = @_;
 	
     $self->manage_selection();
-    my $sites_display = '';
-    my $sites_display_append = '';
     foreach my $name (sort(keys %{$self->{result}})) {
-        $sites_display .= $sites_display_append . 'name = ' . $name  . 
-                                ' [AutoStart = ' . $self->{result}->{$name}->{AutoStart} . ', ' . 
-                                 'State = ' . $state_map{$self->{result}->{$name}->{State}} .
-                                ']';
-        $sites_display_append = ', ';
+        $self->{output}->output_add(long_msg => "'" . $name . "' [AutoStart = " . $self->{result}->{$name}->{AutoStart} . '] [' . 
+                                                'State = ' . $state_map{$self->{result}->{$name}->{State}} .
+                                                ']');
     }
     
     $self->{output}->output_add(severity => 'OK',
-                                short_msg => 'List sites: ' . $sites_display);
-    $self->{output}->display(nolabel => 1);
+                                short_msg => 'List sites:');
+    $self->{output}->display(nolabel => 1, force_ignore_perfdata => 1, force_long_output => 1);
     $self->{output}->exit();
 }
 
diff --git a/apps/iis/wsman/mode/listapplicationpools.pm b/apps/iis/wsman/mode/listapplicationpools.pm
index 84a5751ff..03f9ecfe1 100644
--- a/apps/iis/wsman/mode/listapplicationpools.pm
+++ b/apps/iis/wsman/mode/listapplicationpools.pm
@@ -79,6 +79,7 @@ sub manage_selection {
     # AppPoolState -> 1=started, 2=starting, 3 = stopped, 4=stopping
     foreach my $name (sort(keys %{$self->{result}})) {
         if (defined($self->{option_results}->{filter_state}) && $state_map{$self->{result}->{$name}->{AppPoolState}} !~ /$self->{option_results}->{filter_state}/) {
+            $self->{output}->output_add(long_msg => "Skipping application pool '" . $name . "': no matching filter state");
             delete $self->{result}->{$name};
             next;
         }
@@ -89,6 +90,7 @@ sub manage_selection {
         next if (!defined($self->{option_results}->{use_regexp}) && $name eq $self->{option_results}->{name});
         next if (defined($self->{option_results}->{use_regexp}) && $name =~ /$self->{option_results}->{name}/);
         
+        $self->{output}->output_add(long_msg => "Skipping application pool '" . $name . "': no matching filter name");
         delete $self->{result}->{$name};
     }
 }
@@ -99,19 +101,15 @@ sub run {
     $self->{wsman} = $options{wsman};
 
     $self->manage_selection();
-    my $pools_display = '';
-    my $pools_display_append = '';
     foreach my $name (sort(keys %{$self->{result}})) {
-        $pools_display .= $pools_display_append . 'name = ' . $name  . 
-                                ' [AutoStart = ' . $self->{result}->{$name}->{AppPoolAutoStart} . ',' . 
-                                 'State = ' . $state_map{$self->{result}->{$name}->{AppPoolState}} .
-                                ']';
-        $pools_display_append = ', ';
+        $self->{output}->output_add(long_msg => "'" . $name . "' [AutoStart = " . $self->{result}->{$name}->{AppPoolAutoStart} . '] [' . 
+                                    'State = ' . $state_map{$self->{result}->{$name}->{AppPoolState}} .
+                                    ']');
     }
     
     $self->{output}->output_add(severity => 'OK',
-                                short_msg => 'List application pools: ' . $pools_display);
-    $self->{output}->display(nolabel => 1);
+                                short_msg => 'List application pools:');
+    $self->{output}->display(nolabel => 1, force_ignore_perfdata => 1, force_long_output => 1);
     $self->{output}->exit();
 }
 
diff --git a/apps/lmsensors/mode/fan.pm b/apps/lmsensors/mode/fan.pm
new file mode 100644
index 000000000..d096cfa14
--- /dev/null
+++ b/apps/lmsensors/mode/fan.pm
@@ -0,0 +1,195 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Florian Asche 
+#
+####################################################################################
+
+package apps::lmsensors::mode::fan;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+use centreon::plugins::statefile;
+
+my $oid_SensorDesc = '.1.3.6.1.4.1.2021.13.16.3.1.2';  # fan entry description
+my $oid_SensorValue = '.1.3.6.1.4.1.2021.13.16.3.1.3'; # fan entry value (RPM)
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+                                { 
+                                  "warning:s"               => { name => 'warning' },
+                                  "critical:s"              => { name => 'critical' },
+                                  "name"                    => { name => 'use_name' },
+                                  "sensor:s"                => { name => 'sensor' },
+                                  "regexp"                  => { name => 'use_regexp' },
+                                  "regexp-isensitive"       => { name => 'use_regexpi' },
+                                });
+
+    $self->{Sensor_id_selected} = [];
+    
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+
+    if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{option_results}->{warning})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'.");
+       $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'.");
+       $self->{output}->option_exit();
+    }
+
+}
+
+sub run {
+    my ($self, %options) = @_;
+    # $options{snmp} = snmp object
+    $self->{snmp} = $options{snmp};
+    $self->{hostname} = $self->{snmp}->get_hostname();
+    $self->{snmp_port} = $self->{snmp}->get_port();
+
+    $self->manage_selection();
+
+    $self->{snmp}->load(oids => [$oid_SensorDesc, $oid_SensorValue], instances => $self->{Sensor_id_selected});
+    my $SensorValueResult = $self->{snmp}->get_leef(nothing_quit => 1);
+
+    if (!defined($self->{option_results}->{sensor}) || defined($self->{option_results}->{use_regexp})) {
+        $self->{output}->output_add(severity => 'OK',
+                                    short_msg => 'All Fans are ok.');
+    }
+
+    foreach my $SensorId (sort @{$self->{Sensor_id_selected}}) {
+        my $SensorDesc = $SensorValueResult->{$oid_SensorDesc . '.' . $SensorId};
+        my $SensorValue = $SensorValueResult->{$oid_SensorValue . '.' . $SensorId};
+
+        my $exit = $self->{perfdata}->threshold_check(value => $SensorValue, threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
+
+        $self->{output}->output_add(long_msg => sprintf("Sensor '%s' Fan: %s", 
+                                            $SensorDesc, $SensorValue));
+        if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1) || (defined($self->{option_results}->{sensor}) && !defined($self->{option_results}->{use_regexp}))) {
+            $self->{output}->output_add(severity => $exit,
+                                        short_msg => sprintf("Sensor '%s' Fan: %s", 
+                                            $SensorDesc, $SensorValue));
+        }    
+
+        my $label = 'sensor_fan';
+        my $extra_label = '';
+        $extra_label = '_' . $SensorDesc if (!defined($self->{option_results}->{sensor}) || defined($self->{option_results}->{use_regexp}));
+        $self->{output}->perfdata_add(label => $label . $extra_label,
+                                      value => $SensorValue,
+                                      warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
+                                      critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'));
+    }
+
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+sub manage_selection {
+    my ($self, %options) = @_;
+    my $result = $self->{snmp}->get_table(oid => $oid_SensorDesc, nothing_quit => 1);
+
+    foreach my $key ($self->{snmp}->oid_lex_sort(keys %$result)) {
+        next if ($key !~ /\.([0-9]+)$/);
+        my $SensorId = $1;
+        my $SensorDesc = $result->{$key};
+
+        next if (defined($self->{option_results}->{sensor}) && !defined($self->{option_results}->{use_name}) && !defined($self->{option_results}->{use_regexp}) && !defined($self->{option_results}->{use_regexpi})
+            && $SensorId !~ /$self->{option_results}->{sensor}/i);
+        next if (defined($self->{option_results}->{use_name}) && defined($self->{option_results}->{use_regexp}) && defined($self->{option_results}->{use_regexpi}) 
+            && $SensorDesc !~ /$self->{option_results}->{sensor}/i);
+        next if (defined($self->{option_results}->{use_name}) && defined($self->{option_results}->{use_regexp}) && !defined($self->{option_results}->{use_regexpi}) 
+            && $SensorDesc !~ /$self->{option_results}->{sensor}/);
+        next if (defined($self->{option_results}->{use_name}) && !defined($self->{option_results}->{use_regexp}) && !defined($self->{option_results}->{use_regexpi})
+            && $SensorDesc ne $self->{option_results}->{sensor});
+
+
+        push @{$self->{Sensor_id_selected}}, $SensorId;
+}
+
+    if (scalar(@{$self->{Sensor_id_selected}}) <= 0) {
+        if (defined($self->{option_results}->{sensor})) {
+            $self->{output}->add_option_msg(short_msg => "No Sensors found for '" . $self->{option_results}->{sensor} . "'.");
+        } else {
+            $self->{output}->add_option_msg(short_msg => "No Sensors found.");
+        };
+        $self->{output}->option_exit();
+    }
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check LM-Sensors: Fan Sensors
+
+=over 8
+
+=item B<--warning>
+
+Threshold warning (Fan Speed, U/min)
+
+=item B<--critical>
+
+Threshold critical (Fan Speed, U/min)
+
+=item B<--sensor>
+
+Set the Sensor Desc (number expected) ex: 1, 2,... (empty means 'check all sensors').
+
+=item B<--name>
+
+Allows to use Sensor Desc name with option --sensor instead of Sensor Desc oid index.
+
+=item B<--regexp>
+
+Allows to use regexp to filter sensordesc (with option --name).
+
+=item B<--regexp-isensitive>
+
+Allows to use regexp non case-sensitive (with --regexp).
+
+=back
+
+=cut
diff --git a/apps/lmsensors/mode/misc.pm b/apps/lmsensors/mode/misc.pm
new file mode 100644
index 000000000..1fdfb17c5
--- /dev/null
+++ b/apps/lmsensors/mode/misc.pm
@@ -0,0 +1,195 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Florian Asche 
+#
+####################################################################################
+
+package apps::lmsensors::mode::misc;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+use centreon::plugins::statefile;
+
+my $oid_SensorDesc = '.1.3.6.1.4.1.2021.13.16.5.1.2';  # misc entry description
+my $oid_SensorValue = '.1.3.6.1.4.1.2021.13.16.5.1.3'; # misc entry value
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+                                { 
+                                  "warning:s"               => { name => 'warning' },
+                                  "critical:s"              => { name => 'critical' },
+                                  "name"                    => { name => 'use_name' },
+                                  "sensor:s"                => { name => 'sensor' },
+                                  "regexp"                  => { name => 'use_regexp' },
+                                  "regexp-isensitive"       => { name => 'use_regexpi' },
+                                });
+
+    $self->{Sensor_id_selected} = [];
+    
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+
+    if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{option_results}->{warning})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'.");
+       $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'.");
+       $self->{output}->option_exit();
+    }
+
+}
+
+sub run {
+    my ($self, %options) = @_;
+    # $options{snmp} = snmp object
+    $self->{snmp} = $options{snmp};
+    $self->{hostname} = $self->{snmp}->get_hostname();
+    $self->{snmp_port} = $self->{snmp}->get_port();
+
+    $self->manage_selection();
+
+    $self->{snmp}->load(oids => [$oid_SensorDesc, $oid_SensorValue], instances => $self->{Sensor_id_selected});
+    my $SensorValueResult = $self->{snmp}->get_leef(nothing_quit => 1);
+
+    if (!defined($self->{option_results}->{sensor}) || defined($self->{option_results}->{use_regexp})) {
+        $self->{output}->output_add(severity => 'OK',
+                                    short_msg => 'All Sensors are ok.');
+    }
+
+    foreach my $SensorId (sort @{$self->{Sensor_id_selected}}) {
+        my $SensorDesc = $SensorValueResult->{$oid_SensorDesc . '.' . $SensorId};
+        my $SensorValue = $SensorValueResult->{$oid_SensorValue . '.' . $SensorId};
+
+        my $exit = $self->{perfdata}->threshold_check(value => $SensorValue, threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
+
+        $self->{output}->output_add(long_msg => sprintf("Sensor '%s': %s", 
+                                            $SensorDesc, $SensorValue));
+        if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1) || (defined($self->{option_results}->{sensor}) && !defined($self->{option_results}->{use_regexp}))) {
+            $self->{output}->output_add(severity => $exit,
+                                        short_msg => sprintf("Sensor '%s': %s", 
+                                            $SensorDesc, $SensorValue));
+        }    
+
+        my $label = 'sensor_misc';
+        my $extra_label = '';
+        $extra_label = '_' . $SensorDesc if (!defined($self->{option_results}->{sensor}) || defined($self->{option_results}->{use_regexp}));
+        $self->{output}->perfdata_add(label => $label . $extra_label,
+                                      value => $SensorValue,
+                                      warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
+                                      critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'));
+    }
+
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+sub manage_selection {
+    my ($self, %options) = @_;
+    my $result = $self->{snmp}->get_table(oid => $oid_SensorDesc, nothing_quit => 1);
+
+    foreach my $key ($self->{snmp}->oid_lex_sort(keys %$result)) {
+        next if ($key !~ /\.([0-9]+)$/);
+        my $SensorId = $1;
+        my $SensorDesc = $result->{$key};
+
+        next if (defined($self->{option_results}->{sensor}) && !defined($self->{option_results}->{use_name}) && !defined($self->{option_results}->{use_regexp}) && !defined($self->{option_results}->{use_regexpi})
+            && $SensorId !~ /$self->{option_results}->{sensor}/i);
+        next if (defined($self->{option_results}->{use_name}) && defined($self->{option_results}->{use_regexp}) && defined($self->{option_results}->{use_regexpi}) 
+            && $SensorDesc !~ /$self->{option_results}->{sensor}/i);
+        next if (defined($self->{option_results}->{use_name}) && defined($self->{option_results}->{use_regexp}) && !defined($self->{option_results}->{use_regexpi}) 
+            && $SensorDesc !~ /$self->{option_results}->{sensor}/);
+        next if (defined($self->{option_results}->{use_name}) && !defined($self->{option_results}->{use_regexp}) && !defined($self->{option_results}->{use_regexpi})
+            && $SensorDesc ne $self->{option_results}->{sensor});
+
+
+        push @{$self->{Sensor_id_selected}}, $SensorId;
+}
+
+    if (scalar(@{$self->{Sensor_id_selected}}) <= 0) {
+        if (defined($self->{option_results}->{sensor})) {
+            $self->{output}->add_option_msg(short_msg => "No Sensors found for '" . $self->{option_results}->{sensor} . "'.");
+        } else {
+            $self->{output}->add_option_msg(short_msg => "No Sensors found.");
+        };
+        $self->{output}->option_exit();
+    }
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check LM-Sensors: Misc Sensors
+
+=over 8
+
+=item B<--warning>
+
+Threshold warning
+
+=item B<--critical>
+
+Threshold critical
+
+=item B<--sensor>
+
+Set the Sensor Desc (number expected) ex: 1, 2,... (empty means 'check all sensors').
+
+=item B<--name>
+
+Allows to use Sensor Desc name with option --sensor instead of Sensor Desc oid index.
+
+=item B<--regexp>
+
+Allows to use regexp to filter sensordesc (with option --name).
+
+=item B<--regexp-isensitive>
+
+Allows to use regexp non case-sensitive (with --regexp).
+
+=back
+
+=cut
diff --git a/apps/lmsensors/mode/temperature.pm b/apps/lmsensors/mode/temperature.pm
new file mode 100644
index 000000000..ec4785e22
--- /dev/null
+++ b/apps/lmsensors/mode/temperature.pm
@@ -0,0 +1,195 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Florian Asche 
+#
+####################################################################################
+
+package apps::lmsensors::mode::temperature;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+use centreon::plugins::statefile;
+
+my $oid_SensorDesc = '.1.3.6.1.4.1.2021.13.16.2.1.2';  # temperature entry description
+my $oid_SensorValue = '.1.3.6.1.4.1.2021.13.16.2.1.3'; # temperature entry value (RPM)
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+                                { 
+                                  "warning:s"               => { name => 'warning' },
+                                  "critical:s"              => { name => 'critical' },
+                                  "name"                    => { name => 'use_name' },
+                                  "sensor:s"                => { name => 'sensor' },
+                                  "regexp"                  => { name => 'use_regexp' },
+                                  "regexp-isensitive"       => { name => 'use_regexpi' },
+                                });
+
+    $self->{Sensor_id_selected} = [];
+    
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+
+    if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{option_results}->{warning})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'.");
+       $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'.");
+       $self->{output}->option_exit();
+    }
+
+}
+
+sub run {
+    my ($self, %options) = @_;
+    # $options{snmp} = snmp object
+    $self->{snmp} = $options{snmp};
+    $self->{hostname} = $self->{snmp}->get_hostname();
+    $self->{snmp_port} = $self->{snmp}->get_port();
+
+    $self->manage_selection();
+
+    $self->{snmp}->load(oids => [$oid_SensorDesc, $oid_SensorValue], instances => $self->{Sensor_id_selected});
+    my $SensorValueResult = $self->{snmp}->get_leef(nothing_quit => 1);
+
+    if (!defined($self->{option_results}->{sensor}) || defined($self->{option_results}->{use_regexp})) {
+        $self->{output}->output_add(severity => 'OK',
+                                    short_msg => 'All Temperatures are ok.');
+    }
+
+    foreach my $SensorId (sort @{$self->{Sensor_id_selected}}) {
+        my $SensorDesc = $SensorValueResult->{$oid_SensorDesc . '.' . $SensorId};
+        my $SensorValue = $SensorValueResult->{$oid_SensorValue . '.' . $SensorId} / 1000;
+
+        my $exit = $self->{perfdata}->threshold_check(value => $SensorValue, threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
+
+        $self->{output}->output_add(long_msg => sprintf("Sensor '%s' Temperature: %s", 
+                                            $SensorDesc, $SensorValue));
+        if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1) || (defined($self->{option_results}->{sensor}) && !defined($self->{option_results}->{use_regexp}))) {
+            $self->{output}->output_add(severity => $exit,
+                                        short_msg => sprintf("Sensor '%s' Temperature: %s", 
+                                            $SensorDesc, $SensorValue));
+        }    
+
+        my $label = 'sensor_temperature';
+        my $extra_label = '';
+        $extra_label = '_' . $SensorDesc if (!defined($self->{option_results}->{sensor}) || defined($self->{option_results}->{use_regexp}));
+        $self->{output}->perfdata_add(label => $label . $extra_label,
+                                      value => $SensorValue,
+                                      warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
+                                      critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'));
+    }
+
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+sub manage_selection {
+    my ($self, %options) = @_;
+    my $result = $self->{snmp}->get_table(oid => $oid_SensorDesc, nothing_quit => 1);
+
+    foreach my $key ($self->{snmp}->oid_lex_sort(keys %$result)) {
+        next if ($key !~ /\.([0-9]+)$/);
+        my $SensorId = $1;
+        my $SensorDesc = $result->{$key};
+
+        next if (defined($self->{option_results}->{sensor}) && !defined($self->{option_results}->{use_name}) && !defined($self->{option_results}->{use_regexp}) && !defined($self->{option_results}->{use_regexpi})
+            && $SensorId !~ /$self->{option_results}->{sensor}/i);
+        next if (defined($self->{option_results}->{use_name}) && defined($self->{option_results}->{use_regexp}) && defined($self->{option_results}->{use_regexpi}) 
+            && $SensorDesc !~ /$self->{option_results}->{sensor}/i);
+        next if (defined($self->{option_results}->{use_name}) && defined($self->{option_results}->{use_regexp}) && !defined($self->{option_results}->{use_regexpi}) 
+            && $SensorDesc !~ /$self->{option_results}->{sensor}/);
+        next if (defined($self->{option_results}->{use_name}) && !defined($self->{option_results}->{use_regexp}) && !defined($self->{option_results}->{use_regexpi})
+            && $SensorDesc ne $self->{option_results}->{sensor});
+
+
+        push @{$self->{Sensor_id_selected}}, $SensorId;
+}
+
+    if (scalar(@{$self->{Sensor_id_selected}}) <= 0) {
+        if (defined($self->{option_results}->{sensor})) {
+            $self->{output}->add_option_msg(short_msg => "No Sensors found for '" . $self->{option_results}->{sensor} . "'.");
+        } else {
+            $self->{output}->add_option_msg(short_msg => "No Sensors found.");
+        };
+        $self->{output}->option_exit();
+    }
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check LM-Sensors: Temperature Sensors
+
+=over 8
+
+=item B<--warning>
+
+Threshold warning
+
+=item B<--critical>
+
+Threshold critical
+
+=item B<--sensor>
+
+Set the Sensor Desc (number expected) ex: 1, 2,... (empty means 'check all sensors').
+
+=item B<--name>
+
+Allows to use Sensor Desc name with option --sensor instead of Sensor Desc oid index.
+
+=item B<--regexp>
+
+Allows to use regexp to filter sensordesc (with option --name).
+
+=item B<--regexp-isensitive>
+
+Allows to use regexp non case-sensitive (with --regexp).
+
+=back
+
+=cut
diff --git a/apps/lmsensors/mode/voltage.pm b/apps/lmsensors/mode/voltage.pm
new file mode 100644
index 000000000..7b7e589d7
--- /dev/null
+++ b/apps/lmsensors/mode/voltage.pm
@@ -0,0 +1,195 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Florian Asche 
+#
+####################################################################################
+
+package apps::lmsensors::mode::voltage;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+use centreon::plugins::statefile;
+
+my $oid_SensorDesc = '.1.3.6.1.4.1.2021.13.16.4.1.2';  # voltage entry description
+my $oid_SensorValue = '.1.3.6.1.4.1.2021.13.16.4.1.3'; # voltage entry value (mV)
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+                                { 
+                                  "warning:s"               => { name => 'warning' },
+                                  "critical:s"              => { name => 'critical' },
+                                  "name"                    => { name => 'use_name' },
+                                  "sensor:s"                => { name => 'sensor' },
+                                  "regexp"                  => { name => 'use_regexp' },
+                                  "regexp-isensitive"       => { name => 'use_regexpi' },
+                                });
+
+    $self->{Sensor_id_selected} = [];
+    
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+
+    if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{option_results}->{warning})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'.");
+       $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'.");
+       $self->{output}->option_exit();
+    }
+
+}
+
+sub run {
+    my ($self, %options) = @_;
+    # $options{snmp} = snmp object
+    $self->{snmp} = $options{snmp};
+    $self->{hostname} = $self->{snmp}->get_hostname();
+    $self->{snmp_port} = $self->{snmp}->get_port();
+
+    $self->manage_selection();
+
+    $self->{snmp}->load(oids => [$oid_SensorDesc, $oid_SensorValue], instances => $self->{Sensor_id_selected});
+    my $SensorValueResult = $self->{snmp}->get_leef(nothing_quit => 1);
+
+    if (!defined($self->{option_results}->{sensor}) || defined($self->{option_results}->{use_regexp})) {
+        $self->{output}->output_add(severity => 'OK',
+                                    short_msg => 'All Voltages are ok.');
+    }
+
+    foreach my $SensorId (sort @{$self->{Sensor_id_selected}}) {
+        my $SensorDesc = $SensorValueResult->{$oid_SensorDesc . '.' . $SensorId};
+        my $SensorValue = $SensorValueResult->{$oid_SensorValue . '.' . $SensorId} / 1000;
+
+        my $exit = $self->{perfdata}->threshold_check(value => $SensorValue, threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
+
+        $self->{output}->output_add(long_msg => sprintf("Sensor '%s' Volt: %s", 
+                                            $SensorDesc, $SensorValue));
+        if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1) || (defined($self->{option_results}->{sensor}) && !defined($self->{option_results}->{use_regexp}))) {
+            $self->{output}->output_add(severity => $exit,
+                                        short_msg => sprintf("Sensor '%s' Volt: %s", 
+                                            $SensorDesc, $SensorValue));
+        }    
+
+        my $label = 'sensor_voltage';
+        my $extra_label = '';
+        $extra_label = '_' . $SensorDesc if (!defined($self->{option_results}->{sensor}) || defined($self->{option_results}->{use_regexp}));
+        $self->{output}->perfdata_add(label => $label . $extra_label, unit => 'V',
+                                      value => $SensorValue,
+                                      warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
+                                      critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'));
+    }
+
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+sub manage_selection {
+    my ($self, %options) = @_;
+    my $result = $self->{snmp}->get_table(oid => $oid_SensorDesc, nothing_quit => 1);
+
+    foreach my $key ($self->{snmp}->oid_lex_sort(keys %$result)) {
+        next if ($key !~ /\.([0-9]+)$/);
+        my $SensorId = $1;
+        my $SensorDesc = $result->{$key};
+
+        next if (defined($self->{option_results}->{sensor}) && !defined($self->{option_results}->{use_name}) && !defined($self->{option_results}->{use_regexp}) && !defined($self->{option_results}->{use_regexpi})
+            && $SensorId !~ /$self->{option_results}->{sensor}/i);
+        next if (defined($self->{option_results}->{use_name}) && defined($self->{option_results}->{use_regexp}) && defined($self->{option_results}->{use_regexpi}) 
+            && $SensorDesc !~ /$self->{option_results}->{sensor}/i);
+        next if (defined($self->{option_results}->{use_name}) && defined($self->{option_results}->{use_regexp}) && !defined($self->{option_results}->{use_regexpi}) 
+            && $SensorDesc !~ /$self->{option_results}->{sensor}/);
+        next if (defined($self->{option_results}->{use_name}) && !defined($self->{option_results}->{use_regexp}) && !defined($self->{option_results}->{use_regexpi})
+            && $SensorDesc ne $self->{option_results}->{sensor});
+
+
+        push @{$self->{Sensor_id_selected}}, $SensorId;
+}
+
+    if (scalar(@{$self->{Sensor_id_selected}}) <= 0) {
+        if (defined($self->{option_results}->{sensor})) {
+            $self->{output}->add_option_msg(short_msg => "No Sensors found for '" . $self->{option_results}->{sensor} . "'.");
+        } else {
+            $self->{output}->add_option_msg(short_msg => "No Sensors found.");
+        };
+        $self->{output}->option_exit();
+    }
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check LM-Sensors: Voltage Sensors
+
+=over 8
+
+=item B<--warning>
+
+Threshold warning (Volt)
+
+=item B<--critical>
+
+Threshold critical (Volt)
+
+=item B<--sensor>
+
+Set the Sensor Desc (number expected) ex: 1, 2,... (empty means 'check all sensors').
+
+=item B<--name>
+
+Allows to use Sensor Desc name with option --sensor instead of Sensor Desc oid index.
+
+=item B<--regexp>
+
+Allows to use regexp to filter sensordesc (with option --name).
+
+=item B<--regexp-isensitive>
+
+Allows to use regexp non case-sensitive (with --regexp).
+
+=back
+
+=cut
diff --git a/apps/lmsensors/plugin.pm b/apps/lmsensors/plugin.pm
new file mode 100644
index 000000000..b2379a3a0
--- /dev/null
+++ b/apps/lmsensors/plugin.pm
@@ -0,0 +1,67 @@
+###############################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Florian Asche 
+#
+####################################################################################
+
+package apps::lmsensors::plugin;
+
+use strict;
+use warnings;
+use base qw(centreon::plugins::script_snmp);
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    # $options->{options} = options object
+
+	$self->{version} = '0.1';
+	%{$self->{modes}} = (
+			'temperature'           => 'apps::lmsensors::mode::temperature',
+			'fan'                   => 'apps::lmsensors::mode::fan',
+			'voltage'               => 'apps::lmsensors::mode::voltage',
+			'misc'                  => 'apps::lmsensors::mode::misc',
+			);
+
+	return $self;
+}
+
+1;
+
+__END__
+
+=head1 PLUGIN DESCRIPTION
+
+Check with SNMP LM-Sensors Status
+
+=cut
diff --git a/apps/msmq/local/mode/listqueues.pm b/apps/msmq/local/mode/listqueues.pm
index 26ed01190..933c32d98 100644
--- a/apps/msmq/local/mode/listqueues.pm
+++ b/apps/msmq/local/mode/listqueues.pm
@@ -112,19 +112,15 @@ sub run {
     my ($self, %options) = @_;
 	
     $self->manage_selection();
-    my $pools_display = '';
-    my $pools_display_append = '';
     foreach my $name (sort(keys %{$self->{result}})) {
-        $pools_display .= $pools_display_append . 'name = ' . $name  . 
-                                ' [AutoStart = ' . $self->{result}->{$name}->{AutoStart} . ', ' . 
-                                 'State = ' . $state_map{$self->{result}->{$name}->{State}} .
-                                ']';
-        $pools_display_append = ', ';
+        $self->{output}->output_add(long_msg => "'" . $name . "' [AutoStart = " . $self->{result}->{$name}->{AutoStart} . ', ' . 
+                                                'State = ' . $state_map{$self->{result}->{$name}->{State}} .
+                                                ']');
     }
     
     $self->{output}->output_add(severity => 'OK',
-                                short_msg => 'List application pools: ' . $pools_display);
-    $self->{output}->display(nolabel => 1);
+                                short_msg => 'List application pools:');
+    $self->{output}->display(nolabel => 1, force_ignore_perfdata => 1, force_long_output => 1);
     $self->{output}->exit();
 }
 
diff --git a/apps/msmq/local/plugin.pm b/apps/msmq/local/plugin.pm
index 7d9b19ee0..bcaf25641 100644
--- a/apps/msmq/local/plugin.pm
+++ b/apps/msmq/local/plugin.pm
@@ -60,5 +60,6 @@ __END__
 =head1 PLUGIN DESCRIPTION
 
 Check Windows Microsoft Message Queuing locally.
+!!! Don't use it. Work on it (try to understand MSMQ :) !!!
 
 =cut
diff --git a/apps/nginx/serverstatus/mode/connections.pm b/apps/nginx/serverstatus/mode/connections.pm
new file mode 100644
index 000000000..b3b289430
--- /dev/null
+++ b/apps/nginx/serverstatus/mode/connections.pm
@@ -0,0 +1,191 @@
+###############################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an timeelapsedutable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting timeelapsedutable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Author : Simon BOMM 
+#
+# Based on De Bodt Lieven plugin
+####################################################################################
+
+package apps::nginx::serverstatus::mode::connections;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+use centreon::plugins::httplib;
+
+my $maps = [
+    { counter => 'active', output => 'Active connections %d', match => 'Active connections:\s*(\d+)' },
+    { counter => 'reading', output => 'Reading connections %d', match => 'Reading:\s*(\d+)' }, 
+    { counter => 'writing', output => 'Writing connections %d', match => 'Writing:\s*(\d+)' },
+    { counter => 'waiting', output => 'Waiting connections %d', match => 'Waiting:\s*(\d+)' },
+];
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+            {
+            "hostname:s"    => { name => 'hostname' },
+            "port:s"        => { name => 'port', },
+            "proto:s"       => { name => 'proto', default => "http" },
+            "urlpath:s"     => { name => 'url_path', default => "/nginx_status" },
+            "credentials"   => { name => 'credentials' },
+            "username:s"    => { name => 'username' },
+            "password:s"    => { name => 'password' },
+            "proxyurl:s"    => { name => 'proxyurl' },
+            "timeout:s"     => { name => 'timeout', default => '3' },
+            });
+    foreach (@{$maps}) {
+        $options{options}->add_options(arguments => {
+                                                    'warning-' . $_->{counter} . ':s'    => { name => 'warning_' . $_->{counter} },
+                                                    'critical-' . $_->{counter} . ':s'    => { name => 'critical_' . $_->{counter} },
+                                                    });
+    }
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+
+    foreach (@{$maps}) {
+        if (($self->{perfdata}->threshold_validate(label => 'warning-' . $_->{counter}, value => $self->{option_results}->{'warning_' . $_->{counter}})) == 0) {
+            $self->{output}->add_option_msg(short_msg => "Wrong warning-" . $_->{counter} . " threshold '" . $self->{option_results}->{'warning_' . $_->{counter}} . "'.");
+            $self->{output}->option_exit();
+        }
+        if (($self->{perfdata}->threshold_validate(label => 'critical-' . $_->{counter}, value => $self->{option_results}->{'critical_' . $_->{counter}})) == 0) {
+            $self->{output}->add_option_msg(short_msg => "Wrong critical-" . $_->{counter} . " threshold '" . $self->{option_results}->{'critical_' . $_->{counter}} . "'.");
+            $self->{output}->option_exit();
+        }
+    }
+    if (($self->{option_results}->{proto} ne 'http') && ($self->{option_results}->{proto} ne 'https')) {
+        $self->{output}->add_option_msg(short_msg => "Unsupported protocol specified '" . $self->{option_results}->{proto} . "'.");
+        $self->{output}->option_exit();
+    }
+    if (!defined($self->{option_results}->{hostname})) {
+        $self->{output}->add_option_msg(short_msg => "Please set the hostname option");
+        $self->{output}->option_exit();
+    }
+    if ((defined($self->{option_results}->{credentials})) && (!defined($self->{option_results}->{username}) || !defined($self->{option_results}->{password}))) {
+        $self->{output}->add_option_msg(short_msg => "You need to set --username= and --password= options when --credentials is used");
+        $self->{output}->option_exit();
+    }
+
+}
+
+sub run {
+    my ($self, %options) = @_;
+        
+    my $webcontent = centreon::plugins::httplib::connect($self);
+    foreach (@{$maps}) {
+        if ($webcontent !~ /$_->{match}/msi) {
+            $self->{output}->output_add(severity => 'UNKNOWN',
+                                        short_msg => "Cannot find " . $_->{counter} . " connections.");
+            next;
+        }
+        my $value = $1;
+        my $exit = $self->{perfdata}->threshold_check(value => $value, threshold => [ { label => 'critical-' . $_->{counter}, 'exit_litteral' => 'critical' }, { label => 'warning-' . $_->{counter}, 'exit_litteral' => 'warning' }]);
+ 
+        $self->{output}->output_add(severity => $exit,
+                                    short_msg => sprintf($_->{output}, $value));
+
+        $self->{output}->perfdata_add(label => $_->{counter},
+                                      value => $value,
+                                      warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-' . $_->{counter}),
+                                      critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical-' . $_->{counter}),
+                                      min => 0);
+    }
+
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check current connections: active, reading, writing, waiting.
+
+=over 8
+
+=item B<--hostname>
+
+IP Addr/FQDN of the webserver host
+
+=item B<--port>
+
+Port used by Apache
+
+=item B<--proxyurl>
+
+Proxy URL if any
+
+=item B<--proto>
+
+Protocol to use http or https, http is default
+
+=item B<--urlpath>
+
+Set path to get server-status page in auto mode (Default: '/nginx_status')
+
+=item B<--credentials>
+
+Specify this option if you access server-status page over basic authentification
+
+=item B<--username>
+
+Specify username for basic authentification (Mandatory if --credentials is specidied)
+
+=item B<--password>
+
+Specify password for basic authentification (Mandatory if --credentials is specidied)
+
+=item B<--timeout>
+
+Threshold for HTTP timeout
+
+=item B<--warning-*>
+
+Warning Threshold. Can be: 'active', 'waiting', 'writing', 'reading'.
+
+=item B<--critical-*>
+
+Critical Threshold. Can be: 'active', 'waiting', 'writing', 'reading'.
+
+=back
+
+=cut
\ No newline at end of file
diff --git a/apps/nginx/serverstatus/mode/requests.pm b/apps/nginx/serverstatus/mode/requests.pm
new file mode 100644
index 000000000..b24c8cbb1
--- /dev/null
+++ b/apps/nginx/serverstatus/mode/requests.pm
@@ -0,0 +1,236 @@
+###############################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an timeelapsedutable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting timeelapsedutable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Author : Simon BOMM 
+#
+# Based on De Bodt Lieven plugin
+####################################################################################
+
+package apps::nginx::serverstatus::mode::requests;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+use centreon::plugins::httplib;
+use centreon::plugins::statefile;
+
+my $maps = [
+    { counter => 'accepts', output => 'Connections accepted per seconds %.2f', match => 'server accepts handled requests.*?(\d+)' },
+    { counter => 'handled', output => 'Connections handled per serconds %.2f', match => 'server accepts handled requests.*?\d+\s+(\d+)' }, 
+    { counter => 'requests', output => 'Requests per seconds %.2f', match => 'server accepts handled requests.*?\d+\s+\d+\s+(\d+)' },
+];
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+            {
+            "hostname:s"        => { name => 'hostname' },
+            "port:s"            => { name => 'port', },
+            "proto:s"           => { name => 'proto', default => "http" },
+            "urlpath:s"         => { name => 'url_path', default => "/nginx_status" },
+            "credentials"       => { name => 'credentials' },
+            "username:s"        => { name => 'username' },
+            "password:s"        => { name => 'password' },
+            "proxyurl:s"        => { name => 'proxyurl' },
+            "timeout:s"         => { name => 'timeout', default => '3' },
+            });
+    foreach (@{$maps}) {
+        $options{options}->add_options(arguments => {
+                                                    'warning-' . $_->{counter} . ':s'    => { name => 'warning_' . $_->{counter} },
+                                                    'critical-' . $_->{counter} . ':s'    => { name => 'critical_' . $_->{counter} },
+                                                    });
+    }
+    $self->{statefile_value} = centreon::plugins::statefile->new(%options);
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+
+    foreach (@{$maps}) {
+        if (($self->{perfdata}->threshold_validate(label => 'warning-' . $_->{counter}, value => $self->{option_results}->{'warning_' . $_->{counter}})) == 0) {
+            $self->{output}->add_option_msg(short_msg => "Wrong warning-" . $_->{counter} . " threshold '" . $self->{option_results}->{'warning_' . $_->{counter}} . "'.");
+            $self->{output}->option_exit();
+        }
+        if (($self->{perfdata}->threshold_validate(label => 'critical-' . $_->{counter}, value => $self->{option_results}->{'critical_' . $_->{counter}})) == 0) {
+            $self->{output}->add_option_msg(short_msg => "Wrong critical-" . $_->{counter} . " threshold '" . $self->{option_results}->{'critical_' . $_->{counter}} . "'.");
+            $self->{output}->option_exit();
+        }
+    }
+    if (!defined($self->{option_results}->{hostname})) {
+        $self->{output}->add_option_msg(short_msg => "Please set the hostname option");
+        $self->{output}->option_exit();
+    }
+    if ((defined($self->{option_results}->{credentials})) && (!defined($self->{option_results}->{username}) || !defined($self->{option_results}->{password}))) {
+        $self->{output}->add_option_msg(short_msg => "You need to set --username= and --password= options when --credentials is used");
+        $self->{output}->option_exit();
+    }
+    
+    $self->{statefile_value}->check_options(%options);
+}
+
+sub run {
+    my ($self, %options) = @_;
+
+    my $webcontent = centreon::plugins::httplib::connect($self);
+    my ($buffer_creation, $exit) = (0, 0);
+    my $new_datas = {};
+    my $old_datas = {};
+    
+    $self->{statefile_value}->read(statefile => 'nginx_' . $self->{option_results}->{hostname}  . '_' . centreon::plugins::httplib::get_port($self) . '_' . $self->{mode});
+    $old_datas->{timestamp} = $self->{statefile_value}->get(name => 'timestamp');
+    $new_datas->{timestamp} = time();
+    foreach (@{$maps}) {
+        if ($webcontent !~ /$_->{match}/msi) {
+            $self->{output}->output_add(severity => 'UNKNOWN',
+                                        short_msg => "Cannot find " . $_->{counter} . " information.");
+            next;
+        }
+
+        $new_datas->{$_->{counter}} = $1;
+        my $tmp_value = $self->{statefile_value}->get(name => $_->{counter});
+        if (!defined($tmp_value)) {
+            $buffer_creation = 1;
+            next;
+        }
+        if ($new_datas->{$_->{counter}} < $tmp_value) {
+            $buffer_creation = 1;
+            next;
+        }
+        
+        $exit = 1;
+        $old_datas->{$_->{counter}} = $tmp_value;
+    }
+    
+    $self->{statefile_value}->write(data => $new_datas);
+    if ($buffer_creation == 1) {
+        $self->{output}->output_add(severity => 'OK',
+                                    short_msg => "Buffer creation...");
+        if ($exit == 0) {
+            $self->{output}->display();
+            $self->{output}->exit();
+        }
+    }
+    
+    foreach (@{$maps}) {
+        # In buffer creation.
+        next if (!defined($old_datas->{$_->{counter}}));
+        if ($new_datas->{$_->{counter}} - $old_datas->{$_->{counter}} == 0) {
+            $self->{output}->output_add(severity => 'OK',
+                                        short_msg => "Counter '" . $_->{counter} . "' not moved. Have to wait.");
+            next;
+        }
+        
+        my $delta_time = $new_datas->{timestamp} - $old_datas->{timestamp};
+        $delta_time = 1 if ($delta_time <= 0);
+        
+        my $value = ($new_datas->{$_->{counter}} - $old_datas->{$_->{counter}}) / $delta_time;
+        my $exit = $self->{perfdata}->threshold_check(value => $value, threshold => [ { label => 'critical-' . $_->{counter}, 'exit_litteral' => 'critical' }, { label => 'warning-' . $_->{counter}, 'exit_litteral' => 'warning' }]);
+ 
+        $self->{output}->output_add(severity => $exit,
+                                    short_msg => sprintf($_->{output}, $value));
+
+        $self->{output}->perfdata_add(label => $_->{counter},
+                                      value => sprintf('%.2f', $value),
+                                      warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-' . $_->{counter}),
+                                      critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical-' . $_->{counter}),
+                                      min => 0);
+        
+    }
+
+    $self->{output}->display();
+    $self->{output}->exit();
+
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check Nginx Request statistics: number of accepted connections per seconds, number of handled connections per seconds, number of requests per seconds.
+
+=over 8
+
+=item B<--hostname>
+
+IP Addr/FQDN of the webserver host
+
+=item B<--port>
+
+Port used by Apache
+
+=item B<--proxyurl>
+
+Proxy URL if any
+
+=item B<--proto>
+
+Specify https if needed
+
+=item B<--urlpath>
+
+Set path to get server-status page in auto mode (Default: '/nginx_status')
+
+=item B<--credentials>
+
+Specify this option if you access server-status page over basic authentification
+
+=item B<--username>
+
+Specify username for basic authentification (Mandatory if --credentials is specidied)
+
+=item B<--password>
+
+Specify password for basic authentification (Mandatory if --credentials is specidied)
+
+=item B<--timeout>
+
+Threshold for HTTP timeout
+
+=item B<--warning-*>
+
+Warning Threshold. Can be: 'accepts', 'handled', 'requests'.
+
+=item B<--critical-*>
+
+Critical Threshold. Can be: 'accepts', 'handled', 'requests'.
+
+=back
+
+=cut
diff --git a/apps/nginx/serverstatus/mode/responsetime.pm b/apps/nginx/serverstatus/mode/responsetime.pm
new file mode 100644
index 000000000..de6ef661e
--- /dev/null
+++ b/apps/nginx/serverstatus/mode/responsetime.pm
@@ -0,0 +1,175 @@
+###############################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an timeelapsedutable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting timeelapsedutable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Author : Simon BOMM 
+#
+# Based on De Bodt Lieven plugin
+####################################################################################
+
+package apps::nginx::serverstatus::mode::responsetime;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+use Time::HiRes qw(gettimeofday tv_interval);
+use centreon::plugins::httplib;
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+         {
+         "hostname:s"   => { name => 'hostname' },
+         "port:s"       => { name => 'port', },
+         "proto:s"      => { name => 'proto', default => "http" },
+         "urlpath:s"    => { name => 'url_path', default => "/nginx_status" },
+         "credentials"  => { name => 'credentials' },
+         "username:s"   => { name => 'username' },
+         "password:s"   => { name => 'password' },
+         "proxyurl:s"   => { name => 'proxyurl' },
+         "warning:s"    => { name => 'warning' },
+         "critical:s"   => { name => 'critical' },
+         "timeout:s"    => { name => 'timeout', default => '3' },
+         });
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+
+    if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{option_results}->{warning})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'.");
+        $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'.");
+        $self->{output}->option_exit();
+    }
+
+    if (($self->{option_results}->{proto} ne 'http') && ($self->{option_results}->{proto} ne 'https')) {
+        $self->{output}->add_option_msg(short_msg => "Unsupported protocol specified '" . $self->{option_results}->{proto} . "'.");
+        $self->{output}->option_exit();
+    }
+
+    if (!defined($self->{option_results}->{hostname})) {
+        $self->{output}->add_option_msg(short_msg => "Please set the hostname option");
+        $self->{output}->option_exit();
+    }
+    if ((defined($self->{option_results}->{credentials})) && (!defined($self->{option_results}->{username}) || !defined($self->{option_results}->{password}))) {
+        $self->{output}->add_option_msg(short_msg => "You need to set --username= and --password= options when --credentials is used");
+        $self->{output}->option_exit();
+    }
+}
+
+sub run {
+    my ($self, %options) = @_;
+    
+    my $timing0 = [gettimeofday];
+    
+    my $webcontent = centreon::plugins::httplib::connect($self, connection_exit => 'critical');    
+
+    my $timeelapsed = tv_interval ($timing0, [gettimeofday]);
+    
+    my $exit = $self->{perfdata}->threshold_check(value => $timeelapsed,
+                                                  threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
+    $self->{output}->output_add(severity => $exit,
+                                short_msg => sprintf("Response time %fs ", $timeelapsed));
+    $self->{output}->perfdata_add(label => "time",
+                                  value => $timeelapsed,
+                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
+                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'));
+
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check Nginx WebServer statistics informations
+
+=over 8
+
+=item B<--hostname>
+
+IP Addr/FQDN of the webserver host
+
+=item B<--port>
+
+Port used by Apache
+
+=item B<--proto>
+
+Specify https if needed
+
+=item B<--urlpath>
+
+Set path to get server-status page in auto mode (Default: '/nginx_status')
+
+=item B<--credentials>
+
+Specify this option if you access server-status page over basic authentification
+
+=item B<--username>
+
+Specify username for basic authentification (Mandatory if --credentials is specidied)
+
+=item B<--password>
+
+Specify password for basic authentification (Mandatory if --credentials is specidied)
+
+=item B<--proxyurl>
+
+Proxy URL if any
+
+=item B<--timeout>
+
+Threshold for HTTP timeout
+
+=item B<--warning>
+
+Threshold warning in seconds (nginx_status page response time)
+
+=item B<--critical>
+
+Threshold critical in seconds (nginx_status page response time)
+
+=back
+
+=cut
diff --git a/apps/nginx/serverstatus/plugin.pm b/apps/nginx/serverstatus/plugin.pm
new file mode 100644
index 000000000..03f804a7c
--- /dev/null
+++ b/apps/nginx/serverstatus/plugin.pm
@@ -0,0 +1,66 @@
+###############################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package apps::nginx::serverstatus::plugin;
+
+use strict;
+use warnings;
+use base qw(centreon::plugins::script_simple);
+
+sub new {
+	my ($class, %options) = @_;
+	my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+	bless $self, $class;
+# $options->{options} = options object
+
+	$self->{version} = '0.1';
+	%{$self->{modes}} = (
+            'connections'   => 'apps::nginx::serverstatus::mode::connections',
+            'responsetime'  => 'apps::nginx::serverstatus::mode::responsetime',
+            'requests'      => 'apps::nginx::serverstatus::mode::requests',
+			);
+
+	return $self;
+}
+
+1;
+
+__END__
+
+=head1 PLUGIN DESCRIPTION
+
+Check Nginx Web Servers through HttpStubStatusModule Module
+
+=cut
diff --git a/apps/pfsense/snmp/mode/blockedpackets.pm b/apps/pfsense/snmp/mode/blockedpackets.pm
new file mode 100644
index 000000000..15d92d0a6
--- /dev/null
+++ b/apps/pfsense/snmp/mode/blockedpackets.pm
@@ -0,0 +1,304 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package apps::pfsense::snmp::mode::blockedpackets;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+use POSIX;
+use centreon::plugins::statefile;
+use Digest::MD5 qw(md5_hex);
+
+my $oid_pfsenseInterfaceName = '.1.3.6.1.4.1.12325.1.200.1.8.2.1.2';
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+                                { 
+                                  "warning-in:s"            => { name => 'warning_in', },
+                                  "warning-out:s"           => { name => 'warning_out', },
+                                  "critical-in:s"           => { name => 'critical_in', },
+                                  "critical-out:s"          => { name => 'critical_out', },
+                                  "name"                    => { name => 'use_name' },
+                                  "interface:s"             => { name => 'interface' },
+                                  "regexp"                  => { name => 'use_regexp' },
+                                  "regexp-isensitive"       => { name => 'use_regexpi' },
+                                });
+
+    $self->{interface_id_selected} = [];
+    $self->{statefile_value} = centreon::plugins::statefile->new(%options);
+
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+
+    if (($self->{perfdata}->threshold_validate(label => 'warning-in', value => $self->{option_results}->{warning_in})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong warning in threshold '" . $self->{option_results}->{warning_in} . "'.");
+       $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'warning-out', value => $self->{option_results}->{warning_out})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong warning out threshold '" . $self->{option_results}->{warning_out} . "'.");
+       $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical-in', value => $self->{option_results}->{critical_in})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong critical in threshold '" . $self->{option_results}->{critical_in} . "'.");
+       $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical-out', value => $self->{option_results}->{critical_out})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong critical out threshold '" . $self->{option_results}->{critical_out} . "'.");
+       $self->{output}->option_exit();
+    }
+
+    $self->{statefile_value}->check_options(%options);
+}
+
+sub run {
+    my ($self, %options) = @_;
+    # $options{snmp} = snmp object
+    $self->{snmp} = $options{snmp};
+    $self->{hostname} = $self->{snmp}->get_hostname();
+    $self->{snmp_port} = $self->{snmp}->get_port();    
+
+    if ($self->{snmp}->is_snmpv1()) {
+        $self->{output}->add_option_msg(short_msg => "Can't check SNMP 64 bits counters with SNMPv1.");
+        $self->{output}->option_exit();
+    }
+
+    $self->manage_selection();
+
+    my $oid_pfsenseBlockedInPackets = '.1.3.6.1.4.1.12325.1.200.1.8.2.1.12';
+    my $oid_pfsenseBlockedOutPackets = '.1.3.6.1.4.1.12325.1.200.1.8.2.1.14';
+    my ($result, $valueIn, $valueOut);
+   
+    my $new_datas = {};
+    $self->{statefile_value}->read(statefile => "pfsense_" . $self->{hostname}  . '_' . $self->{snmp_port} . '_' . $self->{mode} . '_' . (defined($self->{option_results}->{interface}) ? md5_hex($self->{option_results}->{interface}) : md5_hex('all')));
+    
+    $self->{snmp}->load(oids => [$oid_pfsenseBlockedInPackets, $oid_pfsenseBlockedOutPackets],
+                        instances => $self->{interface_id_selected});
+    $result = $self->{snmp}->get_leef();
+
+    $new_datas->{last_timestamp} = time();
+    my $old_timestamp;
+    if (!defined($self->{option_results}->{interface}) || defined($self->{option_results}->{use_regexp})) {
+        $self->{output}->output_add(severity => 'OK',
+                                    short_msg => 'All interfaces are ok.');
+    }
+
+    foreach (sort @{$self->{interface_id_selected}}) {
+        my $display_value = $self->{names}->{$_};
+
+        #################
+        # New values
+        ################# 
+        $new_datas->{'in_blocked_' . $_} = $result->{$oid_pfsenseBlockedInPackets . "." . $_};
+        $new_datas->{'out_blocked_' . $_} = $result->{$oid_pfsenseBlockedOutPackets . "." . $_};
+
+        ################
+        # Old values
+        ################
+        my @getting = ('in_blocked', 'out_blocked');
+        my $old_datas = {};
+        $old_timestamp = $self->{statefile_value}->get(name => 'last_timestamp');
+        foreach my $key (@getting) {
+            $old_datas->{$key} = $self->{statefile_value}->get(name => $key . '_' . $_);
+            if (!defined($old_datas->{$key}) || $new_datas->{$key . '_' . $_} < $old_datas->{$key}) {
+                # We set 0. Has reboot.
+                $old_datas->{$key} = 0;
+            }
+        }
+
+        if (!defined($old_timestamp)) {
+            next;
+        }
+        my $time_delta = $new_datas->{last_timestamp} - $old_timestamp;
+        if ($time_delta <= 0) {
+            # At least one second. two fast calls ;)
+            $time_delta = 1;
+        }
+
+        ###########
+        
+        my $in_blocked_absolute = $new_datas->{'in_blocked_' . $_} - $old_datas->{in_blocked};
+        my $out_blocked_absolute = $new_datas->{'out_blocked_' . $_} - $old_datas->{out_blocked};
+        my $in_blocked_absolute_per_sec = $in_blocked_absolute / $time_delta;
+        my $out_blocked_absolute_per_sec = $out_blocked_absolute / $time_delta;    
+
+        ###############
+        # Manage Output
+        ###############
+
+        my $exit1 = $self->{perfdata}->threshold_check(value => $in_blocked_absolute_per_sec, threshold => [ { label => 'critical-in', 'exit_litteral' => 'critical' }, { label => 'warning-in', exit_litteral => 'warning' } ]);
+        my $exit2 = $self->{perfdata}->threshold_check(value => $out_blocked_absolute_per_sec, threshold => [ { label => 'critical-out', 'exit_litteral' => 'critical' }, { label => 'warning-out', exit_litteral => 'warning' } ]);
+
+        my $exit = $self->{output}->get_most_critical(status => [ $exit1, $exit2 ]);
+        $self->{output}->output_add(long_msg => sprintf("Interface '%s' Packets In Blocked : %.2f /s [%i packets], Out Blocked : %.2f /s [%i packets]", $display_value,
+                                                $in_blocked_absolute_per_sec, $in_blocked_absolute,
+                                                $out_blocked_absolute_per_sec, $out_blocked_absolute));
+
+        if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1) || (defined($self->{option_results}->{interface}) && !defined($self->{option_results}->{use_regexp}))) {
+            $self->{output}->output_add(severity => $exit,
+                                        short_msg => sprintf("Interface '%s' Packets In Blocked : %.2f /s [%i packets], Out Blocked : %.2f /s [%i packets]", $display_value,
+                                                    $in_blocked_absolute_per_sec, $in_blocked_absolute, 
+                                                    $out_blocked_absolute_per_sec, $out_blocked_absolute));
+        }
+
+        my $extra_label = '';
+        $extra_label = '_' . $display_value if (!defined($self->{option_results}->{interface}) || defined($self->{option_results}->{use_regexp}));
+        $self->{output}->perfdata_add(label => 'packets_blocked_in_per_sec' . $extra_label,
+                                      value => sprintf("%.2f", $in_blocked_absolute_per_sec),
+                                      warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-in'),
+                                      critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical-in'),
+                                      min => 0);
+        $self->{output}->perfdata_add(label => 'packets_blocked_out_per_sec' . $extra_label,
+                                      value => sprintf("%.2f", $out_blocked_absolute_per_sec),
+                                      warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-out'),
+                                      critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical-out'),
+                                      min => 0);
+
+    }
+
+    $self->{statefile_value}->write(data => $new_datas);
+    if (!defined($old_timestamp)) {
+        $self->{output}->output_add(severity => 'OK',
+                                    short_msg => "Buffer creation...");
+    }
+
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+sub manage_selection {
+    my ($self, %options) = @_;
+    
+    $all_ids = [];
+    $self->{names} = {};
+    my $result = $self->{snmp}->get_table(oid => $oid_pfsenseInterfaceName, nothing_quit => 1);
+    foreach my $key ($self->{snmp}->oid_lex_sort(keys %$result)) {
+        next if ($key !~ /\.([0-9]+)$/);
+        push @{$all_ids}, $1;
+        $self->{names}->{$1} = $self->{output}->to_utf8($result->{$key});
+    }
+
+    if (!defined($self->{option_results}->{use_name}) && defined($self->{option_results}->{interface})) {
+        # get by ID
+        push @{$self->{interface_id_selected}}, $self->{option_results}->{interface};
+        if (!defined($self->{names}->{$self->{option_results}->{interface}})) {
+            $self->{output}->add_option_msg(short_msg => "No interface found for id '" . $self->{option_results}->{interface} . "'.");
+            $self->{output}->option_exit();
+        }
+    } else {
+        foreach my $i (@{$all_ids}) {
+            my $filter_name = $self->{names}->{$i};
+            next if (!defined($filter_name));
+            if (!defined($self->{option_results}->{interface})) {
+                push @{$self->{interface_id_selected}}, $i;
+                next;
+            }
+            if (defined($self->{option_results}->{use_regexp}) && defined($self->{option_results}->{use_regexpi}) && $filter_name =~ /$self->{option_results}->{interface}/i) {
+                push @{$self->{interface_id_selected}}, $i;
+            }
+            if (defined($self->{option_results}->{use_regexp}) && !defined($self->{option_results}->{use_regexpi}) && $filter_name =~ /$self->{option_results}->{interface}/) {
+                push @{$self->{interface_id_selected}}, $i;
+            }
+            if (!defined($self->{option_results}->{use_regexp}) && !defined($self->{option_results}->{use_regexpi}) && $filter_name eq $self->{option_results}->{interface}) {
+                push @{$self->{interface_id_selected}}, $i;
+            }
+        }
+
+        if (scalar(@{$self->{interface_id_selected}}) <= 0) {
+            if (defined($self->{option_results}->{interface})) {
+                $self->{output}->add_option_msg(short_msg => "No interface found for name '" . $self->{option_results}->{interface} . "' (maybe you should reload cache file).");
+            } else {
+                $self->{output}->add_option_msg(short_msg => "No interface found (maybe you should reload cache file).");
+            }
+            $self->{output}->option_exit();
+        }
+    }
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check pfSense blocked packets.
+
+=over 8
+
+=item B<--warning-in>
+
+Threshold warning for input blocked packets.
+
+=item B<--warning-out>
+
+Threshold warning for output blocked packets.
+
+=item B<--critical-in>
+
+Threshold critical for input blocked packets.
+
+=item B<--critical-out>
+
+Threshold critical for output blocked packets.
+
+=item B<--interface>
+
+Set the interface (number expected) ex: 1, 2,... (empty means 'check all interface').
+
+=item B<--name>
+
+Allows to use interface name with option --interface instead of interface oid index.
+
+=item B<--regexp>
+
+Allows to use regexp to filter interfaces (with option --name).
+
+=item B<--regexp-isensitive>
+
+Allows to use regexp non case-sensitive (with --regexp).
+
+=back
+
+=cut
diff --git a/apps/pfsense/snmp/mode/memorydroppedpackets.pm b/apps/pfsense/snmp/mode/memorydroppedpackets.pm
new file mode 100644
index 000000000..9dd9c1a7b
--- /dev/null
+++ b/apps/pfsense/snmp/mode/memorydroppedpackets.pm
@@ -0,0 +1,146 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package apps::pfsense::snmp::mode::memorydroppedpackets;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+use POSIX;
+use centreon::plugins::statefile;
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+                                { 
+                                  "warning:s"          => { name => 'warning', },
+                                  "critical:s"         => { name => 'critical', },
+                                });
+    $self->{statefile_value} = centreon::plugins::statefile->new(%options);
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+
+    if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{option_results}->{warning})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'.");
+       $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'.");
+       $self->{output}->option_exit();
+    }
+
+    $self->{statefile_value}->check_options(%options);
+}
+
+sub run {
+    my ($self, %options) = @_;
+    # $options{snmp} = snmp object
+    $self->{snmp} = $options{snmp};
+    $self->{hostname} = $self->{snmp}->get_hostname();
+    $self->{snmp_port} = $self->{snmp}->get_port();
+   
+    my $oid_pfsenseMemDropPackets = '.1.3.6.1.4.1.12325.1.200.1.2.6.0'; 
+    my ($result, $value);
+    
+    $result = $self->{snmp}->get_leef(oids => [ $oid_pfsenseMemDropPackets ], nothing_quit => 1);
+    $value = $result->{$oid_pfsenseMemDropPackets};
+    
+    $self->{statefile_value}->read(statefile => 'pfsense_' . $self->{hostname}  . '_' . $self->{snmp_port} . '_' . $self->{mode});
+    my $old_timestamp = $self->{statefile_value}->get(name => 'last_timestamp');
+    my $old_memDropPackets = $self->{statefile_value}->get(name => 'memDropPackets');
+
+    my $new_datas = {};
+    $new_datas->{last_timestamp} = time();
+    $new_datas->{memDropPackets} = $value;
+
+    $self->{statefile_value}->write(data => $new_datas);
+    if (!defined($old_timestamp) || !defined($old_memDropPackets)) {
+        $self->{output}->output_add(severity => 'OK',
+                                    short_msg => "Buffer creation...");
+        $self->{output}->display();
+        $self->{output}->exit();
+    }
+    $old_memDropPackets = 0 if ($old_memDropPackets > $new_datas->{memDropPackets});
+    my $delta_time = $new_datas->{last_timestamp} - $old_timestamp;
+    $delta_time = 1 if ($delta_time == 0);
+
+    my $memDropPacketsPerSec = ($new_datas->{memDropPackets} - $old_memDropPackets) / $delta_time;
+
+    my $exit_code = $self->{perfdata}->threshold_check(value => $memDropPacketsPerSec, 
+                              threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);    
+    $self->{output}->perfdata_add(label => 'dropped_packets_Per_Sec',
+                                  value => sprintf("%.2f", $memDropPacketsPerSec),
+                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
+                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'),
+                                  min => 0);
+
+    $self->{output}->output_add(severity => $exit_code,
+                                short_msg => sprintf("Dropped packets due to memory limitations : %.2f /s", 
+                                    $memDropPacketsPerSec));
+
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check number of packets per second dropped due to memory limitations.
+
+=over 8
+
+=item B<--warning>
+
+Threshold warning for dropped packets in packets per second.
+
+=item B<--critical>
+
+Threshold critical for dropped packets in packets per second.
+
+=back
+
+=cut
diff --git a/apps/pfsense/snmp/mode/runtime.pm b/apps/pfsense/snmp/mode/runtime.pm
new file mode 100644
index 000000000..b221ddb33
--- /dev/null
+++ b/apps/pfsense/snmp/mode/runtime.pm
@@ -0,0 +1,137 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package apps::pfsense::snmp::mode::runtime;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+use POSIX;
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+                                { 
+                                  "warning:s"          => { name => 'warning', },
+                                  "critical:s"         => { name => 'critical', },
+                                  "seconds"            => { name => 'seconds', },
+                                });
+
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+
+    if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{option_results}->{warning})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'.");
+       $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'.");
+       $self->{output}->option_exit();
+    }
+}
+
+sub run {
+    my ($self, %options) = @_;
+    # $options{snmp} = snmp object
+    $self->{snmp} = $options{snmp};
+   
+    my $oid_pfsenseStatus = '.1.3.6.1.4.1.12325.1.200.1.1.1.0'; 
+    my $oid_pfsenseRuntime = '.1.3.6.1.4.1.12325.1.200.1.1.2.0';
+    my ($result, $valueStatus, $valueRuntime);
+    
+    $result = $self->{snmp}->get_leef(oids => [ $oid_pfsenseStatus, $oid_pfsenseRuntime ], nothing_quit => 1);
+    $valueStatus = $result->{$oid_pfsenseStatus};
+    $valueRuntime = $result->{$oid_pfsenseRuntime};
+    
+    if ($valueStatus == 1) {
+        my $exit_code = $self->{perfdata}->threshold_check(value => $valueRuntime, 
+                                                           threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);    
+        $self->{output}->perfdata_add(label => 'runtime',
+                                      value => floor($valueRuntime / 100),
+                                      warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
+                                      critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'),
+                                      min => 0);
+        $self->{output}->output_add(severity => $exit_code,
+                                    short_msg => sprintf("PfSense running since : %s",
+                                                 defined($self->{option_results}->{seconds}) ? floor($valueRuntime / 100) . " seconds" : floor($valueRuntime / 86400 / 100) . " days" ));
+
+    } else {
+        $self->{output}->perfdata_add(label => 'runtime',
+                                      value => 0,
+                                      warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
+                                      critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'),
+                                      min => 0);
+        $self->{output}->output_add(severity => 'critical',
+                                    short_msg => sprintf("PfSense not running."));
+        
+    }
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check pfSense runtime.
+
+=over 8
+
+=item B<--warning>
+
+Threshold warning in seconds.
+
+=item B<--critical>
+
+Threshold critical in seconds.
+
+=item B<--seconds>
+
+Display runtime in seconds.
+
+=back
+
+=cut
diff --git a/apps/pfsense/snmp/plugin.pm b/apps/pfsense/snmp/plugin.pm
new file mode 100644
index 000000000..ecb5d7c1b
--- /dev/null
+++ b/apps/pfsense/snmp/plugin.pm
@@ -0,0 +1,66 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package apps::pfsense::snmp::plugin;
+
+use strict;
+use warnings;
+use base qw(centreon::plugins::script_snmp);
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    # $options->{options} = options object
+
+    $self->{version} = '0.1';
+    %{$self->{modes}} = (
+                         'runtime'     	            => 'apps::pfsense::snmp::mode::runtime',
+                         'memory-dropped-packets'   => 'apps::pfsense::snmp::mode::memorydroppedpackets',
+                         'blocked-packets'          => 'apps::pfsense::snmp::mode::blockedpackets',
+                         );
+
+    return $self;
+}
+
+1;
+
+__END__
+
+=head1 PLUGIN DESCRIPTION
+
+Check pfSense in SNMP.
+
+=cut
diff --git a/apps/protocols/http/mode/expectedcontent.pm b/apps/protocols/http/mode/expectedcontent.pm
new file mode 100644
index 000000000..8d3f58d0b
--- /dev/null
+++ b/apps/protocols/http/mode/expectedcontent.pm
@@ -0,0 +1,189 @@
+###############################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an timeelapsedutable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting timeelapsedutable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Author : Simon BOMM 
+#
+# Based on De Bodt Lieven plugin
+####################################################################################
+
+package apps::protocols::http::mode::expectedcontent;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+use centreon::plugins::httplib;
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+            {
+            "hostname:s"            => { name => 'hostname' },
+            "port:s"                => { name => 'port', },
+            "proto:s"               => { name => 'proto', default => "http" },
+            "urlpath:s"             => { name => 'url_path', default => "/" },
+            "credentials"           => { name => 'credentials' },
+            "ntlm"                  => { name => 'ntlm' },
+            "username:s"            => { name => 'username' },
+            "password:s"            => { name => 'password' },
+            "proxyurl:s"            => { name => 'proxyurl' },
+            "expected-string:s"     => { name => 'expected_string' },
+            "timeout:s"             => { name => 'timeout', default => '3' },
+            });
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+
+    if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{option_results}->{warning})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'.");
+        $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'.");
+        $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'warning-bytes', value => $self->{option_results}->{warning_bytes})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong warning-bytes threshold '" . $self->{option_results}->{warning_bytes} . "'.");
+        $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical-bytes', value => $self->{option_results}->{critical_bytes})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong critical-bytes threshold '" . $self->{option_results}->{critical_bytes} . "'.");
+        $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'warning-access', value => $self->{option_results}->{warning_access})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong warning-access threshold '" . $self->{option_results}->{warning_access} . "'.");
+        $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical-access', value => $self->{option_results}->{critical_access})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong critical-access threshold '" . $self->{option_results}->{critical_access} . "'.");
+        $self->{output}->option_exit();
+    }
+    if (!defined($self->{option_results}->{hostname})) {
+        $self->{output}->add_option_msg(short_msg => "You need to specify hostname.");
+        $self->{output}->option_exit();
+    }
+    if (!defined($self->{option_results}->{expected_string})) {
+        $self->{output}->add_option_msg(short_msg => "You need to specify --expected-string option.");
+        $self->{output}->option_exit();
+    }
+    if ((defined($self->{option_results}->{credentials})) && (!defined($self->{option_results}->{username}) || !defined($self->{option_results}->{password}))) {
+        $self->{output}->add_option_msg(short_msg => "You need to set --username= and --password= options when --credentials is used");
+        $self->{output}->option_exit();
+    }
+    if ((!defined($self->{option_results}->{credentials})) && (defined($self->{option_results}->{ntlm}))) {
+        $self->{output}->add_option_msg(short_msg => "--ntlm option must be used with --credentials option");
+        $self->{output}->option_exit();
+    }
+}
+
+sub run {
+    my ($self, %options) = @_;
+
+    if (!defined($self->{option_results}->{port})) {
+        $self->{option_results}->{port} = centreon::plugins::httplib::get_port($self); 
+    }
+
+    my $webcontent = centreon::plugins::httplib::connect($self);
+    $self->{output}->output_add(long_msg => $webcontent);
+
+    if ($webcontent =~ /$self->{option_results}->{expected_string}/mi) {
+        $self->{output}->output_add(severity => 'OK',
+                                short_msg => sprintf("'%s' is present in content.", $self->{option_results}->{expected_string}));
+        $self->{output}->display();
+        $self->{output}->exit();
+    } else {
+        $self->{output}->output_add(severity => 'Critical',
+                                short_msg => sprintf("'%s' is not present in content.", $self->{option_results}->{expected_string}));
+        $self->{output}->display();
+        $self->{output}->exit();
+    }
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check Webpage content
+
+=over 8
+
+=item B<--hostname>
+
+IP Addr/FQDN of the Webserver host
+
+=item B<--port>
+
+Port used by Webserver
+
+=item B<--proxyurl>
+
+Proxy URL if any
+
+=item B<--proto>
+
+Specify https if needed
+
+=item B<--urlpath>
+
+Set path to get Webpage (Default: '/')
+
+=item B<--credentials>
+
+Specify this option if you access webpage over basic authentification
+
+=item B<--ntlm>
+
+Specify this option if you access webpage over ntlm authentification (Use with --credentials option)
+
+=item B<--username>
+
+Specify username for basic authentification (Mandatory if --credentials is specidied)
+
+=item B<--password>
+
+Specify password for basic authentification (Mandatory if --credentials is specidied)
+
+=item B<--timeout>
+
+Threshold for HTTP timeout
+
+=back
+
+=cut
diff --git a/apps/protocols/http/mode/responsetime.pm b/apps/protocols/http/mode/responsetime.pm
new file mode 100644
index 000000000..b4455f40c
--- /dev/null
+++ b/apps/protocols/http/mode/responsetime.pm
@@ -0,0 +1,186 @@
+###############################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an timeelapsedutable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting timeelapsedutable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Author : Simon BOMM 
+#
+# Based on De Bodt Lieven plugin
+####################################################################################
+
+package apps::protocols::http::mode::responsetime;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+use Time::HiRes qw(gettimeofday tv_interval);
+use centreon::plugins::httplib;
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+         {
+         "hostname:s"   => { name => 'hostname' },
+         "port:s"       => { name => 'port', },
+         "proto:s"      => { name => 'proto', default => "http" },
+         "urlpath:s"    => { name => 'url_path', default => "/" },
+         "credentials"  => { name => 'credentials' },
+         "ntlm"         => { name => 'ntlm' },
+         "username:s"   => { name => 'username' },
+         "password:s"   => { name => 'password' },
+         "proxyurl:s"   => { name => 'proxyurl' },
+         "warning:s"    => { name => 'warning' },
+         "critical:s"   => { name => 'critical' },
+         "timeout:s"    => { name => 'timeout', default => '3' },
+         });
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+
+    if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{option_results}->{warning})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'.");
+        $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'.");
+        $self->{output}->option_exit();
+    }
+
+    if (($self->{option_results}->{proto} ne 'http') && ($self->{option_results}->{proto} ne 'https')) {
+        $self->{output}->add_option_msg(short_msg => "Unsupported protocol specified '" . $self->{option_results}->{proto} . "'.");
+        $self->{output}->option_exit();
+    }
+
+    if (!defined($self->{option_results}->{hostname})) {
+        $self->{output}->add_option_msg(short_msg => "Please set the hostname option");
+        $self->{output}->option_exit();
+    }
+    if ((defined($self->{option_results}->{credentials})) && (!defined($self->{option_results}->{username}) || !defined($self->{option_results}->{password}))) {
+        $self->{output}->add_option_msg(short_msg => "You need to set --username= and --password= options when --credentials is used");
+        $self->{output}->option_exit();
+    }
+}
+
+sub run {
+    my ($self, %options) = @_;
+
+    if (!defined($self->{option_results}->{port})) {
+        $self->{option_results}->{port} = centreon::plugins::httplib::get_port($self);
+    }
+    
+    my $timing0 = [gettimeofday];
+    
+    my $webcontent = centreon::plugins::httplib::connect($self, connection_exit => 'critical');    
+
+    my $timeelapsed = tv_interval ($timing0, [gettimeofday]);
+
+    $self->{output}->output_add(long_msg => $webcontent);
+    
+    my $exit = $self->{perfdata}->threshold_check(value => $timeelapsed,
+                                                  threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
+    $self->{output}->output_add(severity => $exit,
+                                short_msg => sprintf("Response time %.3fs", $timeelapsed));
+    $self->{output}->perfdata_add(label => "time",
+                                  value => sprintf('%.3f', $timeelapsed),
+                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
+                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'));
+
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check Webpage Time Response
+
+=over 8
+
+=item B<--hostname>
+
+IP Addr/FQDN of the webserver host
+
+=item B<--port>
+
+Port used by Webserver
+
+=item B<--proto>
+
+Specify https if needed
+
+=item B<--urlpath>
+
+Set path to get webpage (Default: '/')
+
+=item B<--credentials>
+
+Specify this option if you access webpage over basic authentification
+
+=item B<--ntlm>
+
+Specify this option if you access webpage over ntlm authentification (Use with --credentials option)
+
+=item B<--username>
+
+Specify username for basic authentification (Mandatory if --credentials is specidied)
+
+=item B<--password>
+
+Specify password for basic authentification (Mandatory if --credentials is specidied)
+
+=item B<--proxyurl>
+
+Proxy URL if any
+
+=item B<--timeout>
+
+Threshold for HTTP timeout
+
+=item B<--warning>
+
+Threshold warning in seconds (Webpage response time)
+
+=item B<--critical>
+
+Threshold critical in seconds (Webpage response time)
+
+=back
+
+=cut
diff --git a/apps/protocols/http/plugin.pm b/apps/protocols/http/plugin.pm
new file mode 100644
index 000000000..cf3e93e21
--- /dev/null
+++ b/apps/protocols/http/plugin.pm
@@ -0,0 +1,65 @@
+###############################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package apps::protocols::http::plugin;
+
+use strict;
+use warnings;
+use base qw(centreon::plugins::script_simple);
+
+sub new {
+	my ($class, %options) = @_;
+	my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+	bless $self, $class;
+# $options->{options} = options object
+
+	$self->{version} = '0.1';
+	%{$self->{modes}} = (
+            'response-time'     => 'apps::protocols::http::mode::responsetime',
+            'expected-content'  => 'apps::protocols::http::mode::expectedcontent',
+			);
+
+	return $self;
+}
+
+1;
+
+__END__
+
+=head1 PLUGIN DESCRIPTION
+
+Check HTTP or HTTPS webpage.
+
+=cut
diff --git a/apps/protocols/imap/lib/imap.pm b/apps/protocols/imap/lib/imap.pm
new file mode 100644
index 000000000..60702a5d9
--- /dev/null
+++ b/apps/protocols/imap/lib/imap.pm
@@ -0,0 +1,115 @@
+###############################################################################
+# Copyright 2005-2014 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an timeelapsedutable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting timeelapsedutable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Author : Simon BOMM 
+#
+####################################################################################
+
+package apps::protocols::imap::lib::imap;
+
+use strict;
+use warnings;
+use centreon::plugins::misc;
+use Net::IMAP::Simple;
+
+my $imap_handle;
+
+sub quit {
+    $imap_handle->quit;
+}
+
+sub search {
+    my ($self, %options) = @_;
+    
+    if (!defined($imap_handle->select($self->{option_results}->{folder}))) {
+        my $output = $imap_handle->errstr;
+        $output =~ s/\r//g;
+        $self->{output}->output_add(severity => 'UNKNOWN',
+                                    short_msg => 'Folder Select Error: ' . $output);
+        quit();
+        $self->{output}->display();
+        $self->{output}->exit();
+    }
+    
+    my @ids = $imap_handle->search($self->{option_results}->{search});
+    
+    if (defined($self->{option_results}->{delete})) {
+        foreach my $msg_num (@ids) {
+            $imap_handle->delete($msg_num);
+        }
+        $imap_handle->expunge_mailbox();
+    }
+    
+    return scalar(@ids);
+}
+
+sub connect {
+    my ($self, %options) = @_;
+    my %imap_options = ();
+    
+    my $connection_exit = defined($options{connection_exit}) ? $options{connection_exit} : 'unknown';
+    $imap_options{port} = $self->{option_results}->{port} if (defined($self->{option_results}->{port}));
+    $imap_options{use_ssl} = 1 if (defined($self->{option_results}->{use_ssl}));
+    $imap_options{timeout} = $self->{option_results}->{timeout} if (defined($self->{option_results}->{timeout}));
+    
+    if (defined($self->{option_results}->{username}) && $self->{option_results}->{username} ne '' &&
+        !defined($self->{option_results}->{password})) {
+        $self->{output}->add_option_msg(short_msg => "Please set --password option.");
+        $self->{output}->option_exit();
+    }
+    
+    $imap_handle = Net::IMAP::Simple->new($self->{option_results}->{hostname},
+        %imap_options
+    );
+    
+    
+    if (!defined($imap_handle)) {
+        $self->{output}->output_add(severity => $connection_exit,
+                                    short_msg => 'Unable to connect to IMAP: ' . $Net::IMAP::Simple::errstr);
+        $self->{output}->display();
+        $self->{output}->exit();
+    }
+    
+    if (defined($self->{option_results}->{username}) && $self->{option_results}->{username} ne '') {
+        if (!$imap_handle->login($self->{option_results}->{username}, $self->{option_results}->{password})) {
+            # Exchange put '\r'...
+            my $output = $imap_handle->errstr;
+            $output =~ s/\r//g;
+            $self->{output}->output_add(severity => $connection_exit,
+                                        short_msg => 'Login failed: ' . $output);
+            quit();
+            $self->{output}->display();
+            $self->{output}->exit();
+        }
+    }
+}
+
+1;
diff --git a/apps/protocols/imap/mode/login.pm b/apps/protocols/imap/mode/login.pm
new file mode 100644
index 000000000..3349fb19d
--- /dev/null
+++ b/apps/protocols/imap/mode/login.pm
@@ -0,0 +1,152 @@
+###############################################################################
+# Copyright 2005-2014 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an timeelapsedutable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting timeelapsedutable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Author : Quentin Garnier 
+#
+####################################################################################
+
+package apps::protocols::imap::mode::login;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+use Time::HiRes qw(gettimeofday tv_interval);
+use apps::protocols::imap::lib::imap;
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+         {
+         "hostname:s"   => { name => 'hostname' },
+         "port:s"       => { name => 'port', },
+         "ssl"          => { name => 'use_ssl' },
+         "username:s"   => { name => 'username' },
+         "password:s"   => { name => 'password' },
+         "warning:s"    => { name => 'warning' },
+         "critical:s"   => { name => 'critical' },
+         "timeout:s"    => { name => 'timeout', default => '30' },
+         });
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+
+    if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{option_results}->{warning})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'.");
+        $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'.");
+        $self->{output}->option_exit();
+    }
+
+    if (!defined($self->{option_results}->{hostname})) {
+        $self->{output}->add_option_msg(short_msg => "Please set the hostname option");
+        $self->{output}->option_exit();
+    }
+}
+
+sub run {
+    my ($self, %options) = @_;
+    
+    my $timing0 = [gettimeofday];
+    
+    apps::protocols::imap::lib::imap::connect($self, connection_exit => 'critical');  
+    apps::protocols::imap::lib::imap::quit();
+
+    my $timeelapsed = tv_interval ($timing0, [gettimeofday]);
+    
+    my $exit = $self->{perfdata}->threshold_check(value => $timeelapsed,
+                                                  threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
+    $self->{output}->output_add(severity => $exit,
+                                short_msg => sprintf("Response time %.3f ", $timeelapsed));
+    $self->{output}->perfdata_add(label => "time",
+                                  value => sprintf('%.3f', $timeelapsed),
+                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
+                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'));
+
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check Connection (also login) to an IMAP Server.
+
+=over 8
+
+=item B<--hostname>
+
+IP Addr/FQDN of the imap host
+
+=item B<--port>
+
+Port used
+
+=item B<--ssl>
+
+Use SSL connection.
+(no attempt is made to check the certificate validity by default).
+
+=item B<--username>
+
+Specify username for authentification
+
+=item B<--password>
+
+Specify password for authentification
+
+=item B<--timeout>
+
+Connection timeout in seconds (Default: 30)
+
+=item B<--warning>
+
+Threshold warning in seconds
+
+=item B<--critical>
+
+Threshold critical in seconds
+
+=back
+
+=cut
diff --git a/apps/protocols/imap/mode/searchmessage.pm b/apps/protocols/imap/mode/searchmessage.pm
new file mode 100644
index 000000000..5fd8a6e96
--- /dev/null
+++ b/apps/protocols/imap/mode/searchmessage.pm
@@ -0,0 +1,168 @@
+###############################################################################
+# Copyright 2005-2014 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an timeelapsedutable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting timeelapsedutable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Author : Quentin Garnier 
+#
+####################################################################################
+
+package apps::protocols::imap::mode::searchmessage;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+use apps::protocols::imap::lib::imap;
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+         {
+         "hostname:s"   => { name => 'hostname' },
+         "port:s"       => { name => 'port', },
+         "ssl"          => { name => 'use_ssl' },
+         "username:s"   => { name => 'username' },
+         "password:s"   => { name => 'password' },
+         "warning:s"    => { name => 'warning' },
+         "critical:s"   => { name => 'critical' },
+         "timeout:s"    => { name => 'timeout', default => '30' },
+         "search:s"     => { name => 'search' },
+         "delete"       => { name => 'delete' },
+         "folder:s"     => { name => 'folder', default => 'INBOX' },
+         });
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+
+    if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{option_results}->{warning})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'.");
+        $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'.");
+        $self->{output}->option_exit();
+    }
+
+    if (!defined($self->{option_results}->{hostname})) {
+        $self->{output}->add_option_msg(short_msg => "Please set the --hostname option");
+        $self->{output}->option_exit();
+    }
+    if (!defined($self->{option_results}->{search})) {
+        $self->{output}->add_option_msg(short_msg => "Please set the --search option");
+        $self->{output}->option_exit();
+    }
+}
+
+sub run {
+    my ($self, %options) = @_;
+    
+    apps::protocols::imap::lib::imap::connect($self);    
+    my ($num) = apps::protocols::imap::lib::imap::search($self);
+    apps::protocols::imap::lib::imap::quit();
+    
+    my $exit = $self->{perfdata}->threshold_check(value => $num,
+                                                  threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
+    $self->{output}->output_add(severity => $exit,
+                                short_msg => sprintf("%d message found(s)", $num));
+    $self->{output}->perfdata_add(label => "numbers",
+                                  value => $num,
+                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
+                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'));
+
+    
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check messages in a mailbox with IMAP filter.
+
+=over 8
+
+=item B<--hostname>
+
+IP Addr/FQDN of the imap host
+
+=item B<--port>
+
+Port used
+
+=item B<--ssl>
+
+Use SSL connection.
+(no attempt is made to check the certificate validity by default).
+
+=item B<--username>
+
+Specify username for authentification
+
+=item B<--password>
+
+Specify password for authentification
+
+=item B<--timeout>
+
+Connection timeout in seconds (Default: 30)
+
+=item B<--search>
+
+Set the search string (Required)
+
+=item B<--delete>
+
+Delete messages found
+
+=item B<--folder>
+
+Set IMAP folder (Default: 'INBOX')
+
+=item B<--warning>
+
+Threshold warning of number messages found
+
+=item B<--critical>
+
+Threshold critical of number message found
+
+=back
+
+=cut
diff --git a/apps/protocols/imap/plugin.pm b/apps/protocols/imap/plugin.pm
new file mode 100644
index 000000000..c9c378718
--- /dev/null
+++ b/apps/protocols/imap/plugin.pm
@@ -0,0 +1,64 @@
+################################################################################
+# Copyright 2005-2014 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package apps::protocols::imap::plugin;
+
+use strict;
+use warnings;
+use base qw(centreon::plugins::script_simple);
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    # $options->{options} = options object
+
+    $self->{version} = '0.1';
+    %{$self->{modes}} = (
+                        'login'            => 'apps::protocols::imap::mode::login',
+                        'search-message'   => 'apps::protocols::imap::mode::searchmessage',
+                        );
+    return $self;
+}
+
+1;
+
+__END__
+
+=head1 PLUGIN DESCRIPTION
+
+Check an IMAP server.
+
+=cut
diff --git a/apps/tomcat/web/mode/application.pm b/apps/tomcat/web/mode/applications.pm
similarity index 93%
rename from apps/tomcat/web/mode/application.pm
rename to apps/tomcat/web/mode/applications.pm
index 02ba72446..342010a7b 100644
--- a/apps/tomcat/web/mode/application.pm
+++ b/apps/tomcat/web/mode/applications.pm
@@ -35,13 +35,12 @@
 # Based on Apache Mode by Simon BOMM
 ####################################################################################
 
-package apps::tomcat::web::mode::application;
+package apps::tomcat::web::mode::applications;
 
 use base qw(centreon::plugins::mode);
-
 use strict;
 use warnings;
-use apps::tomcat::web::mode::libconnect;
+use centreon::plugins::httplib;
 
 sub new {
     my ($class, %options) = @_;
@@ -52,15 +51,14 @@ sub new {
     $options{options}->add_options(arguments =>
             {
             "hostname:s"            => { name => 'hostname' },
-            "port:s"                => { name => 'port', default => '23002' },
+            "port:s"                => { name => 'port', default => '8080' },
             "proto:s"               => { name => 'proto', default => "http" },
             "credentials"           => { name => 'credentials' },
             "username:s"            => { name => 'username' },
             "password:s"            => { name => 'password' },
             "proxyurl:s"            => { name => 'proxyurl' },
             "timeout:s"             => { name => 'timeout', default => '3' },
-            "path:s"                => { name => 'path', default => '/manager/text/list' },
-            "realm:s"               => { name => 'realm', default => 'Tomcat Manager Application' },
+            "urlpath:s"             => { name => 'url_path', default => '/manager/text/list' },
             "name:s"                => { name => 'name' },
             "regexp"                => { name => 'use_regexp' },
             "regexp-isensitive"     => { name => 'use_regexpi' },
@@ -94,9 +92,9 @@ sub check_options {
 sub manage_selection {
     my ($self, %options) = @_;
 
-    my $webcontent = apps::tomcat::web::mode::libconnect::connect($self);  
+    my $webcontent = centreon::plugins::httplib::connect($self);  
 
-     while ($webcontent =~ m/\/(.*):(.*):(.*):(.*)/g) {      
+     while ($webcontent =~ m/(.*):(.*):(.*):(.*)/g) {      
         my ($context, $state, $sessions, $contextpath) = ($1, $2, $3, $4);
 
         next if (defined($self->{option_results}->{filter_path}) && $self->{option_results}->{filter_path} ne '' &&
@@ -204,17 +202,13 @@ Specify username for basic authentification (Mandatory if --credentials is speci
 
 Specify password for basic authentification (Mandatory if --credentials is specidied)
 
-=item B<--realm>
-
-Credentials Realm (Default: 'Tomcat Manager Application')
-
 =item B<--timeout>
 
 Threshold for HTTP timeout
 
-=item B<--path>
+=item B<--urlpath>
 
-Path to the Tomcat Manager List (Default: '/manager/text/list')
+Path to the Tomcat Manager List (Default: Tomcat 7 '/manager/text/list')
 Tomcat 6: '/manager/list'
 Tomcat 7: '/manager/text/list'
 
diff --git a/apps/tomcat/web/mode/libconnect.pm b/apps/tomcat/web/mode/libconnect.pm
deleted file mode 100644
index 50528ab07..000000000
--- a/apps/tomcat/web/mode/libconnect.pm
+++ /dev/null
@@ -1,86 +0,0 @@
-###############################################################################
-# Copyright 2005-2013 MERETHIS
-# Centreon is developped by : Julien Mathis and Romain Le Merlus under
-# GPL Licence 2.0.
-# 
-# This program is free software; you can redistribute it and/or modify it under 
-# the terms of the GNU General Public License as published by the Free Software 
-# Foundation ; either version 2 of the License.
-# 
-# This program is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
-# PARTICULAR PURPOSE. See the GNU General Public License for more details.
-# 
-# You should have received a copy of the GNU General Public License along with 
-# this program; if not, see .
-# 
-# Linking this program statically or dynamically with other modules is making a 
-# combined work based on this program. Thus, the terms and conditions of the GNU 
-# General Public License cover the whole combination.
-# 
-# As a special exception, the copyright holders of this program give MERETHIS 
-# permission to link this program with independent modules to produce an timeelapsedutable, 
-# regardless of the license terms of these independent modules, and to copy and 
-# distribute the resulting timeelapsedutable under terms of MERETHIS choice, provided that 
-# MERETHIS also meet, for each linked independent module, the terms  and conditions 
-# of the license of that module. An independent module is a module which is not 
-# derived from this program. If you modify this program, you may extend this 
-# exception to your version of the program, but you are not obliged to do so. If you
-# do not wish to do so, delete this exception statement from your version.
-# 
-# For more information : contact@centreon.com
-# Author : Florian Asche 
-#
-# Based on De Bodt Lieven plugin
-# Based on Apache Mode by Simon BOMM
-####################################################################################
-
-package apps::tomcat::web::mode::libconnect;
-
-use strict;
-use warnings;
-use LWP::UserAgent;
-
-sub connect {
-    my ($self, %options) = @_;
-    my $ua = LWP::UserAgent->new( protocols_allowed => ['http','https'], timeout => $self->{option_results}->{timeout});
-    my $connection_exit = defined($options{connection_exit}) ? $options{connection_exit} : 'unknown';
-    
-    my $response;
-    my $content;    
-
-    if (defined $self->{option_results}->{credentials}) {
-        #$ua->credentials($self->{option_results}->{hostname}.':'.$self->{option_results}->{port},$self->{option_results}->{username},$self->{option_results}->{password});
-         $ua->credentials($self->{option_results}->{hostname}.':'.$self->{option_results}->{port},$self->{option_results}->{realm},$self->{option_results}->{username},$self->{option_results}->{password});
-    }
-    
-    if ($self->{option_results}->{proto} eq "https") {
-        if (defined $self->{option_results}->{proxyurl}) {
-            $ua->proxy(['https'], $self->{option_results}->{proxyurl});
-            $response = $ua->get('https://'.$self->{option_results}->{hostname}.':'.$self->{option_results}->{port}.$self->{option_results}->{path});
-        } else  {
-            $response = $ua->get('https://'.$self->{option_results}->{hostname}.':'.$self->{option_results}->{port}.$self->{option_results}->{path});
-        }
-    } else {
-        if (defined $self->{option_results}->{proxyurl}) {
-            $ua->proxy(['http'], $self->{option_results}->{proxyurl});
-            $response = $ua->get($self->{option_results}->{proto}."://" .$self->{option_results}->{hostname}.$self->{option_results}->{path});
-        } else  {
-            $response = $ua->get('http://'.$self->{option_results}->{hostname}.':'.$self->{option_results}->{port}.$self->{option_results}->{path});
-        }
-    }
-
-   if ($response->is_success) {
-        $content = $response->content;
-        return $content;
-   } else {
-        $self->{output}->output_add(severity => $connection_exit,
-                                    short_msg => $response->status_line);     
-        $self->{output}->display();
-        $self->{output}->exit();
-   }
-
-}
-
-1;
-
diff --git a/apps/tomcat/web/mode/listapplication.pm b/apps/tomcat/web/mode/listapplication.pm
index 0a16c8273..547c9fef4 100644
--- a/apps/tomcat/web/mode/listapplication.pm
+++ b/apps/tomcat/web/mode/listapplication.pm
@@ -38,10 +38,9 @@
 package apps::tomcat::web::mode::listapplication;
 
 use base qw(centreon::plugins::mode);
-
 use strict;
 use warnings;
-use apps::tomcat::web::mode::libconnect;
+use centreon::plugins::httplib;
 
 sub new {
     my ($class, %options) = @_;
@@ -52,15 +51,14 @@ sub new {
     $options{options}->add_options(arguments =>
             {
             "hostname:s"            => { name => 'hostname' },
-            "port:s"                => { name => 'port', default => '23002' },
+            "port:s"                => { name => 'port', default => '8080' },
             "proto:s"               => { name => 'proto', default => "http" },
             "credentials"           => { name => 'credentials' },
             "username:s"            => { name => 'username' },
             "password:s"            => { name => 'password' },
             "proxyurl:s"            => { name => 'proxyurl' },
             "timeout:s"             => { name => 'timeout', default => '3' },
-            "path:s"                => { name => 'path', default => '/manager/text/list' },
-            "realm:s"               => { name => 'realm', default => 'Tomcat Manager Application' },
+            "urlpath:s"             => { name => 'url_path', default => '/manager/text/list' },
             "filter-name:s"         => { name => 'filter_name', },
             "filter-state:s"        => { name => 'filter_state', },
             "filter-path:s"         => { name => 'filter_path', },
@@ -93,17 +91,26 @@ sub check_options {
 sub manage_selection {
     my ($self, %options) = @_;
 
-    my $webcontent = apps::tomcat::web::mode::libconnect::connect($self);  
+    my $webcontent = centreon::plugins::httplib::connect($self);  
 
-     while ($webcontent =~ m/\/(.*):(.*):(.*):(.*)/g) {      
+     while ($webcontent =~ m/(.*):(.*):(.*):(.*)/g) {      
         my ($context, $state, $sessions, $contextpath) = ($1, $2, $3, $4);
                
-        next if (defined($self->{option_results}->{filter_name}) && $self->{option_results}->{filter_name} ne '' &&
-                 $context !~ /$self->{option_results}->{filter_name}/);
-        next if (defined($self->{option_results}->{filter_state}) && $self->{option_results}->{filter_state} ne '' &&
-                 $state !~ /$self->{option_results}->{filter_state}/);
-        next if (defined($self->{option_results}->{filter_path}) && $self->{option_results}->{filter_path} ne '' &&
-                 $contextpath !~ /$self->{option_results}->{filter_path}/);
+        if (defined($self->{option_results}->{filter_name}) && $self->{option_results}->{filter_name} ne '' &&
+            $context !~ /$self->{option_results}->{filter_name}/) {
+            $self->{output}->output_add(long_msg => "Skipping context '" . $context . "': no matching filter name");
+            next;
+        }
+        if (defined($self->{option_results}->{filter_state}) && $self->{option_results}->{filter_state} ne '' &&
+            $state !~ /$self->{option_results}->{filter_state}/) {
+            $self->{output}->output_add(long_msg => "Skipping context '" . $context . "': no matching filter state");
+            next;
+        }
+        if (defined($self->{option_results}->{filter_path}) && $self->{option_results}->{filter_path} ne '' &&
+            $contextpath !~ /$self->{option_results}->{filter_path}/) {
+            $self->{output}->output_add(long_msg => "Skipping context '" . $context . "': no matching filter path");
+            next;
+        }
 
         $self->{result}->{$context} = {state => $state, sessions => $sessions, contextpath => $contextpath};
     }
@@ -113,16 +120,13 @@ sub run {
     my ($self, %options) = @_;
     
     $self->manage_selection();
-    my $context_display = '';
-    my $context_display_append = '';
     foreach my $name (sort(keys %{$self->{result}})) {
-        $context_display .= $context_display_append . 'name = ' . $name . ' [state = ' . $self->{result}->{$name}->{state} . ']';
-        $context_display_append = ', ';
+        $self->{output}->output_add(long_msg => "'" . $name . "' [state = " . $self->{result}->{$name}->{state} . ']');
     }
     
     $self->{output}->output_add(severity => 'OK',
-                                short_msg => 'List Contexts: ' . $context_display);
-    $self->{output}->display(nolabel => 1);
+                                short_msg => 'List Contexts:');
+    $self->{output}->display(nolabel => 1, force_ignore_perfdata => 1, force_long_output => 1);
     $self->{output}->exit();
 }
 
@@ -181,17 +185,13 @@ Specify username for basic authentification (Mandatory if --credentials is speci
 
 Specify password for basic authentification (Mandatory if --credentials is specidied)
 
-=item B<--realm>
-
-Credentials Realm (Default: 'Tomcat Manager Application')
-
 =item B<--timeout>
 
 Threshold for HTTP timeout
 
-=item B<--path>
+=item B<--url-path>
 
-Path to the Tomcat Manager List (Default: '/manager/text/list')
+Path to the Tomcat Manager List (Default: Tomcat 7 '/manager/text/list')
 Tomcat 6: '/manager/list'
 Tomcat 7: '/manager/text/list'
 
diff --git a/apps/tomcat/web/mode/memory.pm b/apps/tomcat/web/mode/memory.pm
new file mode 100644
index 000000000..4b3b0ed53
--- /dev/null
+++ b/apps/tomcat/web/mode/memory.pm
@@ -0,0 +1,255 @@
+###############################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an timeelapsedutable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting timeelapsedutable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Author : Florian Asche 
+#
+####################################################################################
+
+package apps::tomcat::web::mode::memory;
+
+use base qw(centreon::plugins::mode);
+use strict;
+use warnings;
+use centreon::plugins::httplib;
+use XML::XPath;
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+            {
+            "hostname:s"            => { name => 'hostname' },
+            "port:s"                => { name => 'port', default => '8080' },
+            "proto:s"               => { name => 'proto', default => "http" },
+            "credentials"           => { name => 'credentials' },
+            "username:s"            => { name => 'username' },
+            "password:s"            => { name => 'password' },
+            "proxyurl:s"            => { name => 'proxyurl' },
+            "timeout:s"             => { name => 'timeout', default => '3' },
+            "urlpath:s"             => { name => 'url_path', default => '/manager/status?XML=true' },
+            "warning:s"             => { name => 'warning' },
+            "critical:s"            => { name => 'critical' },
+            });
+
+    $self->{result} = {};
+    $self->{hostname} = undef;
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+    
+    if (($self->{option_results}->{proto} ne 'http') && ($self->{option_results}->{proto} ne 'https')) {
+        $self->{output}->add_option_msg(short_msg => "Unsupported protocol specified '" . $self->{option_results}->{proto} . "'.");
+        $self->{output}->option_exit();
+    }
+    if (!defined($self->{option_results}->{hostname})) {
+        $self->{output}->add_option_msg(short_msg => "Please set the hostname option");
+        $self->{output}->option_exit();
+    }
+    if ((defined($self->{option_results}->{credentials})) && (!defined($self->{option_results}->{username}) || !defined($self->{option_results}->{password}))) {
+        $self->{output}->add_option_msg(short_msg => "You need to set --username= and --password= options when --credentials is used");
+        $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{option_results}->{warning})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'.");
+        $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'.");
+        $self->{output}->option_exit();
+    }
+
+}
+
+my %xpath_to_check = (
+    memMax => '/status/jvm/memory/@max',
+    memFree => '/status/jvm/memory/@free',
+    memTotal => '/status/jvm/memory/@total',
+);
+
+sub run {
+    my ($self, %options) = @_;
+    
+    my $webcontent = centreon::plugins::httplib::connect($self);  
+    my $port = $self->{option_results}->{port};
+
+    #EXAMPLE 1:
+    #
+    #  
+    #    
+    #    
+    #    
+    #  
+    #  
+    #    
+    #    
+    #    
+    #    
+    #  
+    #
+
+    #EXAMPLE 2:
+    #
+    #
+    #    
+    #    
+    #    
+    #    
+    #    
+    #    
+    #
+    #
+    #    
+    #    
+    #        
+    #    
+    #
+    #
+    #    
+    #    
+    #    
+    #
+    #
+
+    #GET XML DATA
+    my $xpath = XML::XPath->new( xml => $webcontent );
+    my %xpath_check_results;
+
+    foreach my $xpath_check ( keys %xpath_to_check ) {
+        my $singlepath = $xpath_to_check{$xpath_check};
+        $singlepath =~ s{\$port}{$port};
+        my $nodeset = $xpath->find($singlepath);
+
+        foreach my $node ($nodeset->get_nodelist) {
+            my $value = $node->string_value();
+            if ( $value =~ /^"?([0-9.]+)"?$/ ) {
+                $self->{result}->{$xpath_check} = $1;
+            } else {
+                $self->{result}->{$xpath_check} = "not_numeric";
+            };
+        };
+    };
+
+    my $memTotal = $self->{result}->{memTotal};
+    my $memFree = $self->{result}->{memFree};
+    my $memMax = $self->{result}->{memMax};
+    my $memUsed = $memTotal - $memFree;
+    my $memUsed_prct = $memUsed * 100 / $memTotal;
+
+    if (!defined($memTotal) || !defined($memFree) || !defined($memUsed) || !defined($memUsed_prct)) {
+        $self->{output}->add_option_msg(short_msg => "Some informations missing.");
+        $self->{output}->option_exit();
+    }
+
+    my $exit = $self->{perfdata}->threshold_check(value => $memUsed_prct, threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
+
+    my ($memTotal_value, $memTotal_unit) = $self->{perfdata}->change_bytes(value => $memTotal);
+    my ($memFree_value, $memFree_unit) = $self->{perfdata}->change_bytes(value => $memFree);
+    my ($memMax_value, $memMax_unit) = $self->{perfdata}->change_bytes(value => $memMax);
+    my ($memUsed_value, $memUsed_unit) = $self->{perfdata}->change_bytes(value => $memUsed);
+
+
+    $self->{output}->output_add(severity => $exit,
+                                short_msg => sprintf("Memory used %s (%.2f%%)",
+                                            $memUsed_value . " " . $memUsed_unit, $memUsed_prct));
+
+    $self->{output}->perfdata_add(label => "used",
+                                  value => $memUsed,
+                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning', total => $memTotal),
+                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical', total => $memTotal),
+                                  min => 0, max => $memTotal);    
+ 
+    $self->{output}->display();
+    $self->{output}->exit();
+};
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check Tomcat Application Servers Memory Usage
+
+=over 8
+
+=item B<--hostname>
+
+IP Address or FQDN of the Tomcat Application Server
+
+=item B<--port>
+
+Port used by Tomcat
+
+=item B<--proxyurl>
+
+Proxy URL if any
+
+=item B<--proto>
+
+Protocol used http or https
+
+=item B<--credentials>
+
+Specify this option if you access server-status page over basic authentification
+
+=item B<--username>
+
+Specify username for basic authentification (Mandatory if --credentials is specidied)
+
+=item B<--password>
+
+Specify password for basic authentification (Mandatory if --credentials is specidied)
+
+=item B<--timeout>
+
+Threshold for HTTP timeout
+
+=item B<--urlpath>
+
+Path to the Tomcat Manager XML (Default: '/manager/status?XML=true')
+
+=item B<--warning>
+
+Threshold warning in percent.
+
+=item B<--critical>
+
+Threshold critical in percent.
+
+=back
+
+=cut
diff --git a/apps/tomcat/web/mode/requestinfo.pm b/apps/tomcat/web/mode/requestinfo.pm
new file mode 100644
index 000000000..3c183e6a8
--- /dev/null
+++ b/apps/tomcat/web/mode/requestinfo.pm
@@ -0,0 +1,431 @@
+###############################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an timeelapsedutable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting timeelapsedutable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Author : Florian Asche 
+#
+####################################################################################
+
+package apps::tomcat::web::mode::requestinfo;
+
+use base qw(centreon::plugins::mode);
+use strict;
+use warnings;
+use centreon::plugins::httplib;
+use centreon::plugins::statefile;
+use Digest::MD5 qw(md5_hex);
+use XML::XPath;
+use URI::Escape;
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+            {
+            "hostname:s"                 => { name => 'hostname' },
+            "port:s"                     => { name => 'port', default => '8080' },
+            "proto:s"                    => { name => 'proto', default => "http" },
+            "credentials"                => { name => 'credentials' },
+            "username:s"                 => { name => 'username' },
+            "password:s"                 => { name => 'password' },
+            "proxyurl:s"                 => { name => 'proxyurl' },
+            "timeout:s"                  => { name => 'timeout', default => '3' },
+            "urlpath:s"                  => { name => 'url_path', default => '/manager/status?XML=true' },
+            "name:s"                     => { name => 'name' },
+            "regexp"                     => { name => 'use_regexp' },
+            "regexp-isensitive"          => { name => 'use_regexpi' },
+            "warning-maxtime:s"          => { name => 'warning_maxtime' },
+            "critical-maxtime:s"         => { name => 'critical_maxtime' },
+            "warning-processingtime:s"   => { name => 'warning_processingtime' },
+            "critical-processingtime:s"  => { name => 'critical_processingtime' },
+            "warning-requestcount:s"     => { name => 'warning_requestcount' },
+            "critical-requestcount:s"    => { name => 'critical_requestcount' },
+            "warning-errorcount:s"       => { name => 'warning_errorcount' },
+            "critical-errorcount:s"      => { name => 'critical_errorcount' },
+            });
+
+    $self->{result} = {};
+    $self->{hostname} = undef;
+    $self->{statefile_value} = centreon::plugins::statefile->new(%options);
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+    
+    if (($self->{option_results}->{proto} ne 'http') && ($self->{option_results}->{proto} ne 'https')) {
+        $self->{output}->add_option_msg(short_msg => "Unsupported protocol specified '" . $self->{option_results}->{proto} . "'.");
+        $self->{output}->option_exit();
+    }
+    if (!defined($self->{option_results}->{hostname})) {
+        $self->{output}->add_option_msg(short_msg => "Please set the hostname option");
+        $self->{output}->option_exit();
+    }
+    if ((defined($self->{option_results}->{credentials})) && (!defined($self->{option_results}->{username}) || !defined($self->{option_results}->{password}))) {
+        $self->{output}->add_option_msg(short_msg => "You need to set --username= and --password= options when --credentials is used");
+        $self->{output}->option_exit();
+    }
+    #MaxTime
+    if (($self->{perfdata}->threshold_validate(label => 'warning-maxtime', value => $self->{option_results}->{warning_maxtime})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong warning 'warning-maxtime' threshold '" . $self->{option_results}->{warning_maxtime} . "'.");
+        $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical-maxtime', value => $self->{option_results}->{critical_maxtime})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong critical 'critical-maxtime' threshold '" . $self->{option_results}->{critical_maxtime} . "'.");
+        $self->{output}->option_exit();
+    }
+    #processingTime
+    if (($self->{perfdata}->threshold_validate(label => 'warning-processingtime', value => $self->{option_results}->{warning_processingtime})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong warning 'warning-processingtime' threshold '" . $self->{option_results}->{warning_processingtime} . "'.");
+        $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical-processingtime', value => $self->{option_results}->{critical_processingtime})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong critical 'critical-processingtime' threshold '" . $self->{option_results}->{critical_processingtime} . "'.");
+        $self->{output}->option_exit();
+    }
+    #requestCount
+    if (($self->{perfdata}->threshold_validate(label => 'warning-requestcount', value => $self->{option_results}->{warning_requestcount})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong warning 'warning-requestcount' threshold '" . $self->{option_results}->{warning_requestcount} . "'.");
+        $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical-requestcount', value => $self->{option_results}->{critical_requestcount})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong critical 'critical-requestcount' threshold '" . $self->{option_results}->{critical_requestcount} . "'.");
+        $self->{output}->option_exit();
+    }
+    #errorCount
+    if (($self->{perfdata}->threshold_validate(label => 'warning-errorcount', value => $self->{option_results}->{warning_errorcount})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong warning 'warning-errorcount' threshold '" . $self->{option_results}->{warning_errorcount} . "'.");
+        $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical-errorcount', value => $self->{option_results}->{critical_errorcount})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong critical 'critical-errorcount' threshold '" . $self->{option_results}->{critical_errorcount} . "'.");
+        $self->{output}->option_exit();
+    }
+
+    $self->{statefile_value}->check_options(%options);
+    $self->{hostname} = $self->{option_results}->{hostname};
+    if (!defined($self->{hostname})) {
+        $self->{hostname} = 'me';
+    }
+}
+
+my %xpath_to_check = (
+    requestInfo_maxTime         => '/status/connector/requestInfo/@maxTime',            #
+    requestInfo_processingTime  => '/status/connector/requestInfo/@processingTime',     #to last
+    requestInfo_requestCount    => '/status/connector/requestInfo/@requestCount',       #to last
+    requestInfo_errorCount      => '/status/connector/requestInfo/@errorCount',         #to last
+);
+
+sub manage_selection {
+    my ($self, %options) = @_;
+
+    my $webcontent = centreon::plugins::httplib::connect($self);  
+    my $port = $self->{option_results}->{port};
+
+    #EXAMPLE 1:
+    #
+    #  
+    #    
+    #    
+    #    
+    #  
+    #  
+    #    
+    #    
+    #    
+    #    
+    #  
+    #
+
+    #EXAMPLE 2:
+    #
+    #
+    #    
+    #    
+    #    
+    #    
+    #    
+    #    
+    #
+    #
+    #    
+    #    
+    #        
+    #    
+    #
+    #
+    #    
+    #    
+    #    
+    #
+    #
+
+    #GET XML DATA
+    my $xpath = XML::XPath->new( xml => $webcontent );
+    my %xpath_check_results;
+
+    foreach my $xpath_check ( keys %xpath_to_check ) {
+        my $singlepath = $xpath_to_check{$xpath_check};
+        $singlepath =~ s{\$port}{$port};
+        my $nodeset = $xpath->find($singlepath);
+
+        foreach my $node ($nodeset->get_nodelist) {
+            my $connector_name = $node->getParentNode()->getParentNode()->getAttribute("name");
+            $connector_name =~ s/^["'\s]+//;
+            $connector_name =~ s/["'\s]+$//;
+            $connector_name = uri_unescape($connector_name);
+
+            next if (defined($self->{option_results}->{name}) && defined($self->{option_results}->{use_regexp}) && defined($self->{option_results}->{use_regexpi}) 
+                && $connector_name !~ /$self->{option_results}->{name}/i);
+            next if (defined($self->{option_results}->{name}) && defined($self->{option_results}->{use_regexp}) && !defined($self->{option_results}->{use_regexpi}) 
+                && $connector_name !~ /$self->{option_results}->{name}/);
+            next if (defined($self->{option_results}->{name}) && !defined($self->{option_results}->{use_regexp}) && !defined($self->{option_results}->{use_regexpi})
+                && $connector_name ne $self->{option_results}->{name});
+
+            my $value = $node->string_value();
+            if ( $value =~ /^"?([0-9.]+)"?$/ ) {
+                $self->{result}->{$connector_name}{$xpath_check} = $1;
+            } else {
+                $self->{result}->{$connector_name}{$xpath_check} = "not_numeric";
+            };
+        };
+
+        if (scalar(keys %{$self->{result}}) <= 0) {
+                if (defined($self->{option_results}->{name})) {
+                    $self->{output}->add_option_msg(short_msg => "No information found for name '" . $self->{option_results}->{name} . "'.");
+                } else {
+                    $self->{output}->add_option_msg(short_msg => "No information found.");
+                }
+                $self->{output}->option_exit();
+        };
+    };
+};
+
+sub run {
+    my ($self, %options) = @_;
+    
+    $self->manage_selection();
+
+    my $new_datas = {};
+    $self->{statefile_value}->read(statefile => 'cache_apps_tomcat_web_' . $self->{option_results}->{hostname}  . '_' . centreon::plugins::httplib::get_port($self) . '_' . $self->{mode} . '_' . (defined($self->{option_results}->{name}) ? md5_hex($self->{option_results}->{name}) : md5_hex('all')));
+    $new_datas->{last_timestamp} = time();
+    my $old_timestamp = $self->{statefile_value}->get(name => 'last_timestamp');
+
+    if (!defined($self->{option_results}->{name}) || defined($self->{option_results}->{use_regexp})) {
+        $self->{output}->output_add(severity => 'OK',
+                                    short_msg => 'All requestInfo Data are ok.');
+    }
+
+    foreach my $name (sort(keys %{$self->{result}})) {
+        $new_datas->{'requestInfo_processingTime_' . $name} = $self->{result}->{$name}->{requestInfo_processingTime};
+        $new_datas->{'requestInfo_requestCount_' . $name} = $self->{result}->{$name}->{requestInfo_requestCount};
+        $new_datas->{'requestInfo_errorCount_' . $name} = $self->{result}->{$name}->{requestInfo_errorCount};
+
+        my $requestInfo_processingTime = $self->{statefile_value}->get(name => 'requestInfo_processingTime_' . $name);
+        my $requestInfo_requestCount = $self->{statefile_value}->get(name => 'requestInfo_requestCount_' . $name);
+        my $requestInfo_errorCount = $self->{statefile_value}->get(name => 'requestInfo_errorCount_' . $name);
+
+        if (!defined($old_timestamp) || !defined($requestInfo_processingTime) || !defined($requestInfo_requestCount) || !defined($requestInfo_errorCount)) {
+            next;
+        }
+        if ($new_datas->{'requestInfo_processingTime_' . $name} < $requestInfo_processingTime) {
+            # We set 0. Has reboot.
+            $requestInfo_processingTime = 0;
+        }
+        if ($new_datas->{'requestInfo_requestCount_' . $name} < $requestInfo_requestCount) {
+            # We set 0. Has reboot.
+            $requestInfo_requestCount = 0;
+        }
+        if ($new_datas->{'requestInfo_errorCount_' . $name} < $requestInfo_errorCount) {
+            # We set 0. Has reboot.
+            $requestInfo_errorCount = 0;
+        }
+
+        my $time_delta = $new_datas->{last_timestamp} - $old_timestamp;
+        if ($time_delta <= 0) {
+            # At least one second. two fast calls ;)
+            $time_delta = 1;
+        }
+
+        my $requestInfo_maxTime = $self->{result}->{$name}->{requestInfo_maxTime};
+
+        my $requestInfo_processingTime_absolute_per_sec = ($new_datas->{'requestInfo_processingTime_' . $name} - $requestInfo_processingTime) / $time_delta;
+        my $requestInfo_requestCount_absolute_per_sec = ($new_datas->{'requestInfo_requestCount_' . $name} - $requestInfo_requestCount) / $time_delta;
+        my $requestInfo_errorCount_absolute_per_sec = ($new_datas->{'requestInfo_errorCount_' . $name} - $requestInfo_errorCount) / $time_delta;
+
+        my $exit1 = $self->{perfdata}->threshold_check(value => $requestInfo_maxTime, threshold => [ { label => 'critical-maxtime', 'exit_litteral' => 'critical' }, { label => 'warning-maxtime', exit_litteral => 'warning' } ]);
+        my $exit2 = $self->{perfdata}->threshold_check(value => $requestInfo_processingTime_absolute_per_sec, threshold => [ { label => 'critical-processingtime', 'exit_litteral' => 'critical' }, { label => 'warning-processingtime', exit_litteral => 'warning' } ]);
+        my $exit3 = $self->{perfdata}->threshold_check(value => $requestInfo_requestCount_absolute_per_sec, threshold => [ { label => 'critical-requestcount', 'exit_litteral' => 'critical' }, { label => 'warning-requestcount', exit_litteral => 'warning' } ]);
+        my $exit4 = $self->{perfdata}->threshold_check(value => $requestInfo_errorCount_absolute_per_sec, threshold => [ { label => 'critical-errorcount', 'exit_litteral' => 'critical' }, { label => 'warning-errorcount', exit_litteral => 'warning' } ]);
+        my $exit = $self->{output}->get_most_critical(status => [ $exit1, $exit2, $exit3, $exit4 ]);
+
+        $self->{output}->output_add(long_msg => sprintf("Connector '%s' maxTime : %s, processingTime : %.3f, requestCount : %.2f, errorCount : %.2f", $name, $requestInfo_maxTime, $requestInfo_processingTime_absolute_per_sec, $requestInfo_requestCount_absolute_per_sec, $requestInfo_errorCount_absolute_per_sec));
+        if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1) || (defined($self->{option_results}->{name}) && !defined($self->{option_results}->{use_regexp}))) {
+            $self->{output}->output_add(severity => $exit,
+                                        short_msg => sprintf("Connector '%s' maxTime : %s, processingTime : %.3f, requestCount : %.2f, errorCount : %.2f", $name,
+                                       $requestInfo_maxTime,
+                                       $requestInfo_processingTime_absolute_per_sec,
+                                       $requestInfo_requestCount_absolute_per_sec,
+                                       $requestInfo_errorCount_absolute_per_sec));
+        }
+        
+        my $extra_label = '';
+        $extra_label = '_' . $name if (!defined($self->{option_results}->{name}) || defined($self->{option_results}->{use_regexp}));
+        $self->{output}->perfdata_add(label => 'maxTime' . $extra_label,
+                                      value => sprintf("%.2f", $self->{result}->{$name}->{requestInfo_maxTime}),
+                                      warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
+                                      critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'),
+                                      min => 0);
+
+        $self->{output}->perfdata_add(label => 'processingTime' . $extra_label,
+                                      value => sprintf("%.3f", $requestInfo_processingTime_absolute_per_sec),
+                                      warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
+                                      critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'),
+                                      min => 0);
+
+        $self->{output}->perfdata_add(label => 'requestCount' . $extra_label,
+                                      value => sprintf("%.2f", $requestInfo_requestCount_absolute_per_sec),
+                                      warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
+                                      critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'),
+                                      min => 0);
+        $self->{output}->perfdata_add(label => 'errorCount' . $extra_label,
+                                      value => sprintf("%.2f", $requestInfo_errorCount_absolute_per_sec),
+                                      warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
+                                      critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'),
+                                      min => 0);
+    };
+
+    $self->{statefile_value}->write(data => $new_datas);    
+    if (!defined($old_timestamp)) {
+        $self->{output}->output_add(severity => 'OK',
+                                    short_msg => "Buffer creation...");
+    }
+
+    $self->{output}->display();
+    $self->{output}->exit();
+};
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check Tomcat Application Servers Requestinfo Threadsinformation for each Connector
+
+=over 8
+
+=item B<--hostname>
+
+IP Address or FQDN of the Tomcat Application Server
+
+=item B<--port>
+
+Port used by Tomcat
+
+=item B<--proxyurl>
+
+Proxy URL if any
+
+=item B<--proto>
+
+Protocol used http or https
+
+=item B<--credentials>
+
+Specify this option if you access server-status page over basic authentification
+
+=item B<--username>
+
+Specify username for basic authentification (Mandatory if --credentials is specidied)
+
+=item B<--password>
+
+Specify password for basic authentification (Mandatory if --credentials is specidied)
+
+=item B<--timeout>
+
+Threshold for HTTP timeout
+
+=item B<--urlpath>
+
+Path to the Tomcat Manager XML (Default: '/manager/status?XML=true')
+
+=item B<--name>
+
+Set the filter name (empty means 'check all contexts')
+
+=item B<--regexp>
+
+Allows to use regexp to filter (with option --name).
+
+=item B<--regexp-isensitive>
+
+Allows to use regexp non case-sensitive (with --regexp).
+
+=item B<--warning-maxtime>
+
+Threshold warning for maxTime
+
+=item B<--critical-maxtime>
+
+Threshold critical for maxTime
+
+=item B<--warning-processingtime>
+
+Threshold warning for ProcessingTime
+
+=item B<--critical-processingtime>
+
+Threshold critical for ProcessingTime
+
+=item B<--warning-requestcount>
+
+Threshold warning for requestCount
+
+=item B<--critical-requestcount>
+
+Threshold critical for requestCount
+
+=item B<--warning-errorcount>
+
+Threshold warning for errorCount
+
+=item B<--critical-errorcount>
+
+Threshold critical for errorCount
+
+=back
+
+=cut
diff --git a/apps/tomcat/web/mode/sessions.pm b/apps/tomcat/web/mode/sessions.pm
index 8c7b846fb..3a89af7dd 100644
--- a/apps/tomcat/web/mode/sessions.pm
+++ b/apps/tomcat/web/mode/sessions.pm
@@ -38,10 +38,9 @@
 package apps::tomcat::web::mode::sessions;
 
 use base qw(centreon::plugins::mode);
-
 use strict;
 use warnings;
-use apps::tomcat::web::mode::libconnect;
+use centreon::plugins::httplib;
 
 sub new {
     my ($class, %options) = @_;
@@ -52,15 +51,14 @@ sub new {
     $options{options}->add_options(arguments =>
             {
             "hostname:s"            => { name => 'hostname' },
-            "port:s"                => { name => 'port', default => '23002' },
+            "port:s"                => { name => 'port', default => '8080' },
             "proto:s"               => { name => 'proto', default => "http" },
             "credentials"           => { name => 'credentials' },
             "username:s"            => { name => 'username' },
             "password:s"            => { name => 'password' },
             "proxyurl:s"            => { name => 'proxyurl' },
             "timeout:s"             => { name => 'timeout', default => '3' },
-            "path:s"                => { name => 'path', default => '/manager/text/list' },
-            "realm:s"               => { name => 'realm', default => 'Tomcat Manager Application' },
+            "urlpath:s"             => { name => 'url_path', default => '/manager/text/list' },
             "warning:s"             => { name => 'warning' },
             "critical:s"            => { name => 'critical' },
             "name:s"                => { name => 'name' },
@@ -105,9 +103,9 @@ sub check_options {
 sub manage_selection {
     my ($self, %options) = @_;
 
-    my $webcontent = apps::tomcat::web::mode::libconnect::connect($self);  
+    my $webcontent = centreon::plugins::httplib::connect($self);  
 
-     while ($webcontent =~ m/\/(.*):(.*):(.*):(.*)/g) {      
+     while ($webcontent =~ m/(.*):(.*):(.*):(.*)/g) {      
         my ($context, $state, $sessions, $contextpath) = ($1, $2, $3, $4);
 
         next if (defined($self->{option_results}->{filter_state}) && $self->{option_results}->{filter_state} ne '' &&
@@ -127,9 +125,9 @@ sub manage_selection {
     
     if (scalar(keys %{$self->{result}}) <= 0) {
         if (defined($self->{option_results}->{name})) {
-            $self->{output}->add_option_msg(short_msg => "No contexts found for name '" . $self->{option_results}->{name} . "'.");
+            $self->{output}->add_option_msg(short_msg => "No session information found for name '" . $self->{option_results}->{name} . "'.");
         } else {
-            $self->{output}->add_option_msg(short_msg => "No contexts found.");
+            $self->{output}->add_option_msg(short_msg => "No session information found.");
         }
         $self->{output}->option_exit();
     }
@@ -142,7 +140,7 @@ sub run {
 
     if (!defined($self->{option_results}->{name}) || defined($self->{option_results}->{use_regexp})) {
         $self->{output}->output_add(severity => 'OK',
-                                    short_msg => 'All Contexts are ok.');
+                                    short_msg => 'All Sessions are ok.');
     };
 
     foreach my $name (sort(keys %{$self->{result}})) {
@@ -207,17 +205,13 @@ Specify username for basic authentification (Mandatory if --credentials is speci
 
 Specify password for basic authentification (Mandatory if --credentials is specidied)
 
-=item B<--realm>
-
-Credentials Realm (Default: 'Tomcat Manager Application')
-
 =item B<--timeout>
 
 Threshold for HTTP timeout
 
-=item B<--path>
+=item B<--urlpath>
 
-Path to the Tomcat Manager List (Default: '/manager/text/list')
+Path to the Tomcat Manager List (Default: Tomcat 7 '/manager/text/list')
 Tomcat 6: '/manager/list'
 Tomcat 7: '/manager/text/list'
 
diff --git a/apps/tomcat/web/mode/threads.pm b/apps/tomcat/web/mode/threads.pm
new file mode 100644
index 000000000..0668cd748
--- /dev/null
+++ b/apps/tomcat/web/mode/threads.pm
@@ -0,0 +1,302 @@
+###############################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an timeelapsedutable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting timeelapsedutable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Author : Florian Asche 
+#
+####################################################################################
+
+package apps::tomcat::web::mode::threads;
+
+use base qw(centreon::plugins::mode);
+use strict;
+use warnings;
+use centreon::plugins::httplib;
+use XML::XPath;
+use URI::Escape;
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+            {
+            "hostname:s"            => { name => 'hostname' },
+            "port:s"                => { name => 'port', default => '8080' },
+            "proto:s"               => { name => 'proto', default => "http" },
+            "credentials"           => { name => 'credentials' },
+            "username:s"            => { name => 'username' },
+            "password:s"            => { name => 'password' },
+            "proxyurl:s"            => { name => 'proxyurl' },
+            "timeout:s"             => { name => 'timeout', default => '3' },
+            "urlpath:s"             => { name => 'url_path', default => '/manager/status?XML=true' },
+            "warning:s"             => { name => 'warning' },
+            "critical:s"            => { name => 'critical' },
+            "name:s"                => { name => 'name' },
+            "regexp"                => { name => 'use_regexp' },
+            "regexp-isensitive"     => { name => 'use_regexpi' },
+            });
+
+    $self->{result} = {};
+    $self->{hostname} = undef;
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+    
+    if (($self->{option_results}->{proto} ne 'http') && ($self->{option_results}->{proto} ne 'https')) {
+        $self->{output}->add_option_msg(short_msg => "Unsupported protocol specified '" . $self->{option_results}->{proto} . "'.");
+        $self->{output}->option_exit();
+    }
+    if (!defined($self->{option_results}->{hostname})) {
+        $self->{output}->add_option_msg(short_msg => "Please set the hostname option");
+        $self->{output}->option_exit();
+    }
+    if ((defined($self->{option_results}->{credentials})) && (!defined($self->{option_results}->{username}) || !defined($self->{option_results}->{password}))) {
+        $self->{output}->add_option_msg(short_msg => "You need to set --username= and --password= options when --credentials is used");
+        $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{option_results}->{warning})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'.");
+        $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'.");
+        $self->{output}->option_exit();
+    }
+
+}
+
+my %xpath_to_check = (
+    maxThreads                  => '/status/connector/threadInfo/@maxThreads',
+    currentThreadCount          => '/status/connector/threadInfo/@currentThreadCount',
+    currentThreadsBusy          => '/status/connector/threadInfo/@currentThreadsBusy',
+);
+
+sub manage_selection {
+    my ($self, %options) = @_;
+
+    my $webcontent = centreon::plugins::httplib::connect($self);  
+    my $port = $self->{option_results}->{port};
+
+    #EXAMPLE 1:
+    #
+    #  
+    #    
+    #    
+    #    
+    #  
+    #  
+    #    
+    #    
+    #    
+    #    
+    #  
+    #
+
+    #EXAMPLE 2:
+    #
+    #
+    #    
+    #    
+    #    
+    #    
+    #    
+    #    
+    #
+    #
+    #    
+    #    
+    #        
+    #    
+    #
+    #
+    #    
+    #    
+    #    
+    #
+    #
+
+    #GET XML DATA
+    my $xpath = XML::XPath->new( xml => $webcontent );
+    my %xpath_check_results;
+
+    foreach my $xpath_check ( keys %xpath_to_check ) {
+        my $singlepath = $xpath_to_check{$xpath_check};
+        $singlepath =~ s{\$port}{$port};
+        my $nodeset = $xpath->find($singlepath);
+
+        foreach my $node ($nodeset->get_nodelist) {
+            my $connector_name = $node->getParentNode()->getParentNode()->getAttribute("name");
+            $connector_name =~ s/^["'\s]+//;
+            $connector_name =~ s/["'\s]+$//;
+            $connector_name = uri_unescape($connector_name);
+
+            next if (defined($self->{option_results}->{name}) && defined($self->{option_results}->{use_regexp}) && defined($self->{option_results}->{use_regexpi}) 
+                && $connector_name !~ /$self->{option_results}->{name}/i);
+            next if (defined($self->{option_results}->{name}) && defined($self->{option_results}->{use_regexp}) && !defined($self->{option_results}->{use_regexpi}) 
+                && $connector_name !~ /$self->{option_results}->{name}/);
+            next if (defined($self->{option_results}->{name}) && !defined($self->{option_results}->{use_regexp}) && !defined($self->{option_results}->{use_regexpi})
+                && $connector_name ne $self->{option_results}->{name});
+
+            my $value = $node->string_value();
+            if ( $value =~ /^"?([0-9.]+)"?$/ ) {
+                $self->{result}->{$connector_name}{$xpath_check} = $1;
+            } else {
+                $self->{result}->{$connector_name}{$xpath_check} = "not_numeric";
+            };
+        };
+
+        if (scalar(keys %{$self->{result}}) <= 0) {
+                if (defined($self->{option_results}->{name})) {
+                    $self->{output}->add_option_msg(short_msg => "No information found for name '" . $self->{option_results}->{name} . "'.");
+                } else {
+                    $self->{output}->add_option_msg(short_msg => "No information found.");
+                }
+                $self->{output}->option_exit();
+        };
+    };
+};
+
+sub run {
+    my ($self, %options) = @_;
+    
+    $self->manage_selection();
+
+    if (!defined($self->{option_results}->{name}) || defined($self->{option_results}->{use_regexp})) {
+        $self->{output}->output_add(severity => 'OK',
+                                    short_msg => 'All Threads are ok.');
+    };
+
+    foreach my $name (sort(keys %{$self->{result}})) {
+        my $exit = $self->{perfdata}->threshold_check(value => $self->{result}->{$name}->{currentThreadsBusy}, threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
+
+        $self->{output}->output_add(long_msg => sprintf("Thread '%s' currentThreadsBusy : %s", $name,
+                                       $self->{result}->{$name}->{currentThreadsBusy}));
+        if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1) || (defined($self->{option_results}->{name}) && !defined($self->{option_results}->{use_regexp}))) {
+            $self->{output}->output_add(severity => $exit,
+                                        short_msg => sprintf("Thread '%s' currentThreadsBusy : %s", $name,
+                                        $self->{result}->{$name}->{currentThreadsBusy}));
+        }
+
+        my $extra_label = '';
+        $extra_label = '_' . $name if (!defined($self->{option_results}->{name}) || defined($self->{option_results}->{use_regexp}));
+        $self->{output}->perfdata_add(label => 'currentThreadsBusy' . $extra_label,
+                                      value => $self->{result}->{$name}->{currentThreadsBusy},
+                                      warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
+                                      critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'),
+                                      min => 0,
+                                      max => $self->{result}->{$name}->{maxThreads});
+
+        $self->{output}->perfdata_add(label => 'currentThreadCount' . $extra_label,
+                                      value => $self->{result}->{$name}->{currentThreadCount},
+                                      warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
+                                      critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'),
+                                      min => 0,
+                                      max => $self->{result}->{$name}->{maxThreads});
+    };
+
+    $self->{output}->display();
+    $self->{output}->exit();
+};
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check Tomcat Application Servers Threads for each Connector
+
+=over 8
+
+=item B<--hostname>
+
+IP Address or FQDN of the Tomcat Application Server
+
+=item B<--port>
+
+Port used by Tomcat
+
+=item B<--proxyurl>
+
+Proxy URL if any
+
+=item B<--proto>
+
+Protocol used http or https
+
+=item B<--credentials>
+
+Specify this option if you access server-status page over basic authentification
+
+=item B<--username>
+
+Specify username for basic authentification (Mandatory if --credentials is specidied)
+
+=item B<--password>
+
+Specify password for basic authentification (Mandatory if --credentials is specidied)
+
+=item B<--timeout>
+
+Threshold for HTTP timeout
+
+=item B<--urlpath>
+
+Path to the Tomcat Manager XML (Default: '/manager/status?XML=true')
+
+=item B<--warning>
+
+Warning Threshold for Number of Threads
+
+=item B<--critical>
+
+Critical Threshold for Number of Threads
+
+=item B<--name>
+
+Set the filter name (empty means 'check all contexts')
+
+=item B<--regexp>
+
+Allows to use regexp to filter (with option --name).
+
+=item B<--regexp-isensitive>
+
+Allows to use regexp non case-sensitive (with --regexp).
+
+=back
+
+=cut
diff --git a/apps/tomcat/web/mode/traffic.pm b/apps/tomcat/web/mode/traffic.pm
new file mode 100644
index 000000000..4fe65fe1a
--- /dev/null
+++ b/apps/tomcat/web/mode/traffic.pm
@@ -0,0 +1,402 @@
+###############################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an timeelapsedutable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting timeelapsedutable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Author : Florian Asche 
+#
+####################################################################################
+
+package apps::tomcat::web::mode::traffic;
+
+use base qw(centreon::plugins::mode);
+use strict;
+use warnings;
+use centreon::plugins::httplib;
+use centreon::plugins::misc;
+use centreon::plugins::statefile;
+use Digest::MD5 qw(md5_hex);
+use XML::XPath;
+use URI::Escape;
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+            {
+            "hostname:s"            => { name => 'hostname' },
+            "port:s"                => { name => 'port', default => '8080' },
+            "proto:s"               => { name => 'proto', default => "http" },
+            "credentials"           => { name => 'credentials' },
+            "username:s"            => { name => 'username' },
+            "password:s"            => { name => 'password' },
+            "proxyurl:s"            => { name => 'proxyurl' },
+            "timeout:s"             => { name => 'timeout', default => '3' },
+            "urlpath:s"             => { name => 'url_path', default => '/manager/status?XML=true' },
+            "name:s"                => { name => 'name' },
+            "regexp"                => { name => 'use_regexp' },
+            "regexp-isensitive"     => { name => 'use_regexpi' },
+            "speed:s"               => { name => 'speed' },
+            "warning-in:s"          => { name => 'warning_in' },
+            "critical-in:s"         => { name => 'critical_in' },
+            "warning-out:s"         => { name => 'warning_out' },
+            "critical-out:s"        => { name => 'critical_out' },
+            });
+
+    $self->{result} = {};
+    $self->{hostname} = undef;
+    $self->{statefile_value} = centreon::plugins::statefile->new(%options);
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+    
+    if (($self->{option_results}->{proto} ne 'http') && ($self->{option_results}->{proto} ne 'https')) {
+        $self->{output}->add_option_msg(short_msg => "Unsupported protocol specified '" . $self->{option_results}->{proto} . "'.");
+        $self->{output}->option_exit();
+    }
+    if (!defined($self->{option_results}->{hostname})) {
+        $self->{output}->add_option_msg(short_msg => "Please set the hostname option");
+        $self->{output}->option_exit();
+    }
+    if ((defined($self->{option_results}->{credentials})) && (!defined($self->{option_results}->{username}) || !defined($self->{option_results}->{password}))) {
+        $self->{output}->add_option_msg(short_msg => "You need to set --username= and --password= options when --credentials is used");
+        $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'warning-in', value => $self->{option_results}->{warning_in})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong warning 'in' threshold '" . $self->{option_results}->{warning_in} . "'.");
+        $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical-in', value => $self->{option_results}->{critical_in})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong critical 'in' threshold '" . $self->{option_results}->{critical_in} . "'.");
+        $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'warning-out', value => $self->{option_results}->{warning_out})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong warning 'out' threshold '" . $self->{option_results}->{warning_out} . "'.");
+        $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical-out', value => $self->{option_results}->{critical_out})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong critical 'out' threshold '" . $self->{option_results}->{critical_out} . "'.");
+        $self->{output}->option_exit();
+    }
+    if (defined($self->{option_results}->{speed}) && $self->{option_results}->{speed} ne '' && $self->{option_results}->{speed} !~ /^[0-9]+(\.[0-9]+){0,1}$/) {
+        $self->{output}->add_option_msg(short_msg => "Speed must be a positive number '" . $self->{option_results}->{speed} . "' (can be a float also).");
+        $self->{output}->option_exit();
+    }
+    if (defined($self->{option_results}->{units}) && $self->{option_results}->{units} eq '%' && 
+        (!defined($self->{option_results}->{speed}) || $self->{option_results}->{speed} eq '')) {
+        $self->{output}->add_option_msg(short_msg => "To use percent, you need to set --speed option.");
+        $self->{output}->option_exit();
+    }
+
+    $self->{statefile_value}->check_options(%options);
+    $self->{hostname} = $self->{option_results}->{hostname};
+    if (!defined($self->{hostname})) {
+        $self->{hostname} = 'me';
+    }
+}
+
+my %xpath_to_check = (
+    in        => '/status/connector/requestInfo/@bytesReceived',
+    out       => '/status/connector/requestInfo/@bytesSent',
+);
+
+sub manage_selection {
+    my ($self, %options) = @_;
+
+    my $webcontent = centreon::plugins::httplib::connect($self);  
+    my $port = $self->{option_results}->{port};
+
+    #EXAMPLE 1:
+    #
+    #  
+    #    
+    #    
+    #    
+    #  
+    #  
+    #    
+    #    
+    #    
+    #    
+    #  
+    #
+
+    #EXAMPLE 2:
+    #
+    #
+    #    
+    #    
+    #    
+    #    
+    #    
+    #    
+    #
+    #
+    #    
+    #    
+    #        
+    #    
+    #
+    #
+    #    
+    #    
+    #    
+    #
+    #
+
+    #GET XML DATA
+    my $xpath = XML::XPath->new( xml => $webcontent );
+    my %xpath_check_results;
+
+    foreach my $xpath_check ( keys %xpath_to_check ) {
+        my $singlepath = $xpath_to_check{$xpath_check};
+        $singlepath =~ s{\$port}{$port};
+        my $nodeset = $xpath->find($singlepath);
+
+        foreach my $node ($nodeset->get_nodelist) {
+            my $connector_name = $node->getParentNode()->getParentNode()->getAttribute("name");
+            $connector_name =~ s/^["'\s]+//;
+            $connector_name =~ s/["'\s]+$//;
+            $connector_name = uri_unescape($connector_name);
+
+            next if (defined($self->{option_results}->{name}) && defined($self->{option_results}->{use_regexp}) && defined($self->{option_results}->{use_regexpi}) 
+                && $connector_name !~ /$self->{option_results}->{name}/i);
+            next if (defined($self->{option_results}->{name}) && defined($self->{option_results}->{use_regexp}) && !defined($self->{option_results}->{use_regexpi}) 
+                && $connector_name !~ /$self->{option_results}->{name}/);
+            next if (defined($self->{option_results}->{name}) && !defined($self->{option_results}->{use_regexp}) && !defined($self->{option_results}->{use_regexpi})
+                && $connector_name ne $self->{option_results}->{name});
+
+            my $value = $node->string_value();
+            if ( $value =~ /^"?([0-9.]+)"?$/ ) {
+                $self->{result}->{$connector_name}{$xpath_check} = $1;
+            } else {
+                $self->{result}->{$connector_name}{$xpath_check} = "not_numeric";
+            };
+        };
+
+        if (scalar(keys %{$self->{result}}) <= 0) {
+                if (defined($self->{option_results}->{name})) {
+                    $self->{output}->add_option_msg(short_msg => "No information found for name '" . $self->{option_results}->{name} . "'.");
+                } else {
+                    $self->{output}->add_option_msg(short_msg => "No information found.");
+                }
+                $self->{output}->option_exit();
+        };
+    };
+};
+
+sub run {
+    my ($self, %options) = @_;
+    
+    $self->manage_selection();
+
+    my $new_datas = {};
+    $self->{statefile_value}->read(statefile => 'cache_apps_tomcat_web_' . $self->{option_results}->{hostname} . '_' . centreon::plugins::httplib::get_port($self) . '_' . $self->{mode} . '_' . (defined($self->{option_results}->{name}) ? md5_hex($self->{option_results}->{name}) : md5_hex('all')));
+    $new_datas->{last_timestamp} = time();
+    my $old_timestamp = $self->{statefile_value}->get(name => 'last_timestamp');
+
+    if (!defined($self->{option_results}->{name}) || defined($self->{option_results}->{use_regexp})) {
+        $self->{output}->output_add(severity => 'OK',
+                                    short_msg => 'All traffic are ok.');
+    }
+
+    foreach my $name (sort(keys %{$self->{result}})) {
+        $new_datas->{'in_' . $name} = $self->{result}->{$name}->{in} * 8;
+        $new_datas->{'out_' . $name} = $self->{result}->{$name}->{out} * 8;
+        
+        my $old_in = $self->{statefile_value}->get(name => 'in_' . $name);
+        my $old_out = $self->{statefile_value}->get(name => 'out_' . $name);
+        if (!defined($old_timestamp) || !defined($old_in) || !defined($old_out)) {
+            next;
+        }
+        if ($new_datas->{'in_' . $name} < $old_in) {
+            # We set 0. Has reboot.
+            $old_in = 0;
+        }
+        if ($new_datas->{'out_' . $name} < $old_out) {
+            # We set 0. Has reboot.
+            $old_out = 0;
+        }
+
+        my $time_delta = $new_datas->{last_timestamp} - $old_timestamp;
+        if ($time_delta <= 0) {
+            # At least one second. two fast calls ;)
+            $time_delta = 1;
+        }
+        my $in_absolute_per_sec = ($new_datas->{'in_' . $name} - $old_in) / $time_delta;
+        my $out_absolute_per_sec = ($new_datas->{'out_' . $name} - $old_out) / $time_delta;
+
+        my ($exit, $interface_speed, $in_prct, $out_prct);
+        if (defined($self->{option_results}->{speed}) && $self->{option_results}->{speed} ne '') {
+            $interface_speed = $self->{option_results}->{speed} * 1000000;
+            $in_prct = $in_absolute_per_sec * 100 / ($self->{option_results}->{speed} * 1000000);
+            $out_prct = $out_absolute_per_sec * 100 / ($self->{option_results}->{speed} * 1000000);
+            if ($self->{option_results}->{units} eq '%') {
+                my $exit1 = $self->{perfdata}->threshold_check(value => $in_prct, threshold => [ { label => 'critical-in', 'exit_litteral' => 'critical' }, { label => 'warning-in', exit_litteral => 'warning' } ]);
+                my $exit2 = $self->{perfdata}->threshold_check(value => $out_prct, threshold => [ { label => 'critical-out', 'exit_litteral' => 'critical' }, { label => 'warning-out', exit_litteral => 'warning' } ]);
+                $exit = $self->{output}->get_most_critical(status => [ $exit1, $exit2 ]);
+            }
+            $in_prct = sprintf("%.2f", $in_prct);
+            $out_prct = sprintf("%.2f", $out_prct);
+        } else {
+            my $exit1 = $self->{perfdata}->threshold_check(value => $in_absolute_per_sec, threshold => [ { label => 'critical-in', 'exit_litteral' => 'critical' }, { label => 'warning-in', exit_litteral => 'warning' } ]);
+            my $exit2 = $self->{perfdata}->threshold_check(value => $out_absolute_per_sec, threshold => [ { label => 'critical-out', 'exit_litteral' => 'critical' }, { label => 'warning-out', exit_litteral => 'warning' } ]);
+            $exit = $self->{output}->get_most_critical(status => [ $exit1, $exit2 ]);
+            $in_prct = '-';
+            $out_prct = '-';
+        }
+       
+        ###########
+        # Manage Output
+        ###########
+        
+        my ($in_value, $in_unit) = $self->{perfdata}->change_bytes(value => $in_absolute_per_sec, network => 1);
+        my ($out_value, $out_unit) = $self->{perfdata}->change_bytes(value => $out_absolute_per_sec, network => 1);
+        $self->{output}->output_add(long_msg => sprintf("Connector '%s' Traffic In : %s/s (%s %%), Out : %s/s (%s %%) ", $name,
+                                       $in_value . $in_unit, $in_prct,
+                                       $out_value . $out_unit, $out_prct));
+        if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1) || (defined($self->{option_results}->{name}) && !defined($self->{option_results}->{use_regexp}))) {
+            $self->{output}->output_add(severity => $exit,
+                                        short_msg => sprintf("Connector '%s' Traffic In : %s/s (%s %%), Out : %s/s (%s %%) ", $name,
+                                            $in_value . $in_unit, $in_prct,
+                                            $out_value . $out_unit, $out_prct));
+        }
+
+        my $extra_label = '';
+        $extra_label = '_' . $name if (!defined($self->{option_results}->{name}) || defined($self->{option_results}->{use_regexp}));
+
+        $self->{output}->perfdata_add(label => 'traffic_in' . $extra_label, unit => 'b/s',
+                                      value => sprintf("%.2f", $in_absolute_per_sec),
+                                      warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-in', total => $interface_speed),
+                                      critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical-in', total => $interface_speed),
+                                      min => 0, max => $interface_speed);
+        $self->{output}->perfdata_add(label => 'traffic_out' . $extra_label, unit => 'b/s',
+                                      value => sprintf("%.2f", $out_absolute_per_sec),
+                                      warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-out', total => $interface_speed),
+                                      critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical-out', total => $interface_speed),
+                                      min => 0, max => $interface_speed);
+    }
+    
+    $self->{statefile_value}->write(data => $new_datas);    
+    if (!defined($old_timestamp)) {
+        $self->{output}->output_add(severity => 'OK',
+                                    short_msg => "Buffer creation...");
+    }
+
+    $self->{output}->display();
+    $self->{output}->exit();
+};
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check Tomcat Application Servers Traffic for each Connector
+
+=over 8
+
+=item B<--hostname>
+
+IP Address or FQDN of the Tomcat Application Server
+
+=item B<--port>
+
+Port used by Tomcat
+
+=item B<--proxyurl>
+
+Proxy URL if any
+
+=item B<--proto>
+
+Protocol used http or https
+
+=item B<--credentials>
+
+Specify this option if you access server-status page over basic authentification
+
+=item B<--username>
+
+Specify username for basic authentification (Mandatory if --credentials is specidied)
+
+=item B<--password>
+
+Specify password for basic authentification (Mandatory if --credentials is specidied)
+
+=item B<--timeout>
+
+Threshold for HTTP timeout
+
+=item B<--urlpath>
+
+Path to the Tomcat Manager XML (Default: '/manager/status?XML=true')
+
+=item B<--name>
+
+Set the filter name (empty means 'check all contexts')
+
+=item B<--regexp>
+
+Allows to use regexp to filter (with option --name).
+
+=item B<--regexp-isensitive>
+
+Allows to use regexp non case-sensitive (with --regexp).
+
+=item B<--warning-in>
+
+Threshold warning in percent for 'in' traffic.
+
+=item B<--critical-in>
+
+Threshold critical in percent for 'in' traffic.
+
+=item B<--warning-out>
+
+Threshold warning in percent for 'out' traffic.
+
+=item B<--critical-out>
+
+Threshold critical in percent for 'out' traffic.
+
+=item B<--speed>
+
+Set Connector Interface speed (in Mb).
+
+=back
+
+=cut
diff --git a/apps/tomcat/web/plugin.pm b/apps/tomcat/web/plugin.pm
index 37ffb7e3e..045a77f0d 100644
--- a/apps/tomcat/web/plugin.pm
+++ b/apps/tomcat/web/plugin.pm
@@ -31,8 +31,6 @@
 # For more information : contact@centreon.com
 # Author : Florian Asche 
 #
-# Based on De Bodt Lieven plugin
-# Based on Apache Mode by Simon BOMM
 ####################################################################################
 
 package apps::tomcat::web::plugin;
@@ -49,11 +47,13 @@ sub new {
 
 	$self->{version} = '0.1';
 	%{$self->{modes}} = (
-			'application'           => 'apps::tomcat::web::mode::application',
+			'applications'          => 'apps::tomcat::web::mode::applications',
 			'list-application'	=> 'apps::tomcat::web::mode::listapplication',
 			'sessions'              => 'apps::tomcat::web::mode::sessions',
 			'threads'               => 'apps::tomcat::web::mode::threads',
+			'requestinfo'           => 'apps::tomcat::web::mode::requestinfo',
 			'memory'                => 'apps::tomcat::web::mode::memory',
+			'traffic'               => 'apps::tomcat::web::mode::traffic',
 			);
 
 	return $self;
diff --git a/apps/varnish/local/mode/backend.pm b/apps/varnish/local/mode/backend.pm
new file mode 100644
index 000000000..88af36346
--- /dev/null
+++ b/apps/varnish/local/mode/backend.pm
@@ -0,0 +1,311 @@
+###############################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an timeelapsedutable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting timeelapsedutable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Author : Florian Asche 
+#
+####################################################################################
+
+package apps::varnish::local::mode::backend;
+
+use base qw(centreon::plugins::mode);
+use centreon::plugins::misc;
+use centreon::plugins::statefile;
+use Digest::MD5 qw(md5_hex);
+
+my $maps_counters = {
+    backend_conn   => { thresholds => {
+                                warning_conn  =>  { label => 'warning-conn', exit_value => 'warning' },
+                                critical_conn =>  { label => 'critical-conn', exit_value => 'critical' },
+                              },
+                output_msg => 'Backend conn. success: %.2f',
+                factor => 1, unit => '',
+               },
+    backend_unhealthy => { thresholds => {
+                                warning_unhealthy  =>  { label => 'warning-unhealthy', exit_value => 'warning' },
+                                critical_unhealthy =>  { label => 'critical-unhealthy', exit_value => 'critical' },
+                                },
+                 output_msg => 'Backend conn. not attempted: %.2f',
+                 factor => 1, unit => '',
+                },
+    backend_busy => { thresholds => {
+                                warning_busy    =>  { label => 'warning-busy', exit_value => 'warning' },
+                                critical_busy   =>  { label => 'critical-busy', exit_value => 'critical' },
+                                },
+                 output_msg => 'Backend conn. too many: %.2f',
+                 factor => 1, unit => '',
+               },
+    backend_fail => { thresholds => {
+                                warning_fail    =>  { label => 'warning-fail', exit_value => 'warning' },
+                                critical_fail   =>  { label => 'critical-fail', exit_value => 'critical' },
+                                },
+                 output_msg => 'Backend conn. failures: %.2f',
+                 factor => 1, unit => '',
+               },
+    backend_reuse => { thresholds => {
+                                warning_reuse    =>  { label => 'warning-reuse', exit_value => 'warning' },
+                                critical_reuse   =>  { label => 'critical-reuse', exit_value => 'critical' },
+                                },
+                 output_msg => 'Backend conn. reuses: %.2f',
+                 factor => 1, unit => '',
+               },
+    backend_toolate => { thresholds => {
+                                warning_toolate    =>  { label => 'warning-toolate', exit_value => 'warning' },
+                                critical_toolate   =>  { label => 'critical-toolate', exit_value => 'critical' },
+                                },
+                 output_msg => 'Backend conn. was closed: %.2f',
+                 factor => 1, unit => '',
+               },
+    backend_recycle => { thresholds => {
+                                warning_recycle    =>  { label => 'warning-recycle', exit_value => 'warning' },
+                                critical_recycle   =>  { label => 'critical-recycle', exit_value => 'critical' },
+                                },
+                 output_msg => 'Backend conn. recycles: %.2f',
+                 factor => 1, unit => '',
+               },
+    backend_retry => { thresholds => {
+                                warning_retry    =>  { label => 'warning-retry', exit_value => 'warning' },
+                                critical_retry   =>  { label => 'critical-retry', exit_value => 'critical' },
+                                },
+                 output_msg => 'Backend conn. retry: %.2f',
+                 factor => 1, unit => '',
+               },
+    backend_req => { thresholds => {
+                                warning_req    =>  { label => 'warning-req', exit_value => 'warning' },
+                                critical_req   =>  { label => 'critical-req', exit_value => 'critical' },
+                                },
+                 output_msg => 'Backend requests made: %.2f',
+                 factor => 1, unit => '',
+               },
+};
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+    {
+        "hostname:s"         => { name => 'hostname' },
+        "remote"             => { name => 'remote' },
+        "ssh-option:s@"      => { name => 'ssh_option' },
+        "ssh-path:s"         => { name => 'ssh_path' },
+        "ssh-command:s"      => { name => 'ssh_command', default => 'ssh' },
+        "timeout:s"          => { name => 'timeout', default => 30 },
+        "sudo"               => { name => 'sudo' },
+        "command:s"          => { name => 'command', default => 'varnishstat' },
+        "command-path:s"     => { name => 'command_path', default => '/usr/bin' },
+        "command-options:s"  => { name => 'command_options', default => ' -1 ' },
+        "command-options2:s" => { name => 'command_options2', default => ' 2>&1' },
+    });
+
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            $options{options}->add_options(arguments => {
+                $maps_counters->{$_}->{thresholds}->{$name}->{label} . ':s'    => { name => $name },
+            });
+        };
+    };
+
+    $self->{instances_done} = {};
+    $self->{statefile_value} = centreon::plugins::statefile->new(%options);
+    return $self;
+};
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+    
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            if (($self->{perfdata}->threshold_validate(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}, value => $self->{option_results}->{$name})) == 0) {
+                $self->{output}->add_option_msg(short_msg => "Wrong " . $maps_counters->{$_}->{thresholds}->{$name}->{label} . " threshold '" . $self->{option_results}->{$name} . "'.");
+                $self->{output}->option_exit();
+            };
+        };
+    };
+    $self->{statefile_value}->check_options(%options);
+};
+
+sub getdata {
+    my ($self, %options) = @_;
+
+    my $stdout = centreon::plugins::misc::execute(output => $self->{output},
+                                                  options => $self->{option_results},
+                                                  sudo => $self->{option_results}->{sudo},
+                                                  command => $self->{option_results}->{command},
+                                                  command_path => $self->{option_results}->{command_path},
+                                                  command_options => $self->{option_results}->{command_options} . $self->{option_results}->{command_options2});
+    #print $stdout;
+
+    foreach (split(/\n/, $stdout)) {
+        #client_conn            7390867         1.00 Client connections
+        # - Symbolic entry name
+        # - Value
+        # - Per-second average over process lifetime, or a period if the value can not be averaged
+        # - Descriptive text
+
+        if  (/^(.\S*)\s*([0-9]*)\s*([0-9.]*)\s(.*)$/i) {
+            #print "FOUND: " . $1 . "=" . $2 . "\n";
+            $self->{result}->{$1} = $2;
+        };
+    };
+};
+
+sub run {
+    my ($self, %options) = @_;
+
+    $self->getdata();
+
+    $self->{statefile_value}->read(statefile => 'cache_apps_varnish' . '_' . $self->{mode} . '_' . (defined($self->{option_results}->{name}) ? md5_hex($self->{option_results}->{name}) : md5_hex('all')));
+    $self->{result}->{last_timestamp} = time();
+    my $old_timestamp = $self->{statefile_value}->get(name => 'last_timestamp');
+    
+    # Calculate
+    my $delta_time = $self->{result}->{last_timestamp} - $old_timestamp;
+    $delta_time = 1 if ($delta_time == 0); # One seconds ;)
+
+    
+    foreach (keys %{$maps_counters}) {
+        #print $_ . "\n";
+        $self->{old_cache}->{$_} = $self->{statefile_value}->get(name => '$_');     # Get Data from Cache
+        $self->{old_cache}->{$_} = 0 if ( $self->{old_cache}->{$_} > $self->{result}->{$_} );
+        $self->{outputdata}->{$_} = ($self->{result}->{$_} - $self->{old_cache}->{$_}) / $delta_time;
+    };
+
+    # Write Cache if not there
+    $self->{statefile_value}->write(data => $self->{result}); 
+    if (!defined($old_timestamp)) {
+        $self->{output}->output_add(severity => 'OK',
+                                    short_msg => "Buffer creation...");
+        $self->{output}->display();
+        $self->{output}->exit();
+    }
+
+    my @exits;
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            push @exits, $self->{perfdata}->threshold_check(value => $self->{outputdata}->{$_}, threshold => [ { label => $maps_counters->{$_}->{thresholds}->{$name}->{label}, 'exit_litteral' => $maps_counters->{$_}->{thresholds}->{$name}->{exit_value} }]);
+        }
+    }
+
+    my $exit = $self->{output}->get_most_critical(status => [ @exits ]);
+    
+
+    my $extra_label = '';
+    $extra_label = '_' . $instance_output if ($num > 1);
+
+    my $str_output = "";
+    my $str_append = '';
+    foreach (keys %{$maps_counters}) {
+        $str_output .= $str_append . sprintf($maps_counters->{$_}->{output_msg}, $self->{outputdata}->{$_} * $maps_counters->{$_}->{factor});
+        $str_append = ', ';
+        my ($warning, $critical);
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            $warning = $self->{perfdata}->get_perfdata_for_output(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}) if ($maps_counters->{$_}->{thresholds}->{$name}->{exit_value} eq 'warning');
+            $critical = $self->{perfdata}->get_perfdata_for_output(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}) if ($maps_counters->{$_}->{thresholds}->{$name}->{exit_value} eq 'critical');
+        }
+        $self->{output}->perfdata_add(label => $_ . $extra_label, unit => $maps_counters->{$_}->{unit},
+                                        value => sprintf("%.2f", $self->{outputdata}->{$_} * $maps_counters->{$_}->{factor}),
+                                        warning => $warning,
+                                        critical => $critical);
+    }
+    $self->{output}->output_add(severity => $exit,
+                                short_msg => $str_output);
+
+    $self->{output}->display();
+    $self->{output}->exit();
+};
+
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check Varnish Cache with varnishstat Command
+
+=over 8
+
+=item B<--remote>
+
+If you dont run this script locally, if you wanna use it remote, you can run it remotely with 'ssh'.
+
+=item B<--hostname>
+
+Hostname to query (need --remote).
+
+=item B<--ssh-option>
+
+Specify multiple options like the user (example: --ssh-option='-l=centreon-engine' --ssh-option='-p=52').
+
+=item B<--command>
+
+Varnishstat Binary Filename (Default: varnishstat)
+
+=item B<--command-path>
+
+Directory Path to Varnishstat Binary File (Default: /usr/bin)
+
+=item B<--command-options>
+
+Parameter for Binary File (Default: ' -1 ')
+
+=item B<--warning-*>
+
+Warning Threshold for: 
+conn      => Backend conn. success,
+unhealthy => Backend conn. not attempted,
+busy      => Backend conn. too many,
+fail      => Backend conn. failures,
+reuse     => Backend conn. reuses,
+toolate   => Backend conn. was closed,
+recycle   => Backend conn. recycles,
+retry     => Backend conn. retry,
+req       => Backend requests made
+
+=item B<--critical-*>
+
+Critical Threshold for: 
+conn      => Backend conn. success,
+unhealthy => Backend conn. not attempted,
+busy      => Backend conn. too many,
+fail      => Backend conn. failures,
+reuse     => Backend conn. reuses,
+toolate   => Backend conn. was closed,
+recycle   => Backend conn. recycles,
+retry     => Backend conn. retry,
+req       => Backend requests made
+
+=back
+
+=cut
\ No newline at end of file
diff --git a/apps/varnish/local/mode/bans.pm b/apps/varnish/local/mode/bans.pm
new file mode 100644
index 000000000..fe52eca53
--- /dev/null
+++ b/apps/varnish/local/mode/bans.pm
@@ -0,0 +1,284 @@
+###############################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an timeelapsedutable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting timeelapsedutable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Author : Florian Asche 
+#
+####################################################################################
+
+package apps::varnish::local::mode::bans;
+
+use base qw(centreon::plugins::mode);
+use centreon::plugins::misc;
+use centreon::plugins::statefile;
+use Digest::MD5 qw(md5_hex);
+
+my $maps_counters = {
+    n_ban   => { thresholds => {
+                                warning_total  =>  { label => 'warning-total', exit_value => 'warning' },
+                                critical_total =>  { label => 'critical-total', exit_value => 'critical' },
+                              },
+                output_msg => 'N total active bans: %.2f',
+                factor => 1, unit => '',
+               },
+    n_ban_add => { thresholds => {
+                                warning_add  =>  { label => 'warning-add', exit_value => 'warning' },
+                                critical_add =>  { label => 'critical-add', exit_value => 'critical' },
+                                },
+                 output_msg => 'N new bans added: %.2f',
+                 factor => 1, unit => '',
+                },
+    n_ban_retire => { thresholds => {
+                                warning_retire    =>  { label => 'warning-retire', exit_value => 'warning' },
+                                critical_retire   =>  { label => 'critical-retire', exit_value => 'critical' },
+                                },
+                 output_msg => 'N old bans deleted: %.2f',
+                 factor => 1, unit => '',
+               },
+    n_ban_obj_test => { thresholds => {
+                                warning_objtest    =>  { label => 'warning-objtest', exit_value => 'warning' },
+                                critical_objtest   =>  { label => 'critical-objtest', exit_value => 'critical' },
+                                },
+                 output_msg => 'N objects tested: %.2f',
+                 factor => 1, unit => '',
+               },
+    n_ban_re_test => { thresholds => {
+                                warning_retest    =>  { label => 'warning-retest', exit_value => 'warning' },
+                                critical_retest   =>  { label => 'critical-retest', exit_value => 'critical' },
+                                },
+                 output_msg => 'N regexps tested against: %.2f',
+                 factor => 1, unit => '',
+               },
+    n_ban_dups => { thresholds => {
+                                warning_dups    =>  { label => 'warning-dups', exit_value => 'warning' },
+                                critical_dups   =>  { label => 'critical-dups', exit_value => 'critical' },
+                                },
+                 output_msg => 'N duplicate bans removed: %.2f',
+                 factor => 1, unit => '',
+               },
+};
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+    {
+        "hostname:s"         => { name => 'hostname' },
+        "remote"             => { name => 'remote' },
+        "ssh-option:s@"      => { name => 'ssh_option' },
+        "ssh-path:s"         => { name => 'ssh_path' },
+        "ssh-command:s"      => { name => 'ssh_command', default => 'ssh' },
+        "timeout:s"          => { name => 'timeout', default => 30 },
+        "sudo"               => { name => 'sudo' },
+        "command:s"          => { name => 'command', default => 'varnishstat' },
+        "command-path:s"     => { name => 'command_path', default => '/usr/bin' },
+        "command-options:s"  => { name => 'command_options', default => ' -1 ' },
+        "command-options2:s" => { name => 'command_options2', default => ' 2>&1' },
+    });
+
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            $options{options}->add_options(arguments => {
+                $maps_counters->{$_}->{thresholds}->{$name}->{label} . ':s'    => { name => $name },
+            });
+        };
+    };
+
+    $self->{instances_done} = {};
+    $self->{statefile_value} = centreon::plugins::statefile->new(%options);
+    return $self;
+};
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+    
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            if (($self->{perfdata}->threshold_validate(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}, value => $self->{option_results}->{$name})) == 0) {
+                $self->{output}->add_option_msg(short_msg => "Wrong " . $maps_counters->{$_}->{thresholds}->{$name}->{label} . " threshold '" . $self->{option_results}->{$name} . "'.");
+                $self->{output}->option_exit();
+            };
+        };
+    };
+    $self->{statefile_value}->check_options(%options);
+};
+
+sub getdata {
+    my ($self, %options) = @_;
+
+    my $stdout = centreon::plugins::misc::execute(output => $self->{output},
+                                                  options => $self->{option_results},
+                                                  sudo => $self->{option_results}->{sudo},
+                                                  command => $self->{option_results}->{command},
+                                                  command_path => $self->{option_results}->{command_path},
+                                                  command_options => $self->{option_results}->{command_options} . $self->{option_results}->{command_options2});
+    #print $stdout;
+
+    foreach (split(/\n/, $stdout)) {
+        #client_conn            7390867         1.00 Client connections
+        # - Symbolic entry name
+        # - Value
+        # - Per-second average over process lifetime, or a period if the value can not be averaged
+        # - Descriptive text
+
+        if  (/^(.\S*)\s*([0-9]*)\s*([0-9.]*)\s(.*)$/i) {
+            #print "FOUND: " . $1 . "=" . $2 . "\n";
+            $self->{result}->{$1} = $2;
+        };
+    };
+};
+
+sub run {
+    my ($self, %options) = @_;
+
+    $self->getdata();
+
+    $self->{statefile_value}->read(statefile => 'cache_apps_varnish' . '_' . $self->{mode} . '_' . (defined($self->{option_results}->{name}) ? md5_hex($self->{option_results}->{name}) : md5_hex('all')));
+    $self->{result}->{last_timestamp} = time();
+    my $old_timestamp = $self->{statefile_value}->get(name => 'last_timestamp');
+    
+    # Calculate
+    my $delta_time = $self->{result}->{last_timestamp} - $old_timestamp;
+    $delta_time = 1 if ($delta_time == 0); # One seconds ;)
+
+    
+    foreach (keys %{$maps_counters}) {
+        #print $_ . "\n";
+        $self->{old_cache}->{$_} = $self->{statefile_value}->get(name => '$_');     # Get Data from Cache
+        $self->{old_cache}->{$_} = 0 if ( $self->{old_cache}->{$_} > $self->{result}->{$_} );
+        $self->{outputdata}->{$_} = ($self->{result}->{$_} - $self->{old_cache}->{$_}) / $delta_time;
+    };
+
+    # Write Cache if not there
+    $self->{statefile_value}->write(data => $self->{result}); 
+    if (!defined($old_timestamp)) {
+        $self->{output}->output_add(severity => 'OK',
+                                    short_msg => "Buffer creation...");
+        $self->{output}->display();
+        $self->{output}->exit();
+    }
+
+    my @exits;
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            push @exits, $self->{perfdata}->threshold_check(value => $self->{outputdata}->{$_}, threshold => [ { label => $maps_counters->{$_}->{thresholds}->{$name}->{label}, 'exit_litteral' => $maps_counters->{$_}->{thresholds}->{$name}->{exit_value} }]);
+        }
+    }
+
+    my $exit = $self->{output}->get_most_critical(status => [ @exits ]);
+    
+
+    my $extra_label = '';
+    $extra_label = '_' . $instance_output if ($num > 1);
+
+    my $str_output = "";
+    my $str_append = '';
+    foreach (keys %{$maps_counters}) {
+        $str_output .= $str_append . sprintf($maps_counters->{$_}->{output_msg}, $self->{outputdata}->{$_} * $maps_counters->{$_}->{factor});
+        $str_append = ', ';
+        my ($warning, $critical);
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            $warning = $self->{perfdata}->get_perfdata_for_output(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}) if ($maps_counters->{$_}->{thresholds}->{$name}->{exit_value} eq 'warning');
+            $critical = $self->{perfdata}->get_perfdata_for_output(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}) if ($maps_counters->{$_}->{thresholds}->{$name}->{exit_value} eq 'critical');
+        }
+        $self->{output}->perfdata_add(label => $_ . $extra_label, unit => $maps_counters->{$_}->{unit},
+                                        value => sprintf("%.2f", $self->{outputdata}->{$_} * $maps_counters->{$_}->{factor}),
+                                        warning => $warning,
+                                        critical => $critical);
+    }
+    $self->{output}->output_add(severity => $exit,
+                                short_msg => $str_output);
+
+    $self->{output}->display();
+    $self->{output}->exit();
+};
+
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check Varnish Cache with varnishstat Command
+
+=over 8
+
+=item B<--remote>
+
+If you dont run this script locally, if you wanna use it remote, you can run it remotely with 'ssh'.
+
+=item B<--hostname>
+
+Hostname to query (need --remote).
+
+=item B<--ssh-option>
+
+Specify multiple options like the user (example: --ssh-option='-l=centreon-engine' --ssh-option='-p=52').
+
+=item B<--command>
+
+Varnishstat Binary Filename (Default: varnishstat)
+
+=item B<--command-path>
+
+Directory Path to Varnishstat Binary File (Default: /usr/bin)
+
+=item B<--command-options>
+
+Parameter for Binary File (Default: ' -1 ')
+
+=item B<--warning-*>
+
+Warning Threshold for: 
+total    => N total active bans,
+add      => N new bans added,
+retire   => N old bans deleted,
+objtest  => N objects tested,
+retest   => N regexps tested against,
+dups     => N duplicate bans removed
+
+=item B<--critical-*>
+
+Critical Threshold for: 
+total    => N total active bans,
+add      => N new bans added,
+retire   => N old bans deleted,
+objtest  => N objects tested,
+retest   => N regexps tested against,
+dups     => N duplicate bans removed
+
+=back
+
+=cut
\ No newline at end of file
diff --git a/apps/varnish/local/mode/cache.pm b/apps/varnish/local/mode/cache.pm
new file mode 100644
index 000000000..1e2024fca
--- /dev/null
+++ b/apps/varnish/local/mode/cache.pm
@@ -0,0 +1,263 @@
+###############################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an timeelapsedutable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting timeelapsedutable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Author : Florian Asche 
+#
+####################################################################################
+
+package apps::varnish::local::mode::cache;
+
+use base qw(centreon::plugins::mode);
+use centreon::plugins::misc;
+use centreon::plugins::statefile;
+use Digest::MD5 qw(md5_hex);
+
+my $maps_counters = {
+    cache_hit   => { thresholds => {
+                                warning_hit  =>  { label => 'warning-hit', exit_value => 'warning' },
+                                critical_hit =>  { label => 'critical-hit', exit_value => 'critical' },
+                              },
+                output_msg => 'Cache Hits: %.2f',
+                factor => 1, unit => '',
+               },
+    cache_hitpass => { thresholds => {
+                                warning_hitpass  =>  { label => 'warning-hitpass', exit_value => 'warning' },
+                                critical_hitpass =>  { label => 'critical-hitpass', exit_value => 'critical' },
+                                },
+                 output_msg => 'Cache Hits for pass: %.2f',
+                 factor => 1, unit => '',
+                },
+    cache_miss => { thresholds => {
+                                warning_miss    =>  { label => 'warning-miss', exit_value => 'warning' },
+                                critical_miss   =>  { label => 'critical-miss', exit_value => 'critical' },
+                                },
+                 output_msg => 'Cache misses: %.2f',
+                 factor => 1, unit => '',
+               },
+};
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+    {
+        "hostname:s"         => { name => 'hostname' },
+        "remote"             => { name => 'remote' },
+        "ssh-option:s@"      => { name => 'ssh_option' },
+        "ssh-path:s"         => { name => 'ssh_path' },
+        "ssh-command:s"      => { name => 'ssh_command', default => 'ssh' },
+        "timeout:s"          => { name => 'timeout', default => 30 },
+        "sudo"               => { name => 'sudo' },
+        "command:s"          => { name => 'command', default => 'varnishstat' },
+        "command-path:s"     => { name => 'command_path', default => '/usr/bin' },
+        "command-options:s"  => { name => 'command_options', default => ' -1 ' },
+        "command-options2:s" => { name => 'command_options2', default => ' 2>&1' },
+    });
+
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            $options{options}->add_options(arguments => {
+                $maps_counters->{$_}->{thresholds}->{$name}->{label} . ':s'    => { name => $name },
+            });
+        };
+    };
+
+    $self->{instances_done} = {};
+    $self->{statefile_value} = centreon::plugins::statefile->new(%options);
+    return $self;
+};
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+    
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            if (($self->{perfdata}->threshold_validate(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}, value => $self->{option_results}->{$name})) == 0) {
+                $self->{output}->add_option_msg(short_msg => "Wrong " . $maps_counters->{$_}->{thresholds}->{$name}->{label} . " threshold '" . $self->{option_results}->{$name} . "'.");
+                $self->{output}->option_exit();
+            };
+        };
+    };
+    $self->{statefile_value}->check_options(%options);
+};
+
+#my $stdout = '
+#cache_hit                69941         0.00 Cache hits
+#cache_hitpass               10         0.00 Cache hits for pass
+#cache_miss               16746         0.00 Cache misses
+#';
+
+sub getdata {
+    my ($self, %options) = @_;
+
+    my $stdout = centreon::plugins::misc::execute(output => $self->{output},
+                                                  options => $self->{option_results},
+                                                  sudo => $self->{option_results}->{sudo},
+                                                  command => $self->{option_results}->{command},
+                                                  command_path => $self->{option_results}->{command_path},
+                                                  command_options => $self->{option_results}->{command_options} . $self->{option_results}->{command_options2});
+    #print $stdout;
+
+    foreach (split(/\n/, $stdout)) {
+        #client_conn            7390867         1.00 Client connections
+        # - Symbolic entry name
+        # - Value
+        # - Per-second average over process lifetime, or a period if the value can not be averaged
+        # - Descriptive text
+
+        if  (/^(.\S*)\s*([0-9]*)\s*([0-9.]*)\s(.*)$/i) {
+            #print "FOUND: " . $1 . "=" . $2 . "\n";
+            $self->{result}->{$1} = $2;
+        };
+    };
+};
+
+sub run {
+    my ($self, %options) = @_;
+
+    $self->getdata();
+
+    $self->{statefile_value}->read(statefile => 'cache_apps_varnish' . '_' . $self->{mode} . '_' . (defined($self->{option_results}->{name}) ? md5_hex($self->{option_results}->{name}) : md5_hex('all')));
+    $self->{result}->{last_timestamp} = time();
+    my $old_timestamp = $self->{statefile_value}->get(name => 'last_timestamp');
+    
+    # Calculate
+    my $delta_time = $self->{result}->{last_timestamp} - $old_timestamp;
+    $delta_time = 1 if ($delta_time == 0); # One seconds ;)
+
+    
+    foreach (keys %{$maps_counters}) {
+        #print $_ . "\n";
+        $self->{old_cache}->{$_} = $self->{statefile_value}->get(name => '$_');     # Get Data from Cache
+        $self->{old_cache}->{$_} = 0 if ( $self->{old_cache}->{$_} > $self->{result}->{$_} );
+        $self->{outputdata}->{$_} = ($self->{result}->{$_} - $self->{old_cache}->{$_}) / $delta_time;
+    };
+
+    # Write Cache if not there
+    $self->{statefile_value}->write(data => $self->{result}); 
+    if (!defined($old_timestamp)) {
+        $self->{output}->output_add(severity => 'OK',
+                                    short_msg => "Buffer creation...");
+        $self->{output}->display();
+        $self->{output}->exit();
+    }
+
+    my @exits;
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            push @exits, $self->{perfdata}->threshold_check(value => $self->{outputdata}->{$_}, threshold => [ { label => $maps_counters->{$_}->{thresholds}->{$name}->{label}, 'exit_litteral' => $maps_counters->{$_}->{thresholds}->{$name}->{exit_value} }]);
+        }
+    }
+
+    my $exit = $self->{output}->get_most_critical(status => [ @exits ]);
+    
+
+    my $extra_label = '';
+    $extra_label = '_' . $instance_output if ($num > 1);
+
+    my $str_output = "";
+    my $str_append = '';
+    foreach (keys %{$maps_counters}) {
+        $str_output .= $str_append . sprintf($maps_counters->{$_}->{output_msg}, $self->{outputdata}->{$_} * $maps_counters->{$_}->{factor});
+        $str_append = ', ';
+        my ($warning, $critical);
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            $warning = $self->{perfdata}->get_perfdata_for_output(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}) if ($maps_counters->{$_}->{thresholds}->{$name}->{exit_value} eq 'warning');
+            $critical = $self->{perfdata}->get_perfdata_for_output(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}) if ($maps_counters->{$_}->{thresholds}->{$name}->{exit_value} eq 'critical');
+        }
+        $self->{output}->perfdata_add(label => $_ . $extra_label, unit => $maps_counters->{$_}->{unit},
+                                        value => sprintf("%.2f", $self->{outputdata}->{$_} * $maps_counters->{$_}->{factor}),
+                                        warning => $warning,
+                                        critical => $critical);
+    }
+    $self->{output}->output_add(severity => $exit,
+                                short_msg => $str_output);
+
+    $self->{output}->display();
+    $self->{output}->exit();
+};
+
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check Varnish Cache with varnishstat Command
+
+=over 8
+
+=item B<--remote>
+
+If you dont run this script locally, if you wanna use it remote, you can run it remotely with 'ssh'.
+
+=item B<--hostname>
+
+Hostname to query (need --remote).
+
+=item B<--ssh-option>
+
+Specify multiple options like the user (example: --ssh-option='-l=centreon-engine' --ssh-option='-p=52').
+
+=item B<--command>
+
+Varnishstat Binary Filename (Default: varnishstat)
+
+=item B<--command-path>
+
+Directory Path to Varnishstat Binary File (Default: /usr/bin)
+
+=item B<--command-options>
+
+Parameter for Binary File (Default: ' -1 ')
+
+=item B<--warning-*>
+
+Warning Threshold for:
+hit     => Cache Hits,
+hitpass => Cache hits for Pass,
+miss    => Cache Misses
+
+=item B<--critical-*>
+
+Critical Threshold for:
+hit     => Cache Hits,
+hitpass => Cache hits for Pass,
+miss    => Cache Misses
+
+=back
+
+=cut
\ No newline at end of file
diff --git a/apps/varnish/local/mode/connections.pm b/apps/varnish/local/mode/connections.pm
new file mode 100644
index 000000000..eeaf2f383
--- /dev/null
+++ b/apps/varnish/local/mode/connections.pm
@@ -0,0 +1,266 @@
+###############################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an timeelapsedutable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting timeelapsedutable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Author : Florian Asche 
+#
+####################################################################################
+
+package apps::varnish::local::mode::connections;
+
+use base qw(centreon::plugins::mode);
+use centreon::plugins::misc;
+use centreon::plugins::statefile;
+use Digest::MD5 qw(md5_hex);
+
+my $maps_counters = {
+    client_conn   => { thresholds => {
+                                warning_conn  =>  { label => 'warning-conn', exit_value => 'warning' },
+                                critical_conn =>  { label => 'critical-conn', exit_value => 'critical' },
+                              },
+                output_msg => 'Client connections accepted: %.2f',
+                factor => 1, unit => '',
+               },
+    client_drop => { thresholds => {
+                                warning_drop  =>  { label => 'warning-drop', exit_value => 'warning' },
+                                critical_drop =>  { label => 'critical-drop', exit_value => 'critical' },
+                                },
+                 output_msg => 'Connection dropped, no sess/wrk: %.2f',
+                 factor => 1, unit => '',
+                },
+    client_drop_late => { thresholds => {
+                                warning_droplate  =>  { label => 'warning-droplate', exit_value => 'warning' },
+                                critical_droplate =>  { label => 'critical-droplate', exit_value => 'critical' },
+                                },
+                 output_msg => 'Connection dropped late: %.2f',
+                 factor => 1, unit => '',
+                },
+    client_req => { thresholds => {
+                                warning_req    =>  { label => 'warning-req', exit_value => 'warning' },
+                                critical_req   =>  { label => 'critical-req', exit_value => 'critical' },
+                                },
+                 output_msg => 'Client requests received: %.2f',
+                 factor => 1, unit => '',
+               },
+};
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+    {
+        "hostname:s"         => { name => 'hostname' },
+        "remote"             => { name => 'remote' },
+        "ssh-option:s@"      => { name => 'ssh_option' },
+        "ssh-path:s"         => { name => 'ssh_path' },
+        "ssh-command:s"      => { name => 'ssh_command', default => 'ssh' },
+        "timeout:s"          => { name => 'timeout', default => 30 },
+        "sudo"               => { name => 'sudo' },
+        "command:s"          => { name => 'command', default => 'varnishstat' },
+        "command-path:s"     => { name => 'command_path', default => '/usr/bin' },
+        "command-options:s"  => { name => 'command_options', default => ' -1 ' },
+        "command-options2:s" => { name => 'command_options2', default => ' 2>&1' },
+    });
+
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            $options{options}->add_options(arguments => {
+                $maps_counters->{$_}->{thresholds}->{$name}->{label} . ':s'    => { name => $name },
+            });
+        };
+    };
+
+    $self->{instances_done} = {};
+    $self->{statefile_value} = centreon::plugins::statefile->new(%options);
+    return $self;
+};
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+    
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            if (($self->{perfdata}->threshold_validate(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}, value => $self->{option_results}->{$name})) == 0) {
+                $self->{output}->add_option_msg(short_msg => "Wrong " . $maps_counters->{$_}->{thresholds}->{$name}->{label} . " threshold '" . $self->{option_results}->{$name} . "'.");
+                $self->{output}->option_exit();
+            };
+        };
+    };
+    $self->{statefile_value}->check_options(%options);
+};
+
+sub getdata {
+    my ($self, %options) = @_;
+
+    my $stdout = centreon::plugins::misc::execute(output => $self->{output},
+                                                  options => $self->{option_results},
+                                                  sudo => $self->{option_results}->{sudo},
+                                                  command => $self->{option_results}->{command},
+                                                  command_path => $self->{option_results}->{command_path},
+                                                  command_options => $self->{option_results}->{command_options} . $self->{option_results}->{command_options2});
+    #print $stdout;
+
+    foreach (split(/\n/, $stdout)) {
+        #client_conn            7390867         1.00 Client connections
+        # - Symbolic entry name
+        # - Value
+        # - Per-second average over process lifetime, or a period if the value can not be averaged
+        # - Descriptive text
+
+        if  (/^(.\S*)\s*([0-9]*)\s*([0-9.]*)\s(.*)$/i) {
+            #print "FOUND: " . $1 . "=" . $2 . "\n";
+            $self->{result}->{$1} = $2;
+        };
+    };
+};
+
+sub run {
+    my ($self, %options) = @_;
+
+    $self->getdata();
+
+    $self->{statefile_value}->read(statefile => 'cache_apps_varnish' . '_' . $self->{mode} . '_' . (defined($self->{option_results}->{name}) ? md5_hex($self->{option_results}->{name}) : md5_hex('all')));
+    $self->{result}->{last_timestamp} = time();
+    my $old_timestamp = $self->{statefile_value}->get(name => 'last_timestamp');
+    
+    # Calculate
+    my $delta_time = $self->{result}->{last_timestamp} - $old_timestamp;
+    $delta_time = 1 if ($delta_time == 0); # One seconds ;)
+
+    
+    foreach (keys %{$maps_counters}) {
+        #print $_ . "\n";
+        $self->{old_cache}->{$_} = $self->{statefile_value}->get(name => '$_');     # Get Data from Cache
+        $self->{old_cache}->{$_} = 0 if ( $self->{old_cache}->{$_} > $self->{result}->{$_} );
+        $self->{outputdata}->{$_} = ($self->{result}->{$_} - $self->{old_cache}->{$_}) / $delta_time;
+    };
+
+    # Write Cache if not there
+    $self->{statefile_value}->write(data => $self->{result}); 
+    if (!defined($old_timestamp)) {
+        $self->{output}->output_add(severity => 'OK',
+                                    short_msg => "Buffer creation...");
+        $self->{output}->display();
+        $self->{output}->exit();
+    }
+
+    my @exits;
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            push @exits, $self->{perfdata}->threshold_check(value => $self->{outputdata}->{$_}, threshold => [ { label => $maps_counters->{$_}->{thresholds}->{$name}->{label}, 'exit_litteral' => $maps_counters->{$_}->{thresholds}->{$name}->{exit_value} }]);
+        }
+    }
+
+    my $exit = $self->{output}->get_most_critical(status => [ @exits ]);
+    
+
+    my $extra_label = '';
+    $extra_label = '_' . $instance_output if ($num > 1);
+
+    my $str_output = "";
+    my $str_append = '';
+    foreach (keys %{$maps_counters}) {
+        $str_output .= $str_append . sprintf($maps_counters->{$_}->{output_msg}, $self->{outputdata}->{$_} * $maps_counters->{$_}->{factor});
+        $str_append = ', ';
+        my ($warning, $critical);
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            $warning = $self->{perfdata}->get_perfdata_for_output(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}) if ($maps_counters->{$_}->{thresholds}->{$name}->{exit_value} eq 'warning');
+            $critical = $self->{perfdata}->get_perfdata_for_output(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}) if ($maps_counters->{$_}->{thresholds}->{$name}->{exit_value} eq 'critical');
+        }
+        $self->{output}->perfdata_add(label => $_ . $extra_label, unit => $maps_counters->{$_}->{unit},
+                                        value => sprintf("%.2f", $self->{outputdata}->{$_} * $maps_counters->{$_}->{factor}),
+                                        warning => $warning,
+                                        critical => $critical);
+    }
+    $self->{output}->output_add(severity => $exit,
+                                short_msg => $str_output);
+
+    $self->{output}->display();
+    $self->{output}->exit();
+};
+
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check Varnish Cache with varnishstat Command
+
+=over 8
+
+=item B<--remote>
+
+If you dont run this script locally, if you wanna use it remote, you can run it remotely with 'ssh'.
+
+=item B<--hostname>
+
+Hostname to query (need --remote).
+
+=item B<--ssh-option>
+
+Specify multiple options like the user (example: --ssh-option='-l=centreon-engine' --ssh-option='-p=52').
+
+=item B<--command>
+
+Varnishstat Binary Filename (Default: varnishstat)
+
+=item B<--command-path>
+
+Directory Path to Varnishstat Binary File (Default: /usr/bin)
+
+=item B<--command-options>
+
+Parameter for Binary File (Default: ' -1 ')
+
+=item B<--warning-*>
+
+Warning Threshold for:
+conn     => Client connections accepted,
+drop     => Connection dropped, no sess/wrk,
+droplate => Connection dropped late,
+req      => Client requests received
+
+=item B<--critical-*>
+
+Critical Threshold for:
+conn     => Client connections accepted,
+drop     => Connection dropped, no sess/wrk,
+droplate => Connection dropped late,
+req      => Client requests received
+
+=back
+
+=cut
\ No newline at end of file
diff --git a/apps/varnish/local/mode/dns.pm b/apps/varnish/local/mode/dns.pm
new file mode 100644
index 000000000..b963aa21a
--- /dev/null
+++ b/apps/varnish/local/mode/dns.pm
@@ -0,0 +1,266 @@
+###############################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an timeelapsedutable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting timeelapsedutable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Author : Florian Asche 
+#
+####################################################################################
+
+package apps::varnish::local::mode::dns;
+
+use base qw(centreon::plugins::mode);
+use centreon::plugins::misc;
+use centreon::plugins::statefile;
+use Digest::MD5 qw(md5_hex);
+
+my $maps_counters = {
+    dir_dns_lookups   => { thresholds => {
+                                warning_lookups  =>  { label => 'warning-lookups', exit_value => 'warning' },
+                                critical_lookups =>  { label => 'critical-lookups', exit_value => 'critical' },
+                              },
+                output_msg => 'HCB Lookups without lock: %.2f',
+                factor => 1, unit => '',
+               },
+    dir_dns_failed => { thresholds => {
+                                warning_failed  =>  { label => 'warning-failed', exit_value => 'warning' },
+                                critical_failed =>  { label => 'critical-failed', exit_value => 'critical' },
+                                },
+                 output_msg => 'HCB Lookups with lock: %.2f',
+                 factor => 1, unit => '',
+                },
+    dir_dns_hit => { thresholds => {
+                                warning_hit    =>  { label => 'warning-hit', exit_value => 'warning' },
+                                critical_hit   =>  { label => 'critical-hit', exit_value => 'critical' },
+                                },
+                 output_msg => 'HCB Inserts: %.2f',
+                 factor => 1, unit => '',
+               },
+    dir_dns_cache_full => { thresholds => {
+                                warning_full    =>  { label => 'warning-full', exit_value => 'warning' },
+                                critical_full   =>  { label => 'critical-full', exit_value => 'critical' },
+                                },
+                 output_msg => 'HCB Inserts: %.2f',
+                 factor => 1, unit => '',
+               },
+};
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+    {
+        "hostname:s"         => { name => 'hostname' },
+        "remote"             => { name => 'remote' },
+        "ssh-option:s@"      => { name => 'ssh_option' },
+        "ssh-path:s"         => { name => 'ssh_path' },
+        "ssh-command:s"      => { name => 'ssh_command', default => 'ssh' },
+        "timeout:s"          => { name => 'timeout', default => 30 },
+        "sudo"               => { name => 'sudo' },
+        "command:s"          => { name => 'command', default => 'varnishstat' },
+        "command-path:s"     => { name => 'command_path', default => '/usr/bin' },
+        "command-options:s"  => { name => 'command_options', default => ' -1 ' },
+        "command-options2:s" => { name => 'command_options2', default => ' 2>&1' },
+    });
+
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            $options{options}->add_options(arguments => {
+                $maps_counters->{$_}->{thresholds}->{$name}->{label} . ':s'    => { name => $name },
+            });
+        };
+    };
+
+    $self->{instances_done} = {};
+    $self->{statefile_value} = centreon::plugins::statefile->new(%options);
+    return $self;
+};
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+    
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            if (($self->{perfdata}->threshold_validate(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}, value => $self->{option_results}->{$name})) == 0) {
+                $self->{output}->add_option_msg(short_msg => "Wrong " . $maps_counters->{$_}->{thresholds}->{$name}->{label} . " threshold '" . $self->{option_results}->{$name} . "'.");
+                $self->{output}->option_exit();
+            };
+        };
+    };
+    $self->{statefile_value}->check_options(%options);
+};
+
+sub getdata {
+    my ($self, %options) = @_;
+
+    my $stdout = centreon::plugins::misc::execute(output => $self->{output},
+                                                  options => $self->{option_results},
+                                                  sudo => $self->{option_results}->{sudo},
+                                                  command => $self->{option_results}->{command},
+                                                  command_path => $self->{option_results}->{command_path},
+                                                  command_options => $self->{option_results}->{command_options} . $self->{option_results}->{command_options2});
+    #print $stdout;
+
+    foreach (split(/\n/, $stdout)) {
+        #client_conn            7390867         1.00 Client connections
+        # - Symbolic entry name
+        # - Value
+        # - Per-second average over process lifetime, or a period if the value can not be averaged
+        # - Descriptive text
+
+        if  (/^(.\S*)\s*([0-9]*)\s*([0-9.]*)\s(.*)$/i) {
+            #print "FOUND: " . $1 . "=" . $2 . "\n";
+            $self->{result}->{$1} = $2;
+        };
+    };
+};
+
+sub run {
+    my ($self, %options) = @_;
+
+    $self->getdata();
+
+    $self->{statefile_value}->read(statefile => 'cache_apps_varnish' . '_' . $self->{mode} . '_' . (defined($self->{option_results}->{name}) ? md5_hex($self->{option_results}->{name}) : md5_hex('all')));
+    $self->{result}->{last_timestamp} = time();
+    my $old_timestamp = $self->{statefile_value}->get(name => 'last_timestamp');
+    
+    # Calculate
+    my $delta_time = $self->{result}->{last_timestamp} - $old_timestamp;
+    $delta_time = 1 if ($delta_time == 0); # One seconds ;)
+
+    
+    foreach (keys %{$maps_counters}) {
+        #print $_ . "\n";
+        $self->{old_cache}->{$_} = $self->{statefile_value}->get(name => '$_');     # Get Data from Cache
+        $self->{old_cache}->{$_} = 0 if ( $self->{old_cache}->{$_} > $self->{result}->{$_} );
+        $self->{outputdata}->{$_} = ($self->{result}->{$_} - $self->{old_cache}->{$_}) / $delta_time;
+    };
+
+    # Write Cache if not there
+    $self->{statefile_value}->write(data => $self->{result}); 
+    if (!defined($old_timestamp)) {
+        $self->{output}->output_add(severity => 'OK',
+                                    short_msg => "Buffer creation...");
+        $self->{output}->display();
+        $self->{output}->exit();
+    }
+
+    my @exits;
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            push @exits, $self->{perfdata}->threshold_check(value => $self->{outputdata}->{$_}, threshold => [ { label => $maps_counters->{$_}->{thresholds}->{$name}->{label}, 'exit_litteral' => $maps_counters->{$_}->{thresholds}->{$name}->{exit_value} }]);
+        }
+    }
+
+    my $exit = $self->{output}->get_most_critical(status => [ @exits ]);
+    
+
+    my $extra_label = '';
+    $extra_label = '_' . $instance_output if ($num > 1);
+
+    my $str_output = "";
+    my $str_append = '';
+    foreach (keys %{$maps_counters}) {
+        $str_output .= $str_append . sprintf($maps_counters->{$_}->{output_msg}, $self->{outputdata}->{$_} * $maps_counters->{$_}->{factor});
+        $str_append = ', ';
+        my ($warning, $critical);
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            $warning = $self->{perfdata}->get_perfdata_for_output(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}) if ($maps_counters->{$_}->{thresholds}->{$name}->{exit_value} eq 'warning');
+            $critical = $self->{perfdata}->get_perfdata_for_output(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}) if ($maps_counters->{$_}->{thresholds}->{$name}->{exit_value} eq 'critical');
+        }
+        $self->{output}->perfdata_add(label => $_ . $extra_label, unit => $maps_counters->{$_}->{unit},
+                                        value => sprintf("%.2f", $self->{outputdata}->{$_} * $maps_counters->{$_}->{factor}),
+                                        warning => $warning,
+                                        critical => $critical);
+    }
+    $self->{output}->output_add(severity => $exit,
+                                short_msg => $str_output);
+
+    $self->{output}->display();
+    $self->{output}->exit();
+};
+
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check Varnish Cache with varnishstat Command
+
+=over 8
+
+=item B<--remote>
+
+If you dont run this script locally, if you wanna use it remote, you can run it remotely with 'ssh'.
+
+=item B<--hostname>
+
+Hostname to query (need --remote).
+
+=item B<--ssh-option>
+
+Specify multiple options like the user (example: --ssh-option='-l=centreon-engine' --ssh-option='-p=52').
+
+=item B<--command>
+
+Varnishstat Binary Filename (Default: varnishstat)
+
+=item B<--command-path>
+
+Directory Path to Varnishstat Binary File (Default: /usr/bin)
+
+=item B<--command-options>
+
+Parameter for Binary File (Default: ' -1 ')
+
+=item B<--warning-*>
+
+Warning Threshold for: 
+lookups => DNS director lookups,
+failed  => DNS director failed lookups,
+hit     => DNS director cached lookups hit,
+full    => DNS director full dnscache
+
+=item B<--critical-*>
+
+Critical Threshold for: 
+lookups => DNS director lookups,
+failed  => DNS director failed lookups,
+hit     => DNS director cached lookups hit,
+full    => DNS director full dnscache
+
+=back
+
+=cut
\ No newline at end of file
diff --git a/apps/varnish/local/mode/esi.pm b/apps/varnish/local/mode/esi.pm
new file mode 100644
index 000000000..d9120efda
--- /dev/null
+++ b/apps/varnish/local/mode/esi.pm
@@ -0,0 +1,248 @@
+###############################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an timeelapsedutable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting timeelapsedutable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Author : Florian Asche 
+#
+####################################################################################
+
+package apps::varnish::local::mode::esi;
+
+use base qw(centreon::plugins::mode);
+use centreon::plugins::misc;
+use centreon::plugins::statefile;
+use Digest::MD5 qw(md5_hex);
+
+my $maps_counters = {
+    esi_errors   => { thresholds => {
+                                warning_errors  =>  { label => 'warning-errors', exit_value => 'warning' },
+                                critical_errors =>  { label => 'critical-errors', exit_value => 'critical' },
+                              },
+                output_msg => 'ESI parse errors (unlock): %.2f',
+                factor => 1, unit => '',
+               },
+    esi_warnings => { thresholds => {
+                                warning_warnings  =>  { label => 'warning-warnings', exit_value => 'warning' },
+                                critical_warnings =>  { label => 'critical-warnings', exit_value => 'critical' },
+                                },
+                 output_msg => 'ESI parse warnings (unlock): %.2f',
+                 factor => 1, unit => '',
+                },
+};
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+    {
+        "hostname:s"         => { name => 'hostname' },
+        "remote"             => { name => 'remote' },
+        "ssh-option:s@"      => { name => 'ssh_option' },
+        "ssh-path:s"         => { name => 'ssh_path' },
+        "ssh-command:s"      => { name => 'ssh_command', default => 'ssh' },
+        "timeout:s"          => { name => 'timeout', default => 30 },
+        "sudo"               => { name => 'sudo' },
+        "command:s"          => { name => 'command', default => 'varnishstat' },
+        "command-path:s"     => { name => 'command_path', default => '/usr/bin' },
+        "command-options:s"  => { name => 'command_options', default => ' -1 ' },
+        "command-options2:s" => { name => 'command_options2', default => ' 2>&1' },
+    });
+
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            $options{options}->add_options(arguments => {
+                $maps_counters->{$_}->{thresholds}->{$name}->{label} . ':s'    => { name => $name },
+            });
+        };
+    };
+
+    $self->{instances_done} = {};
+    $self->{statefile_value} = centreon::plugins::statefile->new(%options);
+    return $self;
+};
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+    
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            if (($self->{perfdata}->threshold_validate(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}, value => $self->{option_results}->{$name})) == 0) {
+                $self->{output}->add_option_msg(short_msg => "Wrong " . $maps_counters->{$_}->{thresholds}->{$name}->{label} . " threshold '" . $self->{option_results}->{$name} . "'.");
+                $self->{output}->option_exit();
+            };
+        };
+    };
+    $self->{statefile_value}->check_options(%options);
+};
+
+sub getdata {
+    my ($self, %options) = @_;
+
+    my $stdout = centreon::plugins::misc::execute(output => $self->{output},
+                                                  options => $self->{option_results},
+                                                  sudo => $self->{option_results}->{sudo},
+                                                  command => $self->{option_results}->{command},
+                                                  command_path => $self->{option_results}->{command_path},
+                                                  command_options => $self->{option_results}->{command_options} . $self->{option_results}->{command_options2});
+    #print $stdout;
+
+    foreach (split(/\n/, $stdout)) {
+        #client_conn            7390867         1.00 Client connections
+        # - Symbolic entry name
+        # - Value
+        # - Per-second average over process lifetime, or a period if the value can not be averaged
+        # - Descriptive text
+
+        if  (/^(.\S*)\s*([0-9]*)\s*([0-9.]*)\s(.*)$/i) {
+            #print "FOUND: " . $1 . "=" . $2 . "\n";
+            $self->{result}->{$1} = $2;
+        };
+    };
+};
+
+sub run {
+    my ($self, %options) = @_;
+
+    $self->getdata();
+
+    $self->{statefile_value}->read(statefile => 'cache_apps_varnish' . '_' . $self->{mode} . '_' . (defined($self->{option_results}->{name}) ? md5_hex($self->{option_results}->{name}) : md5_hex('all')));
+    $self->{result}->{last_timestamp} = time();
+    my $old_timestamp = $self->{statefile_value}->get(name => 'last_timestamp');
+    
+    # Calculate
+    my $delta_time = $self->{result}->{last_timestamp} - $old_timestamp;
+    $delta_time = 1 if ($delta_time == 0); # One seconds ;)
+
+    
+    foreach (keys %{$maps_counters}) {
+        #print $_ . "\n";
+        $self->{old_cache}->{$_} = $self->{statefile_value}->get(name => '$_');     # Get Data from Cache
+        $self->{old_cache}->{$_} = 0 if ( $self->{old_cache}->{$_} > $self->{result}->{$_} );
+        $self->{outputdata}->{$_} = ($self->{result}->{$_} - $self->{old_cache}->{$_}) / $delta_time;
+    };
+
+    # Write Cache if not there
+    $self->{statefile_value}->write(data => $self->{result}); 
+    if (!defined($old_timestamp)) {
+        $self->{output}->output_add(severity => 'OK',
+                                    short_msg => "Buffer creation...");
+        $self->{output}->display();
+        $self->{output}->exit();
+    }
+
+    my @exits;
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            push @exits, $self->{perfdata}->threshold_check(value => $self->{outputdata}->{$_}, threshold => [ { label => $maps_counters->{$_}->{thresholds}->{$name}->{label}, 'exit_litteral' => $maps_counters->{$_}->{thresholds}->{$name}->{exit_value} }]);
+        }
+    }
+
+    my $exit = $self->{output}->get_most_critical(status => [ @exits ]);
+    
+
+    my $extra_label = '';
+    $extra_label = '_' . $instance_output if ($num > 1);
+
+    my $str_output = "";
+    my $str_append = '';
+    foreach (keys %{$maps_counters}) {
+        $str_output .= $str_append . sprintf($maps_counters->{$_}->{output_msg}, $self->{outputdata}->{$_} * $maps_counters->{$_}->{factor});
+        $str_append = ', ';
+        my ($warning, $critical);
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            $warning = $self->{perfdata}->get_perfdata_for_output(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}) if ($maps_counters->{$_}->{thresholds}->{$name}->{exit_value} eq 'warning');
+            $critical = $self->{perfdata}->get_perfdata_for_output(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}) if ($maps_counters->{$_}->{thresholds}->{$name}->{exit_value} eq 'critical');
+        }
+        $self->{output}->perfdata_add(label => $_ . $extra_label, unit => $maps_counters->{$_}->{unit},
+                                        value => sprintf("%.2f", $self->{outputdata}->{$_} * $maps_counters->{$_}->{factor}),
+                                        warning => $warning,
+                                        critical => $critical);
+    }
+    $self->{output}->output_add(severity => $exit,
+                                short_msg => $str_output);
+
+    $self->{output}->display();
+    $self->{output}->exit();
+};
+
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check Varnish Cache with varnishstat Command
+
+=over 8
+
+=item B<--remote>
+
+If you dont run this script locally, if you wanna use it remote, you can run it remotely with 'ssh'.
+
+=item B<--hostname>
+
+Hostname to query (need --remote).
+
+=item B<--ssh-option>
+
+Specify multiple options like the user (example: --ssh-option='-l=centreon-engine' --ssh-option='-p=52').
+
+=item B<--command>
+
+Varnishstat Binary Filename (Default: varnishstat)
+
+=item B<--command-path>
+
+Directory Path to Varnishstat Binary File (Default: /usr/bin)
+
+=item B<--command-options>
+
+Parameter for Binary File (Default: ' -1 ')
+
+=item B<--warning-*>
+
+Warning Threshold for: 
+errors   => ESI parse errors (unlock),
+warnings => ESI parse warnings (unlock)
+
+=item B<--critical-*>
+
+Critical Threshold for: 
+errors   => ESI parse errors (unlock),
+warnings => ESI parse warnings (unlock)
+
+=back
+
+=cut
\ No newline at end of file
diff --git a/apps/varnish/local/mode/fetch.pm b/apps/varnish/local/mode/fetch.pm
new file mode 100644
index 000000000..47d0abf16
--- /dev/null
+++ b/apps/varnish/local/mode/fetch.pm
@@ -0,0 +1,338 @@
+###############################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an timeelapsedutable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting timeelapsedutable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Author : Florian Asche 
+#
+####################################################################################
+
+package apps::varnish::local::mode::fetch;
+
+use base qw(centreon::plugins::mode);
+use centreon::plugins::misc;
+use centreon::plugins::statefile;
+use Digest::MD5 qw(md5_hex);
+
+my $maps_counters = {
+    fetch_head   => { thresholds => {
+                                warning_head  =>  { label => 'warning-head', exit_value => 'warning' },
+                                critical_head =>  { label => 'critical-head', exit_value => 'critical' },
+                              },
+                output_msg => 'Fetch head: %.2f',
+                factor => 1, unit => '',
+               },
+    fetch_length => { thresholds => {
+                                warning_length  =>  { label => 'warning-length', exit_value => 'warning' },
+                                critical_length =>  { label => 'critical-length', exit_value => 'critical' },
+                                },
+                 output_msg => 'Fetch with Length: %.2f',
+                 factor => 1, unit => '',
+                },
+    fetch_chunked => { thresholds => {
+                                warning_chunked    =>  { label => 'warning-chunked', exit_value => 'warning' },
+                                critical_chunked   =>  { label => 'critical-chunked', exit_value => 'critical' },
+                                },
+                 output_msg => 'Fetch chunked: %.2f',
+                 factor => 1, unit => '',
+               },
+    fetch_eof => { thresholds => {
+                                warning_eof    =>  { label => 'warning-eof', exit_value => 'warning' },
+                                critical_eof   =>  { label => 'critical-eof', exit_value => 'critical' },
+                                },
+                 output_msg => 'Fetch EOF: %.2f',
+                 factor => 1, unit => '',
+               },
+    fetch_bad => { thresholds => {
+                                warning_bad    =>  { label => 'warning-bad', exit_value => 'warning' },
+                                critical_bad   =>  { label => 'critical-bad', exit_value => 'critical' },
+                                },
+                 output_msg => 'Fetch had bad headers: %.2f',
+                 factor => 1, unit => '',
+               },
+    fetch_close => { thresholds => {
+                                warning_close    =>  { label => 'warning-close', exit_value => 'warning' },
+                                critical_close   =>  { label => 'critical-close', exit_value => 'critical' },
+                                },
+                 output_msg => 'Fetch wanted close: %.2f',
+                 factor => 1, unit => '',
+               },
+    fetch_oldhttp => { thresholds => {
+                                warning_oldhttp    =>  { label => 'warning-oldhttp', exit_value => 'warning' },
+                                critical_oldhttp   =>  { label => 'critical-oldhttp', exit_value => 'critical' },
+                                },
+                 output_msg => 'Fetch pre HTTP/1.1 closed: %.2f',
+                 factor => 1, unit => '',
+               },
+    fetch_zero => { thresholds => {
+                                warning_zero    =>  { label => 'warning-zero', exit_value => 'warning' },
+                                critical_zero   =>  { label => 'critical-zero', exit_value => 'critical' },
+                                },
+                 output_msg => 'Fetch zero len: %.2f',
+                 factor => 1, unit => '',
+               },
+    fetch_failed => { thresholds => {
+                                warning_failed    =>  { label => 'warning-failed', exit_value => 'warning' },
+                                critical_failed   =>  { label => 'critical-failed', exit_value => 'critical' },
+                                },
+                 output_msg => 'Fetch failed: %.2f',
+                 factor => 1, unit => '',
+               },
+    fetch_1xx => { thresholds => {
+                                warning_1xx    =>  { label => 'warning-1xx', exit_value => 'warning' },
+                                critical_1xx   =>  { label => 'critical-1xx', exit_value => 'critical' },
+                                },
+                 output_msg => 'Fetch no body (1xx): %.2f',
+                 factor => 1, unit => '',
+               },
+    fetch_204 => { thresholds => {
+                                warning_204    =>  { label => 'warning-204', exit_value => 'warning' },
+                                critical_204   =>  { label => 'critical-204', exit_value => 'critical' },
+                                },
+                 output_msg => 'Fetch no body (204): %.2f',
+                 factor => 1, unit => '',
+               },
+    fetch_304 => { thresholds => {
+                                warning_304    =>  { label => 'warning-304', exit_value => 'warning' },
+                                critical_304   =>  { label => 'critical-304', exit_value => 'critical' },
+                                },
+                 output_msg => 'Fetch no body (304): %.2f',
+                 factor => 1, unit => '',
+               },
+};
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+    {
+        "hostname:s"         => { name => 'hostname' },
+        "remote"             => { name => 'remote' },
+        "ssh-option:s@"      => { name => 'ssh_option' },
+        "ssh-path:s"         => { name => 'ssh_path' },
+        "ssh-command:s"      => { name => 'ssh_command', default => 'ssh' },
+        "timeout:s"          => { name => 'timeout', default => 30 },
+        "sudo"               => { name => 'sudo' },
+        "command:s"          => { name => 'command', default => 'varnishstat' },
+        "command-path:s"     => { name => 'command_path', default => '/usr/bin' },
+        "command-options:s"  => { name => 'command_options', default => ' -1 ' },
+        "command-options2:s" => { name => 'command_options2', default => ' 2>&1' },
+    });
+
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            $options{options}->add_options(arguments => {
+                $maps_counters->{$_}->{thresholds}->{$name}->{label} . ':s'    => { name => $name },
+            });
+        };
+    };
+
+    $self->{instances_done} = {};
+    $self->{statefile_value} = centreon::plugins::statefile->new(%options);
+    return $self;
+};
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+    
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            if (($self->{perfdata}->threshold_validate(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}, value => $self->{option_results}->{$name})) == 0) {
+                $self->{output}->add_option_msg(short_msg => "Wrong " . $maps_counters->{$_}->{thresholds}->{$name}->{label} . " threshold '" . $self->{option_results}->{$name} . "'.");
+                $self->{output}->option_exit();
+            };
+        };
+    };
+    $self->{statefile_value}->check_options(%options);
+};
+
+sub getdata {
+    my ($self, %options) = @_;
+
+    my $stdout = centreon::plugins::misc::execute(output => $self->{output},
+                                                  options => $self->{option_results},
+                                                  sudo => $self->{option_results}->{sudo},
+                                                  command => $self->{option_results}->{command},
+                                                  command_path => $self->{option_results}->{command_path},
+                                                  command_options => $self->{option_results}->{command_options} . $self->{option_results}->{command_options2});
+    #print $stdout;
+
+    foreach (split(/\n/, $stdout)) {
+        #client_conn            7390867         1.00 Client connections
+        # - Symbolic entry name
+        # - Value
+        # - Per-second average over process lifetime, or a period if the value can not be averaged
+        # - Descriptive text
+
+        if  (/^(.\S*)\s*([0-9]*)\s*([0-9.]*)\s(.*)$/i) {
+            #print "FOUND: " . $1 . "=" . $2 . "\n";
+            $self->{result}->{$1} = $2;
+        };
+    };
+};
+
+sub run {
+    my ($self, %options) = @_;
+
+    $self->getdata();
+
+    $self->{statefile_value}->read(statefile => 'cache_apps_varnish' . '_' . $self->{mode} . '_' . (defined($self->{option_results}->{name}) ? md5_hex($self->{option_results}->{name}) : md5_hex('all')));
+    $self->{result}->{last_timestamp} = time();
+    my $old_timestamp = $self->{statefile_value}->get(name => 'last_timestamp');
+    
+    # Calculate
+    my $delta_time = $self->{result}->{last_timestamp} - $old_timestamp;
+    $delta_time = 1 if ($delta_time == 0); # One seconds ;)
+
+    
+    foreach (keys %{$maps_counters}) {
+        #print $_ . "\n";
+        $self->{old_cache}->{$_} = $self->{statefile_value}->get(name => '$_');     # Get Data from Cache
+        $self->{old_cache}->{$_} = 0 if ( $self->{old_cache}->{$_} > $self->{result}->{$_} );
+        $self->{outputdata}->{$_} = ($self->{result}->{$_} - $self->{old_cache}->{$_}) / $delta_time;
+    };
+
+    # Write Cache if not there
+    $self->{statefile_value}->write(data => $self->{result}); 
+    if (!defined($old_timestamp)) {
+        $self->{output}->output_add(severity => 'OK',
+                                    short_msg => "Buffer creation...");
+        $self->{output}->display();
+        $self->{output}->exit();
+    }
+
+    my @exits;
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            push @exits, $self->{perfdata}->threshold_check(value => $self->{outputdata}->{$_}, threshold => [ { label => $maps_counters->{$_}->{thresholds}->{$name}->{label}, 'exit_litteral' => $maps_counters->{$_}->{thresholds}->{$name}->{exit_value} }]);
+        }
+    }
+
+    my $exit = $self->{output}->get_most_critical(status => [ @exits ]);
+    
+
+    my $extra_label = '';
+    $extra_label = '_' . $instance_output if ($num > 1);
+
+    my $str_output = "";
+    my $str_append = '';
+    foreach (keys %{$maps_counters}) {
+        $str_output .= $str_append . sprintf($maps_counters->{$_}->{output_msg}, $self->{outputdata}->{$_} * $maps_counters->{$_}->{factor});
+        $str_append = ', ';
+        my ($warning, $critical);
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            $warning = $self->{perfdata}->get_perfdata_for_output(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}) if ($maps_counters->{$_}->{thresholds}->{$name}->{exit_value} eq 'warning');
+            $critical = $self->{perfdata}->get_perfdata_for_output(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}) if ($maps_counters->{$_}->{thresholds}->{$name}->{exit_value} eq 'critical');
+        }
+        $self->{output}->perfdata_add(label => $_ . $extra_label, unit => $maps_counters->{$_}->{unit},
+                                        value => sprintf("%.2f", $self->{outputdata}->{$_} * $maps_counters->{$_}->{factor}),
+                                        warning => $warning,
+                                        critical => $critical);
+    }
+    $self->{output}->output_add(severity => $exit,
+                                short_msg => $str_output);
+
+    $self->{output}->display();
+    $self->{output}->exit();
+};
+
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check Varnish Cache with varnishstat Command
+
+=over 8
+
+=item B<--remote>
+
+If you dont run this script locally, if you wanna use it remote, you can run it remotely with 'ssh'.
+
+=item B<--hostname>
+
+Hostname to query (need --remote).
+
+=item B<--ssh-option>
+
+Specify multiple options like the user (example: --ssh-option='-l=centreon-engine' --ssh-option='-p=52').
+
+=item B<--command>
+
+Varnishstat Binary Filename (Default: varnishstat)
+
+=item B<--command-path>
+
+Directory Path to Varnishstat Binary File (Default: /usr/bin)
+
+=item B<--command-options>
+
+Parameter for Binary File (Default: ' -1 ')
+
+=item B<--warning-*>
+
+Warning Threshold for: 
+head    => Fetch head,
+length  => Fetch with Length,
+chunked => Fetch chunked,
+eof     => Fetch EOF,
+bad     => Fetch had bad headers,
+close   => Fetch wanted close,
+oldhttp => Fetch pre HTTP/1.1 closed,
+zero    => Fetch zero len,
+failed  => Fetch failed,
+1xx     => Fetch no body (1xx),
+204     => Fetch no body (204),
+304     => Fetch no body (304)
+
+=item B<--critical-*>
+
+Critical Threshold for: 
+head    => Fetch head,
+length  => Fetch with Length,
+chunked => Fetch chunked,
+eof     => Fetch EOF,
+bad     => Fetch had bad headers,
+close   => Fetch wanted close,
+oldhttp => Fetch pre HTTP/1.1 closed,
+zero    => Fetch zero len,
+failed  => Fetch failed,
+1xx     => Fetch no body (1xx),
+204     => Fetch no body (204),
+304     => Fetch no body (304)
+
+=back
+
+=cut
\ No newline at end of file
diff --git a/apps/varnish/local/mode/hcb.pm b/apps/varnish/local/mode/hcb.pm
new file mode 100644
index 000000000..86ac6d374
--- /dev/null
+++ b/apps/varnish/local/mode/hcb.pm
@@ -0,0 +1,257 @@
+###############################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an timeelapsedutable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting timeelapsedutable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Author : Florian Asche 
+#
+####################################################################################
+
+package apps::varnish::local::mode::hcb;
+
+use base qw(centreon::plugins::mode);
+use centreon::plugins::misc;
+use centreon::plugins::statefile;
+use Digest::MD5 qw(md5_hex);
+
+my $maps_counters = {
+    hcb_nolock   => { thresholds => {
+                                warning_nolock  =>  { label => 'warning-nolock', exit_value => 'warning' },
+                                critical_nolock =>  { label => 'critical-nolock', exit_value => 'critical' },
+                              },
+                output_msg => 'HCB Lookups without lock: %.2f',
+                factor => 1, unit => '',
+               },
+    hcb_lock => { thresholds => {
+                                warning_lock  =>  { label => 'warning-lock', exit_value => 'warning' },
+                                critical_lock =>  { label => 'critical-lock', exit_value => 'critical' },
+                                },
+                 output_msg => 'HCB Lookups with lock: %.2f',
+                 factor => 1, unit => '',
+                },
+    hcb_insert => { thresholds => {
+                                warning_insert    =>  { label => 'warning-insert', exit_value => 'warning' },
+                                critical_insert   =>  { label => 'critical-insert', exit_value => 'critical' },
+                                },
+                 output_msg => 'HCB Inserts: %.2f',
+                 factor => 1, unit => '',
+               },
+};
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+    {
+        "hostname:s"         => { name => 'hostname' },
+        "remote"             => { name => 'remote' },
+        "ssh-option:s@"      => { name => 'ssh_option' },
+        "ssh-path:s"         => { name => 'ssh_path' },
+        "ssh-command:s"      => { name => 'ssh_command', default => 'ssh' },
+        "timeout:s"          => { name => 'timeout', default => 30 },
+        "sudo"               => { name => 'sudo' },
+        "command:s"          => { name => 'command', default => 'varnishstat' },
+        "command-path:s"     => { name => 'command_path', default => '/usr/bin' },
+        "command-options:s"  => { name => 'command_options', default => ' -1 ' },
+        "command-options2:s" => { name => 'command_options2', default => ' 2>&1' },
+    });
+
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            $options{options}->add_options(arguments => {
+                $maps_counters->{$_}->{thresholds}->{$name}->{label} . ':s'    => { name => $name },
+            });
+        };
+    };
+
+    $self->{instances_done} = {};
+    $self->{statefile_value} = centreon::plugins::statefile->new(%options);
+    return $self;
+};
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+    
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            if (($self->{perfdata}->threshold_validate(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}, value => $self->{option_results}->{$name})) == 0) {
+                $self->{output}->add_option_msg(short_msg => "Wrong " . $maps_counters->{$_}->{thresholds}->{$name}->{label} . " threshold '" . $self->{option_results}->{$name} . "'.");
+                $self->{output}->option_exit();
+            };
+        };
+    };
+    $self->{statefile_value}->check_options(%options);
+};
+
+sub getdata {
+    my ($self, %options) = @_;
+
+    my $stdout = centreon::plugins::misc::execute(output => $self->{output},
+                                                  options => $self->{option_results},
+                                                  sudo => $self->{option_results}->{sudo},
+                                                  command => $self->{option_results}->{command},
+                                                  command_path => $self->{option_results}->{command_path},
+                                                  command_options => $self->{option_results}->{command_options} . $self->{option_results}->{command_options2});
+    #print $stdout;
+
+    foreach (split(/\n/, $stdout)) {
+        #client_conn            7390867         1.00 Client connections
+        # - Symbolic entry name
+        # - Value
+        # - Per-second average over process lifetime, or a period if the value can not be averaged
+        # - Descriptive text
+
+        if  (/^(.\S*)\s*([0-9]*)\s*([0-9.]*)\s(.*)$/i) {
+            #print "FOUND: " . $1 . "=" . $2 . "\n";
+            $self->{result}->{$1} = $2;
+        };
+    };
+};
+
+sub run {
+    my ($self, %options) = @_;
+
+    $self->getdata();
+
+    $self->{statefile_value}->read(statefile => 'cache_apps_varnish' . '_' . $self->{mode} . '_' . (defined($self->{option_results}->{name}) ? md5_hex($self->{option_results}->{name}) : md5_hex('all')));
+    $self->{result}->{last_timestamp} = time();
+    my $old_timestamp = $self->{statefile_value}->get(name => 'last_timestamp');
+    
+    # Calculate
+    my $delta_time = $self->{result}->{last_timestamp} - $old_timestamp;
+    $delta_time = 1 if ($delta_time == 0); # One seconds ;)
+
+    
+    foreach (keys %{$maps_counters}) {
+        #print $_ . "\n";
+        $self->{old_cache}->{$_} = $self->{statefile_value}->get(name => '$_');     # Get Data from Cache
+        $self->{old_cache}->{$_} = 0 if ( $self->{old_cache}->{$_} > $self->{result}->{$_} );
+        $self->{outputdata}->{$_} = ($self->{result}->{$_} - $self->{old_cache}->{$_}) / $delta_time;
+    };
+
+    # Write Cache if not there
+    $self->{statefile_value}->write(data => $self->{result}); 
+    if (!defined($old_timestamp)) {
+        $self->{output}->output_add(severity => 'OK',
+                                    short_msg => "Buffer creation...");
+        $self->{output}->display();
+        $self->{output}->exit();
+    }
+
+    my @exits;
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            push @exits, $self->{perfdata}->threshold_check(value => $self->{outputdata}->{$_}, threshold => [ { label => $maps_counters->{$_}->{thresholds}->{$name}->{label}, 'exit_litteral' => $maps_counters->{$_}->{thresholds}->{$name}->{exit_value} }]);
+        }
+    }
+
+    my $exit = $self->{output}->get_most_critical(status => [ @exits ]);
+    
+
+    my $extra_label = '';
+    $extra_label = '_' . $instance_output if ($num > 1);
+
+    my $str_output = "";
+    my $str_append = '';
+    foreach (keys %{$maps_counters}) {
+        $str_output .= $str_append . sprintf($maps_counters->{$_}->{output_msg}, $self->{outputdata}->{$_} * $maps_counters->{$_}->{factor});
+        $str_append = ', ';
+        my ($warning, $critical);
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            $warning = $self->{perfdata}->get_perfdata_for_output(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}) if ($maps_counters->{$_}->{thresholds}->{$name}->{exit_value} eq 'warning');
+            $critical = $self->{perfdata}->get_perfdata_for_output(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}) if ($maps_counters->{$_}->{thresholds}->{$name}->{exit_value} eq 'critical');
+        }
+        $self->{output}->perfdata_add(label => $_ . $extra_label, unit => $maps_counters->{$_}->{unit},
+                                        value => sprintf("%.2f", $self->{outputdata}->{$_} * $maps_counters->{$_}->{factor}),
+                                        warning => $warning,
+                                        critical => $critical);
+    }
+    $self->{output}->output_add(severity => $exit,
+                                short_msg => $str_output);
+
+    $self->{output}->display();
+    $self->{output}->exit();
+};
+
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check Varnish Cache with varnishstat Command
+
+=over 8
+
+=item B<--remote>
+
+If you dont run this script locally, if you wanna use it remote, you can run it remotely with 'ssh'.
+
+=item B<--hostname>
+
+Hostname to query (need --remote).
+
+=item B<--ssh-option>
+
+Specify multiple options like the user (example: --ssh-option='-l=centreon-engine' --ssh-option='-p=52').
+
+=item B<--command>
+
+Varnishstat Binary Filename (Default: varnishstat)
+
+=item B<--command-path>
+
+Directory Path to Varnishstat Binary File (Default: /usr/bin)
+
+=item B<--command-options>
+
+Parameter for Binary File (Default: ' -1 ')
+
+=item B<--warning-*>
+
+Warning Threshold for: 
+nolock => HCB Lookups without lock,
+lock   => HCB Lookups with lock,
+insert => HCB Inserts
+
+=item B<--critical-*>
+
+Critical Threshold for: 
+nolock => HCB Lookups without lock,
+lock   => HCB Lookups with lock,
+insert => HCB Inserts
+
+=back
+
+=cut
\ No newline at end of file
diff --git a/apps/varnish/local/mode/n.pm b/apps/varnish/local/mode/n.pm
new file mode 100644
index 000000000..14b08d129
--- /dev/null
+++ b/apps/varnish/local/mode/n.pm
@@ -0,0 +1,338 @@
+###############################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an timeelapsedutable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting timeelapsedutable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Author : Florian Asche 
+#
+####################################################################################
+
+package apps::varnish::local::mode::n;
+
+use base qw(centreon::plugins::mode);
+use centreon::plugins::misc;
+use centreon::plugins::statefile;
+use Digest::MD5 qw(md5_hex);
+
+my $maps_counters = {
+    n_sess_mem   => { thresholds => {
+                                warning_mem  =>  { label => 'warning-mem', exit_value => 'warning' },
+                                critical_mem =>  { label => 'critical-mem', exit_value => 'critical' },
+                              },
+                output_msg => 'N struct sess_mem: %.2f',
+                factor => 1, unit => '',
+               },
+    n_sess => { thresholds => {
+                                warning_sess  =>  { label => 'warning-sess', exit_value => 'warning' },
+                                critical_sess =>  { label => 'critical-sess', exit_value => 'critical' },
+                                },
+                 output_msg => 'N struct sess: %.2f',
+                 factor => 1, unit => '',
+                },
+    n_object => { thresholds => {
+                                warning_object    =>  { label => 'warning-object', exit_value => 'warning' },
+                                critical_object   =>  { label => 'critical-object', exit_value => 'critical' },
+                                },
+                 output_msg => 'N struct object: %.2f',
+                 factor => 1, unit => '',
+               },
+    n_vampireobject => { thresholds => {
+                                warning_vampireobject    =>  { label => 'warning-vampireobject', exit_value => 'warning' },
+                                critical_vampireobject   =>  { label => 'critical-vampireobject', exit_value => 'critical' },
+                                },
+                 output_msg => 'N unresurrected objects: %.2f',
+                 factor => 1, unit => '',
+               },
+    n_objectcore => { thresholds => {
+                                warning_objectcore    =>  { label => 'warning-objectcore', exit_value => 'warning' },
+                                critical_objectcore   =>  { label => 'critical-objectcore', exit_value => 'critical' },
+                                },
+                 output_msg => 'N struct objectcore: %.2f',
+                 factor => 1, unit => '',
+               },
+    n_objecthead => { thresholds => {
+                                warning_objecthead    =>  { label => 'warning-objecthead', exit_value => 'warning' },
+                                critical_objecthead   =>  { label => 'critical-objecthead', exit_value => 'critical' },
+                                },
+                 output_msg => 'N struct objecthead: %.2f',
+                 factor => 1, unit => '',
+               },
+    n_waitinglist => { thresholds => {
+                                warning_waitinglist    =>  { label => 'warning-waitinglist', exit_value => 'warning' },
+                                critical_waitinglist   =>  { label => 'critical-waitinglist', exit_value => 'critical' },
+                                },
+                 output_msg => 'N struct waitinglist: %.2f',
+                 factor => 1, unit => '',
+               },
+    n_vbc => { thresholds => {
+                                warning_vbc    =>  { label => 'warning-vbc', exit_value => 'warning' },
+                                critical_vbc   =>  { label => 'critical-vbc', exit_value => 'critical' },
+                                },
+                 output_msg => 'N struct vbc: %.2f',
+                 factor => 1, unit => '',
+               },
+    n_backend => { thresholds => {
+                                warning_backend    =>  { label => 'warning-backend', exit_value => 'warning' },
+                                critical_backend   =>  { label => 'critical-backend', exit_value => 'critical' },
+                                },
+                 output_msg => 'N backends: %.2f',
+                 factor => 1, unit => '',
+               },
+    n_expired => { thresholds => {
+                                warning_expired    =>  { label => 'warning-expired', exit_value => 'warning' },
+                                critical_expired   =>  { label => 'critical-expired', exit_value => 'critical' },
+                                },
+                 output_msg => 'N expired objects: %.2f',
+                 factor => 1, unit => '',
+               },
+    n_lru_nuked => { thresholds => {
+                                warning_nuked    =>  { label => 'warning-nuked', exit_value => 'warning' },
+                                critical_nuked   =>  { label => 'critical-nuked', exit_value => 'critical' },
+                                },
+                 output_msg => 'N LRU nuked objects: %.2f',
+                 factor => 1, unit => '',
+               },
+    n_lru_moved => { thresholds => {
+                                warning_moved    =>  { label => 'warning-moved', exit_value => 'warning' },
+                                critical_moved   =>  { label => 'critical-moved', exit_value => 'critical' },
+                                },
+                 output_msg => 'N LRU moved objects: %.2f',
+                 factor => 1, unit => '',
+               },
+};
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+    {
+        "hostname:s"         => { name => 'hostname' },
+        "remote"             => { name => 'remote' },
+        "ssh-option:s@"      => { name => 'ssh_option' },
+        "ssh-path:s"         => { name => 'ssh_path' },
+        "ssh-command:s"      => { name => 'ssh_command', default => 'ssh' },
+        "timeout:s"          => { name => 'timeout', default => 30 },
+        "sudo"               => { name => 'sudo' },
+        "command:s"          => { name => 'command', default => 'varnishstat' },
+        "command-path:s"     => { name => 'command_path', default => '/usr/bin' },
+        "command-options:s"  => { name => 'command_options', default => ' -1 ' },
+        "command-options2:s" => { name => 'command_options2', default => ' 2>&1' },
+    });
+
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            $options{options}->add_options(arguments => {
+                $maps_counters->{$_}->{thresholds}->{$name}->{label} . ':s'    => { name => $name },
+            });
+        };
+    };
+
+    $self->{instances_done} = {};
+    $self->{statefile_value} = centreon::plugins::statefile->new(%options);
+    return $self;
+};
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+    
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            if (($self->{perfdata}->threshold_validate(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}, value => $self->{option_results}->{$name})) == 0) {
+                $self->{output}->add_option_msg(short_msg => "Wrong " . $maps_counters->{$_}->{thresholds}->{$name}->{label} . " threshold '" . $self->{option_results}->{$name} . "'.");
+                $self->{output}->option_exit();
+            };
+        };
+    };
+    $self->{statefile_value}->check_options(%options);
+};
+
+sub getdata {
+    my ($self, %options) = @_;
+
+    my $stdout = centreon::plugins::misc::execute(output => $self->{output},
+                                                  options => $self->{option_results},
+                                                  sudo => $self->{option_results}->{sudo},
+                                                  command => $self->{option_results}->{command},
+                                                  command_path => $self->{option_results}->{command_path},
+                                                  command_options => $self->{option_results}->{command_options} . $self->{option_results}->{command_options2});
+    #print $stdout;
+
+    foreach (split(/\n/, $stdout)) {
+        #client_conn            7390867         1.00 Client connections
+        # - Symbolic entry name
+        # - Value
+        # - Per-second average over process lifetime, or a period if the value can not be averaged
+        # - Descriptive text
+
+        if  (/^(.\S*)\s*([0-9]*)\s*([0-9.]*)\s(.*)$/i) {
+            #print "FOUND: " . $1 . "=" . $2 . "\n";
+            $self->{result}->{$1} = $2;
+        };
+    };
+};
+
+sub run {
+    my ($self, %options) = @_;
+
+    $self->getdata();
+
+    $self->{statefile_value}->read(statefile => 'cache_apps_varnish' . '_' . $self->{mode} . '_' . (defined($self->{option_results}->{name}) ? md5_hex($self->{option_results}->{name}) : md5_hex('all')));
+    $self->{result}->{last_timestamp} = time();
+    my $old_timestamp = $self->{statefile_value}->get(name => 'last_timestamp');
+    
+    # Calculate
+    my $delta_time = $self->{result}->{last_timestamp} - $old_timestamp;
+    $delta_time = 1 if ($delta_time == 0); # One seconds ;)
+
+    
+    foreach (keys %{$maps_counters}) {
+        #print $_ . "\n";
+        $self->{old_cache}->{$_} = $self->{statefile_value}->get(name => '$_');     # Get Data from Cache
+        $self->{old_cache}->{$_} = 0 if ( $self->{old_cache}->{$_} > $self->{result}->{$_} );
+        $self->{outputdata}->{$_} = ($self->{result}->{$_} - $self->{old_cache}->{$_}) / $delta_time;
+    };
+
+    # Write Cache if not there
+    $self->{statefile_value}->write(data => $self->{result}); 
+    if (!defined($old_timestamp)) {
+        $self->{output}->output_add(severity => 'OK',
+                                    short_msg => "Buffer creation...");
+        $self->{output}->display();
+        $self->{output}->exit();
+    }
+
+    my @exits;
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            push @exits, $self->{perfdata}->threshold_check(value => $self->{outputdata}->{$_}, threshold => [ { label => $maps_counters->{$_}->{thresholds}->{$name}->{label}, 'exit_litteral' => $maps_counters->{$_}->{thresholds}->{$name}->{exit_value} }]);
+        }
+    }
+
+    my $exit = $self->{output}->get_most_critical(status => [ @exits ]);
+    
+
+    my $extra_label = '';
+    $extra_label = '_' . $instance_output if ($num > 1);
+
+    my $str_output = "";
+    my $str_append = '';
+    foreach (keys %{$maps_counters}) {
+        $str_output .= $str_append . sprintf($maps_counters->{$_}->{output_msg}, $self->{outputdata}->{$_} * $maps_counters->{$_}->{factor});
+        $str_append = ', ';
+        my ($warning, $critical);
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            $warning = $self->{perfdata}->get_perfdata_for_output(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}) if ($maps_counters->{$_}->{thresholds}->{$name}->{exit_value} eq 'warning');
+            $critical = $self->{perfdata}->get_perfdata_for_output(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}) if ($maps_counters->{$_}->{thresholds}->{$name}->{exit_value} eq 'critical');
+        }
+        $self->{output}->perfdata_add(label => $_ . $extra_label, unit => $maps_counters->{$_}->{unit},
+                                        value => sprintf("%.2f", $self->{outputdata}->{$_} * $maps_counters->{$_}->{factor}),
+                                        warning => $warning,
+                                        critical => $critical);
+    }
+    $self->{output}->output_add(severity => $exit,
+                                short_msg => $str_output);
+
+    $self->{output}->display();
+    $self->{output}->exit();
+};
+
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check Varnish Cache with varnishstat Command
+
+=over 8
+
+=item B<--remote>
+
+If you dont run this script locally, if you wanna use it remote, you can run it remotely with 'ssh'.
+
+=item B<--hostname>
+
+Hostname to query (need --remote).
+
+=item B<--ssh-option>
+
+Specify multiple options like the user (example: --ssh-option='-l=centreon-engine' --ssh-option='-p=52').
+
+=item B<--command>
+
+Varnishstat Binary Filename (Default: varnishstat)
+
+=item B<--command-path>
+
+Directory Path to Varnishstat Binary File (Default: /usr/bin)
+
+=item B<--command-options>
+
+Parameter for Binary File (Default: ' -1 ')
+
+=item B<--warning-*>
+
+Warning Threshold for: 
+n_sess_mem      => N struct sess_mem,
+n_sess          => N struct sess,
+n_object        => N struct object,
+n_vampireobject => N unresurrected objects,
+n_objectcore    => N struct objectcore,
+n_objecthead    => N struct objecthead,
+n_waitinglist   => N struct waitinglist,
+n_vbc           => N struct vbc,
+n_backend       => N backends,
+n_expired       => N expired objects,
+n_lru_nuked     => N LRU nuked objects,
+n_lru_moved     => N LRU moved objects
+
+=item B<--critical-*>
+
+Critical Threshold for: 
+n_sess_mem      => N struct sess_mem,
+n_sess          => N struct sess,
+n_object        => N struct object,
+n_vampireobject => N unresurrected objects,
+n_objectcore    => N struct objectcore,
+n_objecthead    => N struct objecthead,
+n_waitinglist   => N struct waitinglist,
+n_vbc           => N struct vbc,
+n_backend       => N backends,
+n_expired       => N expired objects,
+n_lru_nuked     => N LRU nuked objects,
+n_lru_moved     => N LRU moved objects
+
+=back
+
+=cut
\ No newline at end of file
diff --git a/apps/varnish/local/mode/objects.pm b/apps/varnish/local/mode/objects.pm
new file mode 100644
index 000000000..a1df07f2b
--- /dev/null
+++ b/apps/varnish/local/mode/objects.pm
@@ -0,0 +1,257 @@
+###############################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an timeelapsedutable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting timeelapsedutable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Author : Florian Asche 
+#
+####################################################################################
+
+package apps::varnish::local::mode::objects;
+
+use base qw(centreon::plugins::mode);
+use centreon::plugins::misc;
+use centreon::plugins::statefile;
+use Digest::MD5 qw(md5_hex);
+
+my $maps_counters = {
+    n_objsendfile   => { thresholds => {
+                                warning_objsendfile  =>  { label => 'warning-objsendfile', exit_value => 'warning' },
+                                critical_objsendfile =>  { label => 'critical-objsendfile', exit_value => 'critical' },
+                              },
+                output_msg => 'Objects sent with sendfile: %.2f',
+                factor => 1, unit => '',
+               },
+    n_objwrite => { thresholds => {
+                                warning_objwrite  =>  { label => 'warning-objwrite', exit_value => 'warning' },
+                                critical_objwrite =>  { label => 'critical-objwrite', exit_value => 'critical' },
+                                },
+                 output_msg => 'Objects sent with write: %.2f',
+                 factor => 1, unit => '',
+                },
+    n_objoverflow => { thresholds => {
+                                warning_objoverflow    =>  { label => 'warning-objoverflow', exit_value => 'warning' },
+                                critical_objoverflow   =>  { label => 'critical-objoverflow', exit_value => 'critical' },
+                                },
+                 output_msg => 'Objects overflowing workspace: %.2f',
+                 factor => 1, unit => '',
+               },
+};
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+    {
+        "hostname:s"         => { name => 'hostname' },
+        "remote"             => { name => 'remote' },
+        "ssh-option:s@"      => { name => 'ssh_option' },
+        "ssh-path:s"         => { name => 'ssh_path' },
+        "ssh-command:s"      => { name => 'ssh_command', default => 'ssh' },
+        "timeout:s"          => { name => 'timeout', default => 30 },
+        "sudo"               => { name => 'sudo' },
+        "command:s"          => { name => 'command', default => 'varnishstat' },
+        "command-path:s"     => { name => 'command_path', default => '/usr/bin' },
+        "command-options:s"  => { name => 'command_options', default => ' -1 ' },
+        "command-options2:s" => { name => 'command_options2', default => ' 2>&1' },
+    });
+
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            $options{options}->add_options(arguments => {
+                $maps_counters->{$_}->{thresholds}->{$name}->{label} . ':s'    => { name => $name },
+            });
+        };
+    };
+
+    $self->{instances_done} = {};
+    $self->{statefile_value} = centreon::plugins::statefile->new(%options);
+    return $self;
+};
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+    
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            if (($self->{perfdata}->threshold_validate(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}, value => $self->{option_results}->{$name})) == 0) {
+                $self->{output}->add_option_msg(short_msg => "Wrong " . $maps_counters->{$_}->{thresholds}->{$name}->{label} . " threshold '" . $self->{option_results}->{$name} . "'.");
+                $self->{output}->option_exit();
+            };
+        };
+    };
+    $self->{statefile_value}->check_options(%options);
+};
+
+sub getdata {
+    my ($self, %options) = @_;
+
+    my $stdout = centreon::plugins::misc::execute(output => $self->{output},
+                                                  options => $self->{option_results},
+                                                  sudo => $self->{option_results}->{sudo},
+                                                  command => $self->{option_results}->{command},
+                                                  command_path => $self->{option_results}->{command_path},
+                                                  command_options => $self->{option_results}->{command_options} . $self->{option_results}->{command_options2});
+    #print $stdout;
+
+    foreach (split(/\n/, $stdout)) {
+        #client_conn            7390867         1.00 Client connections
+        # - Symbolic entry name
+        # - Value
+        # - Per-second average over process lifetime, or a period if the value can not be averaged
+        # - Descriptive text
+
+        if  (/^(.\S*)\s*([0-9]*)\s*([0-9.]*)\s(.*)$/i) {
+            #print "FOUND: " . $1 . "=" . $2 . "\n";
+            $self->{result}->{$1} = $2;
+        };
+    };
+};
+
+sub run {
+    my ($self, %options) = @_;
+
+    $self->getdata();
+
+    $self->{statefile_value}->read(statefile => 'cache_apps_varnish' . '_' . $self->{mode} . '_' . (defined($self->{option_results}->{name}) ? md5_hex($self->{option_results}->{name}) : md5_hex('all')));
+    $self->{result}->{last_timestamp} = time();
+    my $old_timestamp = $self->{statefile_value}->get(name => 'last_timestamp');
+    
+    # Calculate
+    my $delta_time = $self->{result}->{last_timestamp} - $old_timestamp;
+    $delta_time = 1 if ($delta_time == 0); # One seconds ;)
+
+    
+    foreach (keys %{$maps_counters}) {
+        #print $_ . "\n";
+        $self->{old_cache}->{$_} = $self->{statefile_value}->get(name => '$_');     # Get Data from Cache
+        $self->{old_cache}->{$_} = 0 if ( $self->{old_cache}->{$_} > $self->{result}->{$_} );
+        $self->{outputdata}->{$_} = ($self->{result}->{$_} - $self->{old_cache}->{$_}) / $delta_time;
+    };
+
+    # Write Cache if not there
+    $self->{statefile_value}->write(data => $self->{result}); 
+    if (!defined($old_timestamp)) {
+        $self->{output}->output_add(severity => 'OK',
+                                    short_msg => "Buffer creation...");
+        $self->{output}->display();
+        $self->{output}->exit();
+    }
+
+    my @exits;
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            push @exits, $self->{perfdata}->threshold_check(value => $self->{outputdata}->{$_}, threshold => [ { label => $maps_counters->{$_}->{thresholds}->{$name}->{label}, 'exit_litteral' => $maps_counters->{$_}->{thresholds}->{$name}->{exit_value} }]);
+        }
+    }
+
+    my $exit = $self->{output}->get_most_critical(status => [ @exits ]);
+    
+
+    my $extra_label = '';
+    $extra_label = '_' . $instance_output if ($num > 1);
+
+    my $str_output = "";
+    my $str_append = '';
+    foreach (keys %{$maps_counters}) {
+        $str_output .= $str_append . sprintf($maps_counters->{$_}->{output_msg}, $self->{outputdata}->{$_} * $maps_counters->{$_}->{factor});
+        $str_append = ', ';
+        my ($warning, $critical);
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            $warning = $self->{perfdata}->get_perfdata_for_output(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}) if ($maps_counters->{$_}->{thresholds}->{$name}->{exit_value} eq 'warning');
+            $critical = $self->{perfdata}->get_perfdata_for_output(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}) if ($maps_counters->{$_}->{thresholds}->{$name}->{exit_value} eq 'critical');
+        }
+        $self->{output}->perfdata_add(label => $_ . $extra_label, unit => $maps_counters->{$_}->{unit},
+                                        value => sprintf("%.2f", $self->{outputdata}->{$_} * $maps_counters->{$_}->{factor}),
+                                        warning => $warning,
+                                        critical => $critical);
+    }
+    $self->{output}->output_add(severity => $exit,
+                                short_msg => $str_output);
+
+    $self->{output}->display();
+    $self->{output}->exit();
+};
+
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check Varnish Cache with varnishstat Command
+
+=over 8
+
+=item B<--remote>
+
+If you dont run this script locally, if you wanna use it remote, you can run it remotely with 'ssh'.
+
+=item B<--hostname>
+
+Hostname to query (need --remote).
+
+=item B<--ssh-option>
+
+Specify multiple options like the user (example: --ssh-option='-l=centreon-engine' --ssh-option='-p=52').
+
+=item B<--command>
+
+Varnishstat Binary Filename (Default: varnishstat)
+
+=item B<--command-path>
+
+Directory Path to Varnishstat Binary File (Default: /usr/bin)
+
+=item B<--command-options>
+
+Parameter for Binary File (Default: ' -1 ')
+
+=item B<--warning-*>
+
+Warning Threshold for: 
+objsendfile => Objects sent with sendfile,
+objwrite    => Objects sent with write,
+objoverflow => Objects overflowing workspace
+
+=item B<--critical-*>
+
+Critical Threshold for: 
+objsendfile => Objects sent with sendfile,
+objwrite    => Objects sent with write,
+objoverflow => Objects overflowing workspace
+
+=back
+
+=cut
\ No newline at end of file
diff --git a/apps/varnish/local/mode/sessions.pm b/apps/varnish/local/mode/sessions.pm
new file mode 100644
index 000000000..7ad926b9e
--- /dev/null
+++ b/apps/varnish/local/mode/sessions.pm
@@ -0,0 +1,275 @@
+###############################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an timeelapsedutable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting timeelapsedutable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Author : Florian Asche 
+#
+####################################################################################
+
+package apps::varnish::local::mode::sessions;
+
+use base qw(centreon::plugins::mode);
+use centreon::plugins::misc;
+use centreon::plugins::statefile;
+use Digest::MD5 qw(md5_hex);
+
+my $maps_counters = {
+    sess_closed   => { thresholds => {
+                                warning_closed  =>  { label => 'warning-closed', exit_value => 'warning' },
+                                critical_closed =>  { label => 'critical-closed', exit_value => 'critical' },
+                              },
+                output_msg => 'Session Closed: %.2f',
+                factor => 1, unit => '',
+               },
+    sess_pipeline => { thresholds => {
+                                warning_pipeline  =>  { label => 'warning-pipeline', exit_value => 'warning' },
+                                critical_pipeline =>  { label => 'critical-pipeline', exit_value => 'critical' },
+                                },
+                 output_msg => 'Session Pipeline: %.2f',
+                 factor => 1, unit => '',
+                },
+    sess_readahead => { thresholds => {
+                                warning_readahead    =>  { label => 'warning-readahead', exit_value => 'warning' },
+                                critical_readahead   =>  { label => 'critical-readahead', exit_value => 'critical' },
+                                },
+                 output_msg => 'Session Read Ahead: %.2f',
+                 factor => 1, unit => '',
+               },
+    sess_linger => { thresholds => {
+                                warning_linger    =>  { label => 'warning-linger', exit_value => 'warning' },
+                                critical_linger   =>  { label => 'critical-linger', exit_value => 'critical' },
+                                },
+                 output_msg => 'Session Linger: %.2f',
+                 factor => 1, unit => '',
+               },
+    sess_herd => { thresholds => {
+                                warning_herd    =>  { label => 'warning-herd', exit_value => 'warning' },
+                                critical_herd   =>  { label => 'critical-herd', exit_value => 'critical' },
+                                },
+                 output_msg => 'Session herd: %.2f',
+                 factor => 1, unit => '',
+               },
+};
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+    {
+        "hostname:s"         => { name => 'hostname' },
+        "remote"             => { name => 'remote' },
+        "ssh-option:s@"      => { name => 'ssh_option' },
+        "ssh-path:s"         => { name => 'ssh_path' },
+        "ssh-command:s"      => { name => 'ssh_command', default => 'ssh' },
+        "timeout:s"          => { name => 'timeout', default => 30 },
+        "sudo"               => { name => 'sudo' },
+        "command:s"          => { name => 'command', default => 'varnishstat' },
+        "command-path:s"     => { name => 'command_path', default => '/usr/bin' },
+        "command-options:s"  => { name => 'command_options', default => ' -1 ' },
+        "command-options2:s" => { name => 'command_options2', default => ' 2>&1' },
+    });
+
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            $options{options}->add_options(arguments => {
+                $maps_counters->{$_}->{thresholds}->{$name}->{label} . ':s'    => { name => $name },
+            });
+        };
+    };
+
+    $self->{instances_done} = {};
+    $self->{statefile_value} = centreon::plugins::statefile->new(%options);
+    return $self;
+};
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+    
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            if (($self->{perfdata}->threshold_validate(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}, value => $self->{option_results}->{$name})) == 0) {
+                $self->{output}->add_option_msg(short_msg => "Wrong " . $maps_counters->{$_}->{thresholds}->{$name}->{label} . " threshold '" . $self->{option_results}->{$name} . "'.");
+                $self->{output}->option_exit();
+            };
+        };
+    };
+    $self->{statefile_value}->check_options(%options);
+};
+
+sub getdata {
+    my ($self, %options) = @_;
+
+    my $stdout = centreon::plugins::misc::execute(output => $self->{output},
+                                                  options => $self->{option_results},
+                                                  sudo => $self->{option_results}->{sudo},
+                                                  command => $self->{option_results}->{command},
+                                                  command_path => $self->{option_results}->{command_path},
+                                                  command_options => $self->{option_results}->{command_options} . $self->{option_results}->{command_options2});
+    #print $stdout;
+
+    foreach (split(/\n/, $stdout)) {
+        #client_conn            7390867         1.00 Client connections
+        # - Symbolic entry name
+        # - Value
+        # - Per-second average over process lifetime, or a period if the value can not be averaged
+        # - Descriptive text
+
+        if  (/^(.\S*)\s*([0-9]*)\s*([0-9.]*)\s(.*)$/i) {
+            #print "FOUND: " . $1 . "=" . $2 . "\n";
+            $self->{result}->{$1} = $2;
+        };
+    };
+};
+
+sub run {
+    my ($self, %options) = @_;
+
+    $self->getdata();
+
+    $self->{statefile_value}->read(statefile => 'cache_apps_varnish' . '_' . $self->{mode} . '_' . (defined($self->{option_results}->{name}) ? md5_hex($self->{option_results}->{name}) : md5_hex('all')));
+    $self->{result}->{last_timestamp} = time();
+    my $old_timestamp = $self->{statefile_value}->get(name => 'last_timestamp');
+    
+    # Calculate
+    my $delta_time = $self->{result}->{last_timestamp} - $old_timestamp;
+    $delta_time = 1 if ($delta_time == 0); # One seconds ;)
+
+    
+    foreach (keys %{$maps_counters}) {
+        #print $_ . "\n";
+        $self->{old_cache}->{$_} = $self->{statefile_value}->get(name => '$_');     # Get Data from Cache
+        $self->{old_cache}->{$_} = 0 if ( $self->{old_cache}->{$_} > $self->{result}->{$_} );
+        $self->{outputdata}->{$_} = ($self->{result}->{$_} - $self->{old_cache}->{$_}) / $delta_time;
+    };
+
+    # Write Cache if not there
+    $self->{statefile_value}->write(data => $self->{result}); 
+    if (!defined($old_timestamp)) {
+        $self->{output}->output_add(severity => 'OK',
+                                    short_msg => "Buffer creation...");
+        $self->{output}->display();
+        $self->{output}->exit();
+    }
+
+    my @exits;
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            push @exits, $self->{perfdata}->threshold_check(value => $self->{outputdata}->{$_}, threshold => [ { label => $maps_counters->{$_}->{thresholds}->{$name}->{label}, 'exit_litteral' => $maps_counters->{$_}->{thresholds}->{$name}->{exit_value} }]);
+        }
+    }
+
+    my $exit = $self->{output}->get_most_critical(status => [ @exits ]);
+    
+
+    my $extra_label = '';
+    $extra_label = '_' . $instance_output if ($num > 1);
+
+    my $str_output = "";
+    my $str_append = '';
+    foreach (keys %{$maps_counters}) {
+        $str_output .= $str_append . sprintf($maps_counters->{$_}->{output_msg}, $self->{outputdata}->{$_} * $maps_counters->{$_}->{factor});
+        $str_append = ', ';
+        my ($warning, $critical);
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            $warning = $self->{perfdata}->get_perfdata_for_output(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}) if ($maps_counters->{$_}->{thresholds}->{$name}->{exit_value} eq 'warning');
+            $critical = $self->{perfdata}->get_perfdata_for_output(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}) if ($maps_counters->{$_}->{thresholds}->{$name}->{exit_value} eq 'critical');
+        }
+        $self->{output}->perfdata_add(label => $_ . $extra_label, unit => $maps_counters->{$_}->{unit},
+                                        value => sprintf("%.2f", $self->{outputdata}->{$_} * $maps_counters->{$_}->{factor}),
+                                        warning => $warning,
+                                        critical => $critical);
+    }
+    $self->{output}->output_add(severity => $exit,
+                                short_msg => $str_output);
+
+    $self->{output}->display();
+    $self->{output}->exit();
+};
+
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check Varnish Cache with varnishstat Command
+
+=over 8
+
+=item B<--remote>
+
+If you dont run this script locally, if you wanna use it remote, you can run it remotely with 'ssh'.
+
+=item B<--hostname>
+
+Hostname to query (need --remote).
+
+=item B<--ssh-option>
+
+Specify multiple options like the user (example: --ssh-option='-l=centreon-engine' --ssh-option='-p=52').
+
+=item B<--command>
+
+Varnishstat Binary Filename (Default: varnishstat)
+
+=item B<--command-path>
+
+Directory Path to Varnishstat Binary File (Default: /usr/bin)
+
+=item B<--command-options>
+
+Parameter for Binary File (Default: ' -1 ')
+
+=item B<--warning-*>
+
+Warning Threshold for: 
+closed    => Session Closed,
+pipeline  => Session Pipeline,
+readahead => Session Read Ahead,
+linger    => Session Linger,
+herd      => Session herd
+
+=item B<--critical-*>
+
+Critical Threshold for: 
+closed    => Session Closed,
+pipeline  => Session Pipeline,
+readahead => Session Read Ahead,
+linger    => Session Linger,
+herd      => Session herd
+
+=back
+
+=cut
\ No newline at end of file
diff --git a/apps/varnish/local/mode/shm.pm b/apps/varnish/local/mode/shm.pm
new file mode 100644
index 000000000..7c2013a33
--- /dev/null
+++ b/apps/varnish/local/mode/shm.pm
@@ -0,0 +1,275 @@
+###############################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an timeelapsedutable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting timeelapsedutable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Author : Florian Asche 
+#
+####################################################################################
+
+package apps::varnish::local::mode::shm;
+
+use base qw(centreon::plugins::mode);
+use centreon::plugins::misc;
+use centreon::plugins::statefile;
+use Digest::MD5 qw(md5_hex);
+
+my $maps_counters = {
+    shm_records   => { thresholds => {
+                                warning_records  =>  { label => 'warning-records', exit_value => 'warning' },
+                                critical_records =>  { label => 'critical-records', exit_value => 'critical' },
+                              },
+                output_msg => 'SHM records: %.2f',
+                factor => 1, unit => '',
+               },
+    shm_writes => { thresholds => {
+                                warning_writes  =>  { label => 'warning-writes', exit_value => 'warning' },
+                                critical_writes =>  { label => 'critical-writes', exit_value => 'critical' },
+                                },
+                 output_msg => 'SHM writes: %.2f',
+                 factor => 1, unit => '',
+                },
+    shm_flushes => { thresholds => {
+                                warning_flushes    =>  { label => 'warning-flushes', exit_value => 'warning' },
+                                critical_flushes   =>  { label => 'critical-flushes', exit_value => 'critical' },
+                                },
+                 output_msg => 'SHM flushes due to overflow: %.2f',
+                 factor => 1, unit => '',
+               },
+    shm_cont => { thresholds => {
+                                warning_cont    =>  { label => 'warning-cont', exit_value => 'warning' },
+                                critical_cont   =>  { label => 'critical-cont', exit_value => 'critical' },
+                                },
+                 output_msg => 'SHM MTX contention: %.2f',
+                 factor => 1, unit => '',
+               },
+    shm_cycles => { thresholds => {
+                                warning_cycles    =>  { label => 'warning-cycles', exit_value => 'warning' },
+                                critical_cycles   =>  { label => 'critical-cycles', exit_value => 'critical' },
+                                },
+                 output_msg => 'SHM cycles through buffer: %.2f',
+                 factor => 1, unit => '',
+               },
+};
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+    {
+        "hostname:s"         => { name => 'hostname' },
+        "remote"             => { name => 'remote' },
+        "ssh-option:s@"      => { name => 'ssh_option' },
+        "ssh-path:s"         => { name => 'ssh_path' },
+        "ssh-command:s"      => { name => 'ssh_command', default => 'ssh' },
+        "timeout:s"          => { name => 'timeout', default => 30 },
+        "sudo"               => { name => 'sudo' },
+        "command:s"          => { name => 'command', default => 'varnishstat' },
+        "command-path:s"     => { name => 'command_path', default => '/usr/bin' },
+        "command-options:s"  => { name => 'command_options', default => ' -1 ' },
+        "command-options2:s" => { name => 'command_options2', default => ' 2>&1' },
+    });
+
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            $options{options}->add_options(arguments => {
+                $maps_counters->{$_}->{thresholds}->{$name}->{label} . ':s'    => { name => $name },
+            });
+        };
+    };
+
+    $self->{instances_done} = {};
+    $self->{statefile_value} = centreon::plugins::statefile->new(%options);
+    return $self;
+};
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+    
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            if (($self->{perfdata}->threshold_validate(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}, value => $self->{option_results}->{$name})) == 0) {
+                $self->{output}->add_option_msg(short_msg => "Wrong " . $maps_counters->{$_}->{thresholds}->{$name}->{label} . " threshold '" . $self->{option_results}->{$name} . "'.");
+                $self->{output}->option_exit();
+            };
+        };
+    };
+    $self->{statefile_value}->check_options(%options);
+};
+
+sub getdata {
+    my ($self, %options) = @_;
+
+    my $stdout = centreon::plugins::misc::execute(output => $self->{output},
+                                                  options => $self->{option_results},
+                                                  sudo => $self->{option_results}->{sudo},
+                                                  command => $self->{option_results}->{command},
+                                                  command_path => $self->{option_results}->{command_path},
+                                                  command_options => $self->{option_results}->{command_options} . $self->{option_results}->{command_options2});
+    #print $stdout;
+
+    foreach (split(/\n/, $stdout)) {
+        #client_conn            7390867         1.00 Client connections
+        # - Symbolic entry name
+        # - Value
+        # - Per-second average over process lifetime, or a period if the value can not be averaged
+        # - Descriptive text
+
+        if  (/^(.\S*)\s*([0-9]*)\s*([0-9.]*)\s(.*)$/i) {
+            #print "FOUND: " . $1 . "=" . $2 . "\n";
+            $self->{result}->{$1} = $2;
+        };
+    };
+};
+
+sub run {
+    my ($self, %options) = @_;
+
+    $self->getdata();
+
+    $self->{statefile_value}->read(statefile => 'cache_apps_varnish' . '_' . $self->{mode} . '_' . (defined($self->{option_results}->{name}) ? md5_hex($self->{option_results}->{name}) : md5_hex('all')));
+    $self->{result}->{last_timestamp} = time();
+    my $old_timestamp = $self->{statefile_value}->get(name => 'last_timestamp');
+    
+    # Calculate
+    my $delta_time = $self->{result}->{last_timestamp} - $old_timestamp;
+    $delta_time = 1 if ($delta_time == 0); # One seconds ;)
+
+    
+    foreach (keys %{$maps_counters}) {
+        #print $_ . "\n";
+        $self->{old_cache}->{$_} = $self->{statefile_value}->get(name => '$_');     # Get Data from Cache
+        $self->{old_cache}->{$_} = 0 if ( $self->{old_cache}->{$_} > $self->{result}->{$_} );
+        $self->{outputdata}->{$_} = ($self->{result}->{$_} - $self->{old_cache}->{$_}) / $delta_time;
+    };
+
+    # Write Cache if not there
+    $self->{statefile_value}->write(data => $self->{result}); 
+    if (!defined($old_timestamp)) {
+        $self->{output}->output_add(severity => 'OK',
+                                    short_msg => "Buffer creation...");
+        $self->{output}->display();
+        $self->{output}->exit();
+    }
+
+    my @exits;
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            push @exits, $self->{perfdata}->threshold_check(value => $self->{outputdata}->{$_}, threshold => [ { label => $maps_counters->{$_}->{thresholds}->{$name}->{label}, 'exit_litteral' => $maps_counters->{$_}->{thresholds}->{$name}->{exit_value} }]);
+        }
+    }
+
+    my $exit = $self->{output}->get_most_critical(status => [ @exits ]);
+    
+
+    my $extra_label = '';
+    $extra_label = '_' . $instance_output if ($num > 1);
+
+    my $str_output = "";
+    my $str_append = '';
+    foreach (keys %{$maps_counters}) {
+        $str_output .= $str_append . sprintf($maps_counters->{$_}->{output_msg}, $self->{outputdata}->{$_} * $maps_counters->{$_}->{factor});
+        $str_append = ', ';
+        my ($warning, $critical);
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            $warning = $self->{perfdata}->get_perfdata_for_output(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}) if ($maps_counters->{$_}->{thresholds}->{$name}->{exit_value} eq 'warning');
+            $critical = $self->{perfdata}->get_perfdata_for_output(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}) if ($maps_counters->{$_}->{thresholds}->{$name}->{exit_value} eq 'critical');
+        }
+        $self->{output}->perfdata_add(label => $_ . $extra_label, unit => $maps_counters->{$_}->{unit},
+                                        value => sprintf("%.2f", $self->{outputdata}->{$_} * $maps_counters->{$_}->{factor}),
+                                        warning => $warning,
+                                        critical => $critical);
+    }
+    $self->{output}->output_add(severity => $exit,
+                                short_msg => $str_output);
+
+    $self->{output}->display();
+    $self->{output}->exit();
+};
+
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check Varnish Cache with varnishstat Command
+
+=over 8
+
+=item B<--remote>
+
+If you dont run this script locally, if you wanna use it remote, you can run it remotely with 'ssh'.
+
+=item B<--hostname>
+
+Hostname to query (need --remote).
+
+=item B<--ssh-option>
+
+Specify multiple options like the user (example: --ssh-option='-l=centreon-engine' --ssh-option='-p=52').
+
+=item B<--command>
+
+Varnishstat Binary Filename (Default: varnishstat)
+
+=item B<--command-path>
+
+Directory Path to Varnishstat Binary File (Default: /usr/bin)
+
+=item B<--command-options>
+
+Parameter for Binary File (Default: ' -1 ')
+
+=item B<--warning-*>
+
+Warning Threshold for: 
+records => SHM records,
+writes  => SHM writes,
+flushes => SHM flushes due to overflow,
+cont    => SHM MTX contention,
+cycles  => SHM cycles through buffer
+
+=item B<--critical-*>
+
+Critical Threshold for: 
+records => SHM records,
+writes  => SHM writes,
+flushes => SHM flushes due to overflow,
+cont    => SHM MTX contention,
+cycles  => SHM cycles through buffer
+
+=back
+
+=cut
\ No newline at end of file
diff --git a/apps/varnish/local/mode/sms.pm b/apps/varnish/local/mode/sms.pm
new file mode 100644
index 000000000..0eaf281e5
--- /dev/null
+++ b/apps/varnish/local/mode/sms.pm
@@ -0,0 +1,275 @@
+###############################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an timeelapsedutable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting timeelapsedutable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Author : Florian Asche 
+#
+####################################################################################
+
+package apps::varnish::local::mode::sms;
+
+use base qw(centreon::plugins::mode);
+use centreon::plugins::misc;
+use centreon::plugins::statefile;
+use Digest::MD5 qw(md5_hex);
+
+my $maps_counters = {
+    sms_nreq   => { thresholds => {
+                                warning_nreq  =>  { label => 'warning-nreq', exit_value => 'warning' },
+                                critical_nreq =>  { label => 'critical-nreq', exit_value => 'critical' },
+                              },
+                output_msg => 'SMS allocator requests: %.2f',
+                factor => 1, unit => '',
+               },
+    sms_nobj => { thresholds => {
+                                warning_nobj  =>  { label => 'warning-nobj', exit_value => 'warning' },
+                                critical_nobj =>  { label => 'critical-nobj', exit_value => 'critical' },
+                                },
+                 output_msg => 'SMS outstanding allocations: %.2f',
+                 factor => 1, unit => '',
+                },
+    sms_nbytes => { thresholds => {
+                                warning_nbytes    =>  { label => 'warning-nbytes', exit_value => 'warning' },
+                                critical_nbytes   =>  { label => 'critical-nbytes', exit_value => 'critical' },
+                                },
+                 output_msg => 'SMS outstanding bytes: %.2f',
+                 factor => 1, unit => '',
+               },
+    sms_balloc => { thresholds => {
+                                warning_balloc    =>  { label => 'warning-balloc', exit_value => 'warning' },
+                                critical_balloc   =>  { label => 'critical-balloc', exit_value => 'critical' },
+                                },
+                 output_msg => 'SMS bytes allocated: %.2f',
+                 factor => 1, unit => '',
+               },
+    sms_bfree => { thresholds => {
+                                warning_bfree    =>  { label => 'warning-bfree', exit_value => 'warning' },
+                                critical_bfree   =>  { label => 'critical-bfree', exit_value => 'critical' },
+                                },
+                 output_msg => 'SMS bytes freed: %.2f',
+                 factor => 1, unit => '',
+               },
+};
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+    {
+        "hostname:s"         => { name => 'hostname' },
+        "remote"             => { name => 'remote' },
+        "ssh-option:s@"      => { name => 'ssh_option' },
+        "ssh-path:s"         => { name => 'ssh_path' },
+        "ssh-command:s"      => { name => 'ssh_command', default => 'ssh' },
+        "timeout:s"          => { name => 'timeout', default => 30 },
+        "sudo"               => { name => 'sudo' },
+        "command:s"          => { name => 'command', default => 'varnishstat' },
+        "command-path:s"     => { name => 'command_path', default => '/usr/bin' },
+        "command-options:s"  => { name => 'command_options', default => ' -1 ' },
+        "command-options2:s" => { name => 'command_options2', default => ' 2>&1' },
+    });
+
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            $options{options}->add_options(arguments => {
+                $maps_counters->{$_}->{thresholds}->{$name}->{label} . ':s'    => { name => $name },
+            });
+        };
+    };
+
+    $self->{instances_done} = {};
+    $self->{statefile_value} = centreon::plugins::statefile->new(%options);
+    return $self;
+};
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+    
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            if (($self->{perfdata}->threshold_validate(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}, value => $self->{option_results}->{$name})) == 0) {
+                $self->{output}->add_option_msg(short_msg => "Wrong " . $maps_counters->{$_}->{thresholds}->{$name}->{label} . " threshold '" . $self->{option_results}->{$name} . "'.");
+                $self->{output}->option_exit();
+            };
+        };
+    };
+    $self->{statefile_value}->check_options(%options);
+};
+
+sub getdata {
+    my ($self, %options) = @_;
+
+    my $stdout = centreon::plugins::misc::execute(output => $self->{output},
+                                                  options => $self->{option_results},
+                                                  sudo => $self->{option_results}->{sudo},
+                                                  command => $self->{option_results}->{command},
+                                                  command_path => $self->{option_results}->{command_path},
+                                                  command_options => $self->{option_results}->{command_options} . $self->{option_results}->{command_options2});
+    #print $stdout;
+
+    foreach (split(/\n/, $stdout)) {
+        #client_conn            7390867         1.00 Client connections
+        # - Symbolic entry name
+        # - Value
+        # - Per-second average over process lifetime, or a period if the value can not be averaged
+        # - Descriptive text
+
+        if  (/^(.\S*)\s*([0-9]*)\s*([0-9.]*)\s(.*)$/i) {
+            #print "FOUND: " . $1 . "=" . $2 . "\n";
+            $self->{result}->{$1} = $2;
+        };
+    };
+};
+
+sub run {
+    my ($self, %options) = @_;
+
+    $self->getdata();
+
+    $self->{statefile_value}->read(statefile => 'cache_apps_varnish' . '_' . $self->{mode} . '_' . (defined($self->{option_results}->{name}) ? md5_hex($self->{option_results}->{name}) : md5_hex('all')));
+    $self->{result}->{last_timestamp} = time();
+    my $old_timestamp = $self->{statefile_value}->get(name => 'last_timestamp');
+    
+    # Calculate
+    my $delta_time = $self->{result}->{last_timestamp} - $old_timestamp;
+    $delta_time = 1 if ($delta_time == 0); # One seconds ;)
+
+    
+    foreach (keys %{$maps_counters}) {
+        #print $_ . "\n";
+        $self->{old_cache}->{$_} = $self->{statefile_value}->get(name => '$_');     # Get Data from Cache
+        $self->{old_cache}->{$_} = 0 if ( $self->{old_cache}->{$_} > $self->{result}->{$_} );
+        $self->{outputdata}->{$_} = ($self->{result}->{$_} - $self->{old_cache}->{$_}) / $delta_time;
+    };
+
+    # Write Cache if not there
+    $self->{statefile_value}->write(data => $self->{result}); 
+    if (!defined($old_timestamp)) {
+        $self->{output}->output_add(severity => 'OK',
+                                    short_msg => "Buffer creation...");
+        $self->{output}->display();
+        $self->{output}->exit();
+    }
+
+    my @exits;
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            push @exits, $self->{perfdata}->threshold_check(value => $self->{outputdata}->{$_}, threshold => [ { label => $maps_counters->{$_}->{thresholds}->{$name}->{label}, 'exit_litteral' => $maps_counters->{$_}->{thresholds}->{$name}->{exit_value} }]);
+        }
+    }
+
+    my $exit = $self->{output}->get_most_critical(status => [ @exits ]);
+    
+
+    my $extra_label = '';
+    $extra_label = '_' . $instance_output if ($num > 1);
+
+    my $str_output = "";
+    my $str_append = '';
+    foreach (keys %{$maps_counters}) {
+        $str_output .= $str_append . sprintf($maps_counters->{$_}->{output_msg}, $self->{outputdata}->{$_} * $maps_counters->{$_}->{factor});
+        $str_append = ', ';
+        my ($warning, $critical);
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            $warning = $self->{perfdata}->get_perfdata_for_output(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}) if ($maps_counters->{$_}->{thresholds}->{$name}->{exit_value} eq 'warning');
+            $critical = $self->{perfdata}->get_perfdata_for_output(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}) if ($maps_counters->{$_}->{thresholds}->{$name}->{exit_value} eq 'critical');
+        }
+        $self->{output}->perfdata_add(label => $_ . $extra_label, unit => $maps_counters->{$_}->{unit},
+                                        value => sprintf("%.2f", $self->{outputdata}->{$_} * $maps_counters->{$_}->{factor}),
+                                        warning => $warning,
+                                        critical => $critical);
+    }
+    $self->{output}->output_add(severity => $exit,
+                                short_msg => $str_output);
+
+    $self->{output}->display();
+    $self->{output}->exit();
+};
+
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check Varnish Cache with varnishstat Command
+
+=over 8
+
+=item B<--remote>
+
+If you dont run this script locally, if you wanna use it remote, you can run it remotely with 'ssh'.
+
+=item B<--hostname>
+
+Hostname to query (need --remote).
+
+=item B<--ssh-option>
+
+Specify multiple options like the user (example: --ssh-option='-l=centreon-engine' --ssh-option='-p=52').
+
+=item B<--command>
+
+Varnishstat Binary Filename (Default: varnishstat)
+
+=item B<--command-path>
+
+Directory Path to Varnishstat Binary File (Default: /usr/bin)
+
+=item B<--command-options>
+
+Parameter for Binary File (Default: ' -1 ')
+
+=item B<--warning-*>
+
+Warning Threshold for: 
+nreq   => SMS allocator requests,
+nobj   => SMS outstanding allocations,
+nbytes => SMS outstanding bytes,
+balloc => SMS bytes allocated,
+bfree  => SMS bytes freed
+
+=item B<--critical-*>
+
+Critical Threshold for: 
+nreq   => SMS allocator requests,
+nobj   => SMS outstanding allocations,
+nbytes => SMS outstanding bytes,
+balloc => SMS bytes allocated,
+bfree  => SMS bytes freed
+
+=back
+
+=cut
\ No newline at end of file
diff --git a/apps/varnish/local/mode/totals.pm b/apps/varnish/local/mode/totals.pm
new file mode 100644
index 000000000..cc862f550
--- /dev/null
+++ b/apps/varnish/local/mode/totals.pm
@@ -0,0 +1,302 @@
+###############################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an timeelapsedutable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting timeelapsedutable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Author : Florian Asche 
+#
+####################################################################################
+
+package apps::varnish::local::mode::totals;
+
+use base qw(centreon::plugins::mode);
+use centreon::plugins::misc;
+use centreon::plugins::statefile;
+use Digest::MD5 qw(md5_hex);
+
+my $maps_counters = {
+    s_sess   => { thresholds => {
+                                warning_sess  =>  { label => 'warning-sess', exit_value => 'warning' },
+                                critical_sess =>  { label => 'critical-sess', exit_value => 'critical' },
+                              },
+                output_msg => 'Total Sessions: %.2f',
+                factor => 1, unit => '',
+               },
+    s_req => { thresholds => {
+                                warning_req  =>  { label => 'warning-req', exit_value => 'warning' },
+                                critical_req =>  { label => 'critical-req', exit_value => 'critical' },
+                                },
+                 output_msg => 'Total Requests: %.2f',
+                 factor => 1, unit => '',
+                },
+    s_pipe => { thresholds => {
+                                warning_pipe    =>  { label => 'warning-pipe', exit_value => 'warning' },
+                                critical_pipe   =>  { label => 'critical-pipe', exit_value => 'critical' },
+                                },
+                 output_msg => 'Total pipe: %.2f',
+                 factor => 1, unit => '',
+               },
+    s_pass => { thresholds => {
+                                warning_pass    =>  { label => 'warning-pass', exit_value => 'warning' },
+                                critical_pass   =>  { label => 'critical-pass', exit_value => 'critical' },
+                                },
+                 output_msg => 'Total pass: %.2f',
+                 factor => 1, unit => '',
+               },
+    s_fetch => { thresholds => {
+                                warning_fetch    =>  { label => 'warning-fetch', exit_value => 'warning' },
+                                critical_fetch   =>  { label => 'critical-fetch', exit_value => 'critical' },
+                                },
+                 output_msg => 'Total fetch: %.2f',
+                 factor => 1, unit => '',
+               },
+    s_hdrbytes => { thresholds => {
+                                warning_hdrbytes    =>  { label => 'warning-hdrbytes', exit_value => 'warning' },
+                                critical_hdrbytes   =>  { label => 'critical-hdrbytes', exit_value => 'critical' },
+                                },
+                 output_msg => 'Total header bytes: %.2f',
+                 factor => 1, unit => '',
+               },
+    s_bodybytes => { thresholds => {
+                                warning_bodybytes    =>  { label => 'warning-bodybytes', exit_value => 'warning' },
+                                critical_bodybytes   =>  { label => 'critical-bodybytes', exit_value => 'critical' },
+                                },
+                 output_msg => 'Total body bytes: %.2f',
+                 factor => 1, unit => '',
+               },
+    accept_fail => { thresholds => {
+                                warning_fail    =>  { label => 'warning-fail', exit_value => 'warning' },
+                                critical_fail   =>  { label => 'critical-fail', exit_value => 'critical' },
+                                },
+                 output_msg => 'Accept failures: %.2f',
+                 factor => 1, unit => '',
+               },
+};
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+    {
+        "hostname:s"         => { name => 'hostname' },
+        "remote"             => { name => 'remote' },
+        "ssh-option:s@"      => { name => 'ssh_option' },
+        "ssh-path:s"         => { name => 'ssh_path' },
+        "ssh-command:s"      => { name => 'ssh_command', default => 'ssh' },
+        "timeout:s"          => { name => 'timeout', default => 30 },
+        "sudo"               => { name => 'sudo' },
+        "command:s"          => { name => 'command', default => 'varnishstat' },
+        "command-path:s"     => { name => 'command_path', default => '/usr/bin' },
+        "command-options:s"  => { name => 'command_options', default => ' -1 ' },
+        "command-options2:s" => { name => 'command_options2', default => ' 2>&1' },
+    });
+
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            $options{options}->add_options(arguments => {
+                $maps_counters->{$_}->{thresholds}->{$name}->{label} . ':s'    => { name => $name },
+            });
+        };
+    };
+
+    $self->{instances_done} = {};
+    $self->{statefile_value} = centreon::plugins::statefile->new(%options);
+    return $self;
+};
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+    
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            if (($self->{perfdata}->threshold_validate(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}, value => $self->{option_results}->{$name})) == 0) {
+                $self->{output}->add_option_msg(short_msg => "Wrong " . $maps_counters->{$_}->{thresholds}->{$name}->{label} . " threshold '" . $self->{option_results}->{$name} . "'.");
+                $self->{output}->option_exit();
+            };
+        };
+    };
+    $self->{statefile_value}->check_options(%options);
+};
+
+sub getdata {
+    my ($self, %options) = @_;
+
+    my $stdout = centreon::plugins::misc::execute(output => $self->{output},
+                                                  options => $self->{option_results},
+                                                  sudo => $self->{option_results}->{sudo},
+                                                  command => $self->{option_results}->{command},
+                                                  command_path => $self->{option_results}->{command_path},
+                                                  command_options => $self->{option_results}->{command_options} . $self->{option_results}->{command_options2});
+    #print $stdout;
+
+    foreach (split(/\n/, $stdout)) {
+        #client_conn            7390867         1.00 Client connections
+        # - Symbolic entry name
+        # - Value
+        # - Per-second average over process lifetime, or a period if the value can not be averaged
+        # - Descriptive text
+
+        if  (/^(.\S*)\s*([0-9]*)\s*([0-9.]*)\s(.*)$/i) {
+            #print "FOUND: " . $1 . "=" . $2 . "\n";
+            $self->{result}->{$1} = $2;
+        };
+    };
+};
+
+sub run {
+    my ($self, %options) = @_;
+
+    $self->getdata();
+
+    $self->{statefile_value}->read(statefile => 'cache_apps_varnish' . '_' . $self->{mode} . '_' . (defined($self->{option_results}->{name}) ? md5_hex($self->{option_results}->{name}) : md5_hex('all')));
+    $self->{result}->{last_timestamp} = time();
+    my $old_timestamp = $self->{statefile_value}->get(name => 'last_timestamp');
+    
+    # Calculate
+    my $delta_time = $self->{result}->{last_timestamp} - $old_timestamp;
+    $delta_time = 1 if ($delta_time == 0); # One seconds ;)
+
+    
+    foreach (keys %{$maps_counters}) {
+        #print $_ . "\n";
+        $self->{old_cache}->{$_} = $self->{statefile_value}->get(name => '$_');     # Get Data from Cache
+        $self->{old_cache}->{$_} = 0 if ( $self->{old_cache}->{$_} > $self->{result}->{$_} );
+        $self->{outputdata}->{$_} = ($self->{result}->{$_} - $self->{old_cache}->{$_}) / $delta_time;
+    };
+
+    # Write Cache if not there
+    $self->{statefile_value}->write(data => $self->{result}); 
+    if (!defined($old_timestamp)) {
+        $self->{output}->output_add(severity => 'OK',
+                                    short_msg => "Buffer creation...");
+        $self->{output}->display();
+        $self->{output}->exit();
+    }
+
+    my @exits;
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            push @exits, $self->{perfdata}->threshold_check(value => $self->{outputdata}->{$_}, threshold => [ { label => $maps_counters->{$_}->{thresholds}->{$name}->{label}, 'exit_litteral' => $maps_counters->{$_}->{thresholds}->{$name}->{exit_value} }]);
+        }
+    }
+
+    my $exit = $self->{output}->get_most_critical(status => [ @exits ]);
+    
+
+    my $extra_label = '';
+    $extra_label = '_' . $instance_output if ($num > 1);
+
+    my $str_output = "";
+    my $str_append = '';
+    foreach (keys %{$maps_counters}) {
+        $str_output .= $str_append . sprintf($maps_counters->{$_}->{output_msg}, $self->{outputdata}->{$_} * $maps_counters->{$_}->{factor});
+        $str_append = ', ';
+        my ($warning, $critical);
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            $warning = $self->{perfdata}->get_perfdata_for_output(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}) if ($maps_counters->{$_}->{thresholds}->{$name}->{exit_value} eq 'warning');
+            $critical = $self->{perfdata}->get_perfdata_for_output(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}) if ($maps_counters->{$_}->{thresholds}->{$name}->{exit_value} eq 'critical');
+        }
+        $self->{output}->perfdata_add(label => $_ . $extra_label, unit => $maps_counters->{$_}->{unit},
+                                        value => sprintf("%.2f", $self->{outputdata}->{$_} * $maps_counters->{$_}->{factor}),
+                                        warning => $warning,
+                                        critical => $critical);
+    }
+    $self->{output}->output_add(severity => $exit,
+                                short_msg => $str_output);
+
+    $self->{output}->display();
+    $self->{output}->exit();
+};
+
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check Varnish Cache with varnishstat Command
+
+=over 8
+
+=item B<--remote>
+
+If you dont run this script locally, if you wanna use it remote, you can run it remotely with 'ssh'.
+
+=item B<--hostname>
+
+Hostname to query (need --remote).
+
+=item B<--ssh-option>
+
+Specify multiple options like the user (example: --ssh-option='-l=centreon-engine' --ssh-option='-p=52').
+
+=item B<--command>
+
+Varnishstat Binary Filename (Default: varnishstat)
+
+=item B<--command-path>
+
+Directory Path to Varnishstat Binary File (Default: /usr/bin)
+
+=item B<--command-options>
+
+Parameter for Binary File (Default: ' -1 ')
+
+=item B<--warning-*>
+
+Warning Threshold for: 
+sess      => Total Sessions,
+req       => Total Requests,
+pipe      => Total pipe,
+pass      => Total pass,
+fetch     => Total fetch,
+hdrbytes  => Total header bytes,
+bodybytes => Total body bytes,
+fail      => Accept failures
+
+=item B<--critical-*>
+
+Critical Threshold for: 
+sess      => Total Sessions,
+req       => Total Requests,
+pipe      => Total pipe,
+pass      => Total pass,
+fetch     => Total fetch,
+hdrbytes  => Total header bytes,
+bodybytes => Total body bytes,
+fail      => Accept failures
+
+=back
+
+=cut
\ No newline at end of file
diff --git a/apps/varnish/local/mode/uptime.pm b/apps/varnish/local/mode/uptime.pm
new file mode 100644
index 000000000..9f4980b3c
--- /dev/null
+++ b/apps/varnish/local/mode/uptime.pm
@@ -0,0 +1,237 @@
+###############################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an timeelapsedutable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting timeelapsedutable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Author : Florian Asche 
+#
+####################################################################################
+
+package apps::varnish::local::mode::uptime;
+
+use base qw(centreon::plugins::mode);
+use centreon::plugins::misc;
+use centreon::plugins::statefile;
+use Digest::MD5 qw(md5_hex);
+
+my $maps_counters = {
+    uptime   => { thresholds => {
+                                warning  =>  { label => 'warning', exit_value => 'warning' },
+                                critical =>  { label => 'critical', exit_value => 'critical' },
+                              },
+                output_msg => 'Uptime in sec: %.2f',
+                factor => 1, unit => '',
+               },
+};
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+    {
+        "hostname:s"         => { name => 'hostname' },
+        "remote"             => { name => 'remote' },
+        "ssh-option:s@"      => { name => 'ssh_option' },
+        "ssh-path:s"         => { name => 'ssh_path' },
+        "ssh-command:s"      => { name => 'ssh_command', default => 'ssh' },
+        "timeout:s"          => { name => 'timeout', default => 30 },
+        "sudo"               => { name => 'sudo' },
+        "command:s"          => { name => 'command', default => 'varnishstat' },
+        "command-path:s"     => { name => 'command_path', default => '/usr/bin' },
+        "command-options:s"  => { name => 'command_options', default => ' -1 ' },
+        "command-options2:s" => { name => 'command_options2', default => ' 2>&1' },
+    });
+
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            $options{options}->add_options(arguments => {
+                $maps_counters->{$_}->{thresholds}->{$name}->{label} . ':s'    => { name => $name },
+            });
+        };
+    };
+
+    $self->{instances_done} = {};
+    $self->{statefile_value} = centreon::plugins::statefile->new(%options);
+    return $self;
+};
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+    
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            if (($self->{perfdata}->threshold_validate(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}, value => $self->{option_results}->{$name})) == 0) {
+                $self->{output}->add_option_msg(short_msg => "Wrong " . $maps_counters->{$_}->{thresholds}->{$name}->{label} . " threshold '" . $self->{option_results}->{$name} . "'.");
+                $self->{output}->option_exit();
+            };
+        };
+    };
+    $self->{statefile_value}->check_options(%options);
+};
+
+sub getdata {
+    my ($self, %options) = @_;
+
+    my $stdout = centreon::plugins::misc::execute(output => $self->{output},
+                                                  options => $self->{option_results},
+                                                  sudo => $self->{option_results}->{sudo},
+                                                  command => $self->{option_results}->{command},
+                                                  command_path => $self->{option_results}->{command_path},
+                                                  command_options => $self->{option_results}->{command_options} . $self->{option_results}->{command_options2});
+    #print $stdout;
+
+    foreach (split(/\n/, $stdout)) {
+        #client_conn            7390867         1.00 Client connections
+        # - Symbolic entry name
+        # - Value
+        # - Per-second average over process lifetime, or a period if the value can not be averaged
+        # - Descriptive text
+
+        if  (/^(.\S*)\s*([0-9]*)\s*([0-9.]*)\s(.*)$/i) {
+            #print "FOUND: " . $1 . "=" . $2 . "\n";
+            $self->{result}->{$1} = $2;
+        };
+    };
+};
+
+sub run {
+    my ($self, %options) = @_;
+
+    $self->getdata();
+
+    $self->{statefile_value}->read(statefile => 'cache_apps_varnish' . '_' . $self->{mode} . '_' . (defined($self->{option_results}->{name}) ? md5_hex($self->{option_results}->{name}) : md5_hex('all')));
+    $self->{result}->{last_timestamp} = time();
+    my $old_timestamp = $self->{statefile_value}->get(name => 'last_timestamp');
+    
+    # Calculate
+    my $delta_time = $self->{result}->{last_timestamp} - $old_timestamp;
+    $delta_time = 1 if ($delta_time == 0); # One seconds ;)
+
+    
+    foreach (keys %{$maps_counters}) {
+        #print $_ . "\n";
+        $self->{old_cache}->{$_} = $self->{statefile_value}->get(name => '$_');     # Get Data from Cache
+        $self->{old_cache}->{$_} = 0 if ( $self->{old_cache}->{$_} > $self->{result}->{$_} );
+        $self->{outputdata}->{$_} = ($self->{result}->{$_} - $self->{old_cache}->{$_}) / $delta_time;
+    };
+
+    # Write Cache if not there
+    $self->{statefile_value}->write(data => $self->{result}); 
+    if (!defined($old_timestamp)) {
+        $self->{output}->output_add(severity => 'OK',
+                                    short_msg => "Buffer creation...");
+        $self->{output}->display();
+        $self->{output}->exit();
+    }
+
+    my @exits;
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            push @exits, $self->{perfdata}->threshold_check(value => $self->{outputdata}->{$_}, threshold => [ { label => $maps_counters->{$_}->{thresholds}->{$name}->{label}, 'exit_litteral' => $maps_counters->{$_}->{thresholds}->{$name}->{exit_value} }]);
+        }
+    }
+
+    my $exit = $self->{output}->get_most_critical(status => [ @exits ]);
+    
+
+    my $extra_label = '';
+    $extra_label = '_' . $instance_output if ($num > 1);
+
+    my $str_output = "";
+    my $str_append = '';
+    foreach (keys %{$maps_counters}) {
+        $str_output .= $str_append . sprintf($maps_counters->{$_}->{output_msg}, $self->{outputdata}->{$_} * $maps_counters->{$_}->{factor});
+        $str_append = ', ';
+        my ($warning, $critical);
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            $warning = $self->{perfdata}->get_perfdata_for_output(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}) if ($maps_counters->{$_}->{thresholds}->{$name}->{exit_value} eq 'warning');
+            $critical = $self->{perfdata}->get_perfdata_for_output(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}) if ($maps_counters->{$_}->{thresholds}->{$name}->{exit_value} eq 'critical');
+        }
+        $self->{output}->perfdata_add(label => $_ . $extra_label, unit => $maps_counters->{$_}->{unit},
+                                        value => sprintf("%.2f", $self->{outputdata}->{$_} * $maps_counters->{$_}->{factor}),
+                                        warning => $warning,
+                                        critical => $critical);
+    }
+    $self->{output}->output_add(severity => $exit,
+                                short_msg => $str_output);
+
+    $self->{output}->display();
+    $self->{output}->exit();
+};
+
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check Varnish Cache with varnishstat Command
+
+=over 8
+
+=item B<--remote>
+
+If you dont run this script locally, if you wanna use it remote, you can run it remotely with 'ssh'.
+
+=item B<--hostname>
+
+Hostname to query (need --remote).
+
+=item B<--ssh-option>
+
+Specify multiple options like the user (example: --ssh-option='-l=centreon-engine' --ssh-option='-p=52').
+
+=item B<--command>
+
+Varnishstat Binary Filename (Default: varnishstat)
+
+=item B<--command-path>
+
+Directory Path to Varnishstat Binary File (Default: /usr/bin)
+
+=item B<--command-options>
+
+Parameter for Binary File (Default: ' -1 ')
+
+=item B<--warning>
+
+Warning Threshold for Uptime
+
+=item B<--critical>
+
+Critical Threshold for Uptime
+
+=back
+
+=cut
\ No newline at end of file
diff --git a/apps/varnish/local/mode/vcl.pm b/apps/varnish/local/mode/vcl.pm
new file mode 100644
index 000000000..9cfb69830
--- /dev/null
+++ b/apps/varnish/local/mode/vcl.pm
@@ -0,0 +1,258 @@
+###############################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an timeelapsedutable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting timeelapsedutable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Author : Florian Asche 
+#
+####################################################################################
+
+package apps::varnish::local::mode::vcl;
+
+use base qw(centreon::plugins::mode);
+use centreon::plugins::misc;
+use centreon::plugins::statefile;
+use Digest::MD5 qw(md5_hex);
+
+#n_vcl_avail could be max from n_vcl
+my $maps_counters = {
+    n_vcl   => { thresholds => {
+                                warning_total  =>  { label => 'warning-total', exit_value => 'warning' },
+                                critical_total =>  { label => 'critical-total', exit_value => 'critical' },
+                              },
+                output_msg => 'N vcl total: %.2f',
+                factor => 1, unit => '',
+               },
+    n_vcl_avail => { thresholds => {
+                                warning_avail  =>  { label => 'warning-avail', exit_value => 'warning' },
+                                critical_avail =>  { label => 'critical-avail', exit_value => 'critical' },
+                                },
+                 output_msg => 'N vcl available: %.2f',
+                 factor => 1, unit => '',
+                },
+    n_vcl_discard => { thresholds => {
+                                warning_discard    =>  { label => 'warning-discard', exit_value => 'warning' },
+                                critical_discard   =>  { label => 'critical-discard', exit_value => 'critical' },
+                                },
+                 output_msg => 'N vcl discarded: %.2f',
+                 factor => 1, unit => '',
+               },
+};
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+    {
+        "hostname:s"         => { name => 'hostname' },
+        "remote"             => { name => 'remote' },
+        "ssh-option:s@"      => { name => 'ssh_option' },
+        "ssh-path:s"         => { name => 'ssh_path' },
+        "ssh-command:s"      => { name => 'ssh_command', default => 'ssh' },
+        "timeout:s"          => { name => 'timeout', default => 30 },
+        "sudo"               => { name => 'sudo' },
+        "command:s"          => { name => 'command', default => 'varnishstat' },
+        "command-path:s"     => { name => 'command_path', default => '/usr/bin' },
+        "command-options:s"  => { name => 'command_options', default => ' -1 ' },
+        "command-options2:s" => { name => 'command_options2', default => ' 2>&1' },
+    });
+
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            $options{options}->add_options(arguments => {
+                $maps_counters->{$_}->{thresholds}->{$name}->{label} . ':s'    => { name => $name },
+            });
+        };
+    };
+
+    $self->{instances_done} = {};
+    $self->{statefile_value} = centreon::plugins::statefile->new(%options);
+    return $self;
+};
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+    
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            if (($self->{perfdata}->threshold_validate(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}, value => $self->{option_results}->{$name})) == 0) {
+                $self->{output}->add_option_msg(short_msg => "Wrong " . $maps_counters->{$_}->{thresholds}->{$name}->{label} . " threshold '" . $self->{option_results}->{$name} . "'.");
+                $self->{output}->option_exit();
+            };
+        };
+    };
+    $self->{statefile_value}->check_options(%options);
+};
+
+sub getdata {
+    my ($self, %options) = @_;
+
+    my $stdout = centreon::plugins::misc::execute(output => $self->{output},
+                                                  options => $self->{option_results},
+                                                  sudo => $self->{option_results}->{sudo},
+                                                  command => $self->{option_results}->{command},
+                                                  command_path => $self->{option_results}->{command_path},
+                                                  command_options => $self->{option_results}->{command_options} . $self->{option_results}->{command_options2});
+    #print $stdout;
+
+    foreach (split(/\n/, $stdout)) {
+        #client_conn            7390867         1.00 Client connections
+        # - Symbolic entry name
+        # - Value
+        # - Per-second average over process lifetime, or a period if the value can not be averaged
+        # - Descriptive text
+
+        if  (/^(.\S*)\s*([0-9]*)\s*([0-9.]*)\s(.*)$/i) {
+            #print "FOUND: " . $1 . "=" . $2 . "\n";
+            $self->{result}->{$1} = $2;
+        };
+    };
+};
+
+sub run {
+    my ($self, %options) = @_;
+
+    $self->getdata();
+
+    $self->{statefile_value}->read(statefile => 'cache_apps_varnish' . '_' . $self->{mode} . '_' . (defined($self->{option_results}->{name}) ? md5_hex($self->{option_results}->{name}) : md5_hex('all')));
+    $self->{result}->{last_timestamp} = time();
+    my $old_timestamp = $self->{statefile_value}->get(name => 'last_timestamp');
+    
+    # Calculate
+    my $delta_time = $self->{result}->{last_timestamp} - $old_timestamp;
+    $delta_time = 1 if ($delta_time == 0); # One seconds ;)
+
+    
+    foreach (keys %{$maps_counters}) {
+        #print $_ . "\n";
+        $self->{old_cache}->{$_} = $self->{statefile_value}->get(name => '$_');     # Get Data from Cache
+        $self->{old_cache}->{$_} = 0 if ( $self->{old_cache}->{$_} > $self->{result}->{$_} );
+        $self->{outputdata}->{$_} = ($self->{result}->{$_} - $self->{old_cache}->{$_}) / $delta_time;
+    };
+
+    # Write Cache if not there
+    $self->{statefile_value}->write(data => $self->{result}); 
+    if (!defined($old_timestamp)) {
+        $self->{output}->output_add(severity => 'OK',
+                                    short_msg => "Buffer creation...");
+        $self->{output}->display();
+        $self->{output}->exit();
+    }
+
+    my @exits;
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            push @exits, $self->{perfdata}->threshold_check(value => $self->{outputdata}->{$_}, threshold => [ { label => $maps_counters->{$_}->{thresholds}->{$name}->{label}, 'exit_litteral' => $maps_counters->{$_}->{thresholds}->{$name}->{exit_value} }]);
+        }
+    }
+
+    my $exit = $self->{output}->get_most_critical(status => [ @exits ]);
+    
+
+    my $extra_label = '';
+    $extra_label = '_' . $instance_output if ($num > 1);
+
+    my $str_output = "";
+    my $str_append = '';
+    foreach (keys %{$maps_counters}) {
+        $str_output .= $str_append . sprintf($maps_counters->{$_}->{output_msg}, $self->{outputdata}->{$_} * $maps_counters->{$_}->{factor});
+        $str_append = ', ';
+        my ($warning, $critical);
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            $warning = $self->{perfdata}->get_perfdata_for_output(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}) if ($maps_counters->{$_}->{thresholds}->{$name}->{exit_value} eq 'warning');
+            $critical = $self->{perfdata}->get_perfdata_for_output(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}) if ($maps_counters->{$_}->{thresholds}->{$name}->{exit_value} eq 'critical');
+        }
+        $self->{output}->perfdata_add(label => $_ . $extra_label, unit => $maps_counters->{$_}->{unit},
+                                        value => sprintf("%.2f", $self->{outputdata}->{$_} * $maps_counters->{$_}->{factor}),
+                                        warning => $warning,
+                                        critical => $critical);
+    }
+    $self->{output}->output_add(severity => $exit,
+                                short_msg => $str_output);
+
+    $self->{output}->display();
+    $self->{output}->exit();
+};
+
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check Varnish Cache with varnishstat Command
+
+=over 8
+
+=item B<--remote>
+
+If you dont run this script locally, if you wanna use it remote, you can run it remotely with 'ssh'.
+
+=item B<--hostname>
+
+Hostname to query (need --remote).
+
+=item B<--ssh-option>
+
+Specify multiple options like the user (example: --ssh-option='-l=centreon-engine' --ssh-option='-p=52').
+
+=item B<--command>
+
+Varnishstat Binary Filename (Default: varnishstat)
+
+=item B<--command-path>
+
+Directory Path to Varnishstat Binary File (Default: /usr/bin)
+
+=item B<--command-options>
+
+Parameter for Binary File (Default: ' -1 ')
+
+=item B<--warning-*>
+
+Warning Threshold for: 
+total   => N vcl total,
+avail   => N vcl available,
+discard => N vcl discarded
+
+=item B<--critical-*>
+
+Critical Threshold for: 
+total   => N vcl total,
+avail   => N vcl available,
+discard => N vcl discarded
+
+=back
+
+=cut
\ No newline at end of file
diff --git a/apps/varnish/local/mode/workers.pm b/apps/varnish/local/mode/workers.pm
new file mode 100644
index 000000000..3894d55c1
--- /dev/null
+++ b/apps/varnish/local/mode/workers.pm
@@ -0,0 +1,293 @@
+###############################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an timeelapsedutable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting timeelapsedutable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Author : Florian Asche 
+#
+####################################################################################
+
+package apps::varnish::local::mode::workers;
+
+use base qw(centreon::plugins::mode);
+use centreon::plugins::misc;
+use centreon::plugins::statefile;
+use Digest::MD5 qw(md5_hex);
+
+my $maps_counters = {
+    n_wrk   => { thresholds => {
+                                warning_workers  =>  { label => 'warning-workers', exit_value => 'warning' },
+                                critical_workers =>  { label => 'critical-workers', exit_value => 'critical' },
+                              },
+                output_msg => 'Backend conn. success: %.2f',
+                factor => 1, unit => '',
+               },
+    n_wrk_create => { thresholds => {
+                                warning_create  =>  { label => 'warning-create', exit_value => 'warning' },
+                                critical_create =>  { label => 'critical-create', exit_value => 'critical' },
+                                },
+                 output_msg => 'Backend conn. not attempted: %.2f',
+                 factor => 1, unit => '',
+                },
+    n_wrk_failed => { thresholds => {
+                                warning_failed    =>  { label => 'warning-failed', exit_value => 'warning' },
+                                critical_failed   =>  { label => 'critical-failed', exit_value => 'critical' },
+                                },
+                 output_msg => 'Backend conn. too many: %.2f',
+                 factor => 1, unit => '',
+               },
+    n_wrk_max => { thresholds => {
+                                warning_max    =>  { label => 'warning-max', exit_value => 'warning' },
+                                critical_max   =>  { label => 'critical-max', exit_value => 'critical' },
+                                },
+                 output_msg => 'Backend conn. failures: %.2f',
+                 factor => 1, unit => '',
+               },
+    n_wrk_lqueue => { thresholds => {
+                                warning_lqueue    =>  { label => 'warning-lqueue', exit_value => 'warning' },
+                                critical_lqueue   =>  { label => 'critical-lqueue', exit_value => 'critical' },
+                                },
+                 output_msg => 'Backend conn. reuses: %.2f',
+                 factor => 1, unit => '',
+               },
+    n_wrk_queued => { thresholds => {
+                                warning_queued    =>  { label => 'warning-queued', exit_value => 'warning' },
+                                critical_queued   =>  { label => 'critical-queued', exit_value => 'critical' },
+                                },
+                 output_msg => 'Backend conn. was closed: %.2f',
+                 factor => 1, unit => '',
+               },
+    n_wrk_drop => { thresholds => {
+                                warning_drop    =>  { label => 'warning-drop', exit_value => 'warning' },
+                                critical_drop   =>  { label => 'critical-drop', exit_value => 'critical' },
+                                },
+                 output_msg => 'Backend conn. recycles: %.2f',
+                 factor => 1, unit => '',
+               },
+};
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+    {
+        "hostname:s"         => { name => 'hostname' },
+        "remote"             => { name => 'remote' },
+        "ssh-option:s@"      => { name => 'ssh_option' },
+        "ssh-path:s"         => { name => 'ssh_path' },
+        "ssh-command:s"      => { name => 'ssh_command', default => 'ssh' },
+        "timeout:s"          => { name => 'timeout', default => 30 },
+        "sudo"               => { name => 'sudo' },
+        "command:s"          => { name => 'command', default => 'varnishstat' },
+        "command-path:s"     => { name => 'command_path', default => '/usr/bin' },
+        "command-options:s"  => { name => 'command_options', default => ' -1 ' },
+        "command-options2:s" => { name => 'command_options2', default => ' 2>&1' },
+    });
+
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            $options{options}->add_options(arguments => {
+                $maps_counters->{$_}->{thresholds}->{$name}->{label} . ':s'    => { name => $name },
+            });
+        };
+    };
+
+    $self->{instances_done} = {};
+    $self->{statefile_value} = centreon::plugins::statefile->new(%options);
+    return $self;
+};
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+    
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            if (($self->{perfdata}->threshold_validate(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}, value => $self->{option_results}->{$name})) == 0) {
+                $self->{output}->add_option_msg(short_msg => "Wrong " . $maps_counters->{$_}->{thresholds}->{$name}->{label} . " threshold '" . $self->{option_results}->{$name} . "'.");
+                $self->{output}->option_exit();
+            };
+        };
+    };
+    $self->{statefile_value}->check_options(%options);
+};
+
+sub getdata {
+    my ($self, %options) = @_;
+
+    my $stdout = centreon::plugins::misc::execute(output => $self->{output},
+                                                  options => $self->{option_results},
+                                                  sudo => $self->{option_results}->{sudo},
+                                                  command => $self->{option_results}->{command},
+                                                  command_path => $self->{option_results}->{command_path},
+                                                  command_options => $self->{option_results}->{command_options} . $self->{option_results}->{command_options2});
+    #print $stdout;
+
+    foreach (split(/\n/, $stdout)) {
+        #client_conn            7390867         1.00 Client connections
+        # - Symbolic entry name
+        # - Value
+        # - Per-second average over process lifetime, or a period if the value can not be averaged
+        # - Descriptive text
+
+        if  (/^(.\S*)\s*([0-9]*)\s*([0-9.]*)\s(.*)$/i) {
+            #print "FOUND: " . $1 . "=" . $2 . "\n";
+            $self->{result}->{$1} = $2;
+        };
+    };
+};
+
+sub run {
+    my ($self, %options) = @_;
+
+    $self->getdata();
+
+    $self->{statefile_value}->read(statefile => 'cache_apps_varnish' . '_' . $self->{mode} . '_' . (defined($self->{option_results}->{name}) ? md5_hex($self->{option_results}->{name}) : md5_hex('all')));
+    $self->{result}->{last_timestamp} = time();
+    my $old_timestamp = $self->{statefile_value}->get(name => 'last_timestamp');
+    
+    # Calculate
+    my $delta_time = $self->{result}->{last_timestamp} - $old_timestamp;
+    $delta_time = 1 if ($delta_time == 0); # One seconds ;)
+
+    
+    foreach (keys %{$maps_counters}) {
+        #print $_ . "\n";
+        $self->{old_cache}->{$_} = $self->{statefile_value}->get(name => '$_');     # Get Data from Cache
+        $self->{old_cache}->{$_} = 0 if ( $self->{old_cache}->{$_} > $self->{result}->{$_} );
+        $self->{outputdata}->{$_} = ($self->{result}->{$_} - $self->{old_cache}->{$_}) / $delta_time;
+    };
+
+    # Write Cache if not there
+    $self->{statefile_value}->write(data => $self->{result}); 
+    if (!defined($old_timestamp)) {
+        $self->{output}->output_add(severity => 'OK',
+                                    short_msg => "Buffer creation...");
+        $self->{output}->display();
+        $self->{output}->exit();
+    }
+
+    my @exits;
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            push @exits, $self->{perfdata}->threshold_check(value => $self->{outputdata}->{$_}, threshold => [ { label => $maps_counters->{$_}->{thresholds}->{$name}->{label}, 'exit_litteral' => $maps_counters->{$_}->{thresholds}->{$name}->{exit_value} }]);
+        }
+    }
+
+    my $exit = $self->{output}->get_most_critical(status => [ @exits ]);
+    
+
+    my $extra_label = '';
+    $extra_label = '_' . $instance_output if ($num > 1);
+
+    my $str_output = "";
+    my $str_append = '';
+    foreach (keys %{$maps_counters}) {
+        $str_output .= $str_append . sprintf($maps_counters->{$_}->{output_msg}, $self->{outputdata}->{$_} * $maps_counters->{$_}->{factor});
+        $str_append = ', ';
+        my ($warning, $critical);
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            $warning = $self->{perfdata}->get_perfdata_for_output(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}) if ($maps_counters->{$_}->{thresholds}->{$name}->{exit_value} eq 'warning');
+            $critical = $self->{perfdata}->get_perfdata_for_output(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}) if ($maps_counters->{$_}->{thresholds}->{$name}->{exit_value} eq 'critical');
+        }
+        $self->{output}->perfdata_add(label => $_ . $extra_label, unit => $maps_counters->{$_}->{unit},
+                                        value => sprintf("%.2f", $self->{outputdata}->{$_} * $maps_counters->{$_}->{factor}),
+                                        warning => $warning,
+                                        critical => $critical);
+    }
+    $self->{output}->output_add(severity => $exit,
+                                short_msg => $str_output);
+
+    $self->{output}->display();
+    $self->{output}->exit();
+};
+
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check Varnish Cache with varnishstat Command
+
+=over 8
+
+=item B<--remote>
+
+If you dont run this script locally, if you wanna use it remote, you can run it remotely with 'ssh'.
+
+=item B<--hostname>
+
+Hostname to query (need --remote).
+
+=item B<--ssh-option>
+
+Specify multiple options like the user (example: --ssh-option='-l=centreon-engine' --ssh-option='-p=52').
+
+=item B<--command>
+
+Varnishstat Binary Filename (Default: varnishstat)
+
+=item B<--command-path>
+
+Directory Path to Varnishstat Binary File (Default: /usr/bin)
+
+=item B<--command-options>
+
+Parameter for Binary File (Default: ' -1 ')
+
+=item B<--warning-*>
+
+Warning Threshold for: 
+workers => N worker threads,
+create  => N worker threads created,
+failed  => N worker threads not created,
+max     => N worker threads limited,
+lqueue  => work request queue length,
+queued  => N queued work requests,
+drop    => N dropped work requests
+
+=item B<--critical-*>
+
+Critical Threshold for: 
+workers => N worker threads,
+create  => N worker threads created,
+failed  => N worker threads not created,
+max     => N worker threads limited,
+lqueue  => work request queue length,
+queued  => N queued work requests,
+drop    => N dropped work requests
+
+=back
+
+=cut
\ No newline at end of file
diff --git a/apps/varnish/local/plugin.pm b/apps/varnish/local/plugin.pm
new file mode 100644
index 000000000..d2f52b136
--- /dev/null
+++ b/apps/varnish/local/plugin.pm
@@ -0,0 +1,80 @@
+###############################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Author : Florian Asche 
+#
+####################################################################################
+
+package apps::varnish::local::plugin;
+
+use strict;
+use warnings;
+use base qw(centreon::plugins::script_simple);
+
+sub new {
+	my ($class, %options) = @_;
+	my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+	bless $self, $class;
+# $options->{options} = options object
+
+	$self->{version} = '0.1';
+	%{$self->{modes}} = (
+			'connections'       => 'apps::varnish::local::mode::connections',
+			'cache'             => 'apps::varnish::local::mode::cache',
+			'backend'           => 'apps::varnish::local::mode::backend',
+			'sessions'          => 'apps::varnish::local::mode::sessions',
+			'fetch'             => 'apps::varnish::local::mode::fetch',
+			'workers'           => 'apps::varnish::local::mode::workers',
+			'totals'            => 'apps::varnish::local::mode::totals',
+			'objects'           => 'apps::varnish::local::mode::objects',
+			'uptime'            => 'apps::varnish::local::mode::uptime',
+			'bans'              => 'apps::varnish::local::mode::bans',
+			'dns'               => 'apps::varnish::local::mode::dns',
+			'shm'               => 'apps::varnish::local::mode::shm',
+			'vcl'               => 'apps::varnish::local::mode::vcl',
+			'n'                 => 'apps::varnish::local::mode::n',
+			'sms'               => 'apps::varnish::local::mode::sms',
+			'hcb'               => 'apps::varnish::local::mode::hcb',
+			'esi'               => 'apps::varnish::local::mode::esi',
+			);
+
+	return $self;
+}
+
+1;
+
+__END__
+
+=head1 PLUGIN DESCRIPTION
+
+Check Varnish Cache with varnishstat Command
+
+=cut
diff --git a/centreon/common/powershell/exchange/2010/activesyncmailbox.pm b/centreon/common/powershell/exchange/2010/activesyncmailbox.pm
new file mode 100644
index 000000000..24f62654e
--- /dev/null
+++ b/centreon/common/powershell/exchange/2010/activesyncmailbox.pm
@@ -0,0 +1,149 @@
+################################################################################
+# Copyright 2005-2014 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package centreon::common::powershell::exchange::2010::activesyncmailbox;
+
+use strict;
+use warnings;
+use centreon::plugins::misc;
+
+sub get_powershell {
+    my (%options) = @_;
+    # options: no_ps
+    my $no_ps = (defined($options{no_ps})) ? 1 : 0;
+    my $no_trust_ssl = (defined($options{no_trust_ssl})) ? '' : '-TrustAnySSLCertificate';
+    
+    return '' if ($no_ps == 1);
+    
+    my $ps = '
+$culture = new-object "System.Globalization.CultureInfo" "en-us"    
+[System.Threading.Thread]::CurrentThread.CurrentUICulture = $culture
+
+If (@(Get-PSSnapin -Registered | Where-Object {$_.Name -eq "Microsoft.Exchange.Management.PowerShell.E2010"} ).count -eq 1) {
+    If (@(Get-PSSnapin | Where-Object {$_.Name -eq "Microsoft.Exchange.Management.PowerShell.E2010"} ).count -eq 0) {
+        Try {
+            Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010 -ErrorAction STOP
+        } Catch {
+            Write-Host $Error[0].Exception
+            exit 1
+        }
+    } else {
+        Write-Host "Snap-In no present or not registered"
+        exit 1
+    }
+} else {
+    Write-Host "Snap-In no present or not registered"
+    exit 1
+}
+$ProgressPreference = "SilentlyContinue"
+
+# Check to make sure all databases are mounted
+try {
+    $ErrorActionPreference = "Stop"
+    $username = "' . $options{mailbox}  . '"
+    $password = "' . $options{password}  . '"
+    $secstr = New-Object -TypeName System.Security.SecureString
+    $password.ToCharArray() | ForEach-Object {$secstr.AppendChar($_)}
+    $cred = new-object -typename System.Management.Automation.PSCredential -argumentlist $username, $secstr
+    
+    $results = Test-ActiveSyncConnectivity -MailboxCredential $cred ' . $no_trust_ssl . '
+} catch {
+    Write-Host $Error[0].Exception
+    exit 1
+}
+
+Foreach ($result in $results) {
+    Write-Host "[scenario=" $result.Scenario "][result=" $result.Result "][latency=" $result.Latency.TotalMilliseconds "][[error=" $Result.Error "]]"
+}
+exit 0
+';
+
+    return centreon::plugins::misc::powershell_encoded($ps);
+}
+
+sub check {
+    my ($self, %options) = @_;
+    # options: stdout
+    
+    # Following output:
+    #[scenario= Options ][result= Failure ][latency= 52,00 ][[error=...]]
+    $self->{output}->output_add(severity => 'OK',
+                                short_msg => "ActiveSync to '" . $options{mailbox} . "' is ok.");
+   
+    my $checked = 0;
+    $self->{output}->output_add(long_msg => $options{stdout});
+    while ($options{stdout} =~ /\[scenario=(.*?)\]\[result=(.*?)\]\[latency=(.*?)\]\[\[error=(.*?)\]\]/msg) {
+        my ($scenario, $result, $latency, $error) = ($self->{output}->to_utf8($1), centreon::plugins::misc::trim($2), 
+                                                    centreon::plugins::misc::trim($3), centreon::plugins::misc::trim($4));
+        
+        $checked++;
+        foreach my $th (('critical', 'warning')) {
+            next if (!defined($self->{thresholds}->{$th}));
+        
+            if ($self->{thresholds}->{$th}->{operator} eq '=' && 
+                $result =~ /$self->{thresholds}->{$th}->{state}/) {
+                $self->{output}->output_add(severity => $self->{thresholds}->{$th}->{out},
+                                            short_msg => sprintf("ActiveSync scenario '%s' to '%s' is '%s'",
+                                                                 $scenario, $options{mailbox}, $result));
+            } elsif ($self->{thresholds}->{$th}->{operator} eq '!=' && 
+                $result !~ /$self->{thresholds}->{$th}->{state}/) {
+                $self->{output}->output_add(severity => $self->{thresholds}->{$th}->{out},
+                                            short_msg => sprintf("ActiveSync scenario '%s' to '%s' is '%s'",
+                                                                 $scenario, $options{mailbox}, $result));
+            }
+        }
+        
+        if ($latency =~ /^(\d+)/) {
+            $self->{output}->perfdata_add(label => $scenario, unit => 's',
+                                          value => sprintf("%.3f", $1 / 1000),
+                                          min => 0);
+        }
+    }
+    
+    if ($checked == 0) {
+        $self->{output}->output_add(severity => 'UNKNOWN',
+                                    short_msg => 'Cannot find informations');
+    }
+}
+
+1;
+
+__END__
+
+=head1 DESCRIPTION
+
+Method to check Exchange 2010 activesync on a specific mailbox.
+
+=cut
\ No newline at end of file
diff --git a/centreon/common/powershell/exchange/2010/databases.pm b/centreon/common/powershell/exchange/2010/databases.pm
new file mode 100644
index 000000000..c6624d4bf
--- /dev/null
+++ b/centreon/common/powershell/exchange/2010/databases.pm
@@ -0,0 +1,284 @@
+################################################################################
+# Copyright 2005-2014 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package centreon::common::powershell::exchange::2010::databases;
+
+use strict;
+use warnings;
+use centreon::plugins::misc;
+
+sub get_powershell {
+    my (%options) = @_;
+    # options: no_ps, no_mailflow, no_mapi
+    my $no_mailflow = (defined($options{no_mailflow})) ? 1 : 0;
+    my $no_ps = (defined($options{no_ps})) ? 1 : 0;
+    my $no_mapi = (defined($options{no_mapi})) ? 1 : 0;
+    
+    return '' if ($no_ps == 1);
+    
+    my $ps = '
+$culture = new-object "System.Globalization.CultureInfo" "en-us"    
+[System.Threading.Thread]::CurrentThread.CurrentUICulture = $culture
+
+If (@(Get-PSSnapin -Registered | Where-Object {$_.Name -eq "Microsoft.Exchange.Management.PowerShell.E2010"} ).count -eq 1) {
+    If (@(Get-PSSnapin | Where-Object {$_.Name -eq "Microsoft.Exchange.Management.PowerShell.E2010"} ).count -eq 0) {
+        Try {
+            Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010 -ErrorAction STOP
+        } Catch {
+            Write-Host $Error[0].Exception
+            exit 1
+        }
+    } else {
+        Write-Host "Snap-In no present or not registered"
+        exit 1
+    }
+} else {
+    Write-Host "Snap-In no present or not registered"
+    exit 1
+}
+$ProgressPreference = "SilentlyContinue"
+
+# Check to make sure all databases are mounted
+try { 
+    $ErrorActionPreference = "Stop"
+';
+
+    if (defined($options{filter_database})) {
+        $ps .= '
+    $MountedDB = Get-MailboxDatabase -Identity "' . $options{filter_database} . '" -Status
+';
+    } else {
+        $ps .= '
+    $MountedDB = Get-MailboxDatabase -Status
+';
+    }
+
+    $ps .= '
+} catch {
+    Write-Host $Error[0].Exception
+    exit 1
+}
+Foreach ($DB in $MountedDB) {
+    Write-Host "[name=" $DB.Name "][server=" $DB.Server "][mounted=" $DB.Mounted "][size=" $DB.DatabaseSize "][asize=" $DB.AvailableNewMailboxSpace "]" -NoNewline
+    
+';
+    
+    if (defined($options{filter_database_test}) && $options{filter_database_test} ne '') {
+        $ps .= '
+        if (!($DB.Name -match "' . $options{filter_database_test} . '")) {
+            Write-Host "[Skip extra test]"
+            continue
+        }
+';
+    }
+    
+    $ps .= '
+        If ($DB.Mounted -eq $true) {
+';
+
+    if ($no_mapi == 0) {
+        $ps .= '
+            # Test Mapi Connectivity
+            $MapiResult = test-mapiconnectivity -Database $DB.Name
+            Write-Host "[mapi=" $MapiResult.Result "]" -NoNewline
+';
+    }
+    
+    if ($no_mailflow == 0) {
+        $ps .= '
+            # Test Mailflow
+            $MailflowResult = Test-mailflow -Targetdatabase $DB.Name
+            Write-Host "[mailflow=" $MailflowResult.testmailflowresult "][latency=" $MailflowResult.MessageLatencyTime.TotalMilliseconds "]" -NoNewline
+';
+    }
+
+    $ps .= '
+        }
+    Write-Host ""
+}
+
+exit 0
+';
+
+    return centreon::plugins::misc::powershell_encoded($ps);
+}
+
+sub check_mapi {
+    my ($self, %options) = @_;
+    
+    if (defined($self->{option_results}->{no_mapi})) {
+        $self->{output}->output_add(long_msg => '    Skip MAPI test connectivity');
+        return ;
+    }
+    
+    if ($options{line} !~ /\[mapi=(.*?)\]/) {
+        $self->{output}->output_add(long_msg => '    Skip MAPI test connectivity (information not found)');
+        return ;
+    }
+    
+    my $mapi_result = centreon::plugins::misc::trim($1);
+    
+    $self->{output}->output_add(long_msg => "    MAPI Test connectivity: " . $mapi_result);
+    foreach my $th (('critical_mapi', 'warning_mapi')) {
+        next if (!defined($self->{thresholds}->{$th}));
+        
+        if ($self->{thresholds}->{$th}->{operator} eq '=' && 
+            $mapi_result =~ /$self->{thresholds}->{$th}->{state}/) {
+            $self->{output}->output_add(severity => $self->{thresholds}->{$th}->{out},
+                                        short_msg => sprintf("Server '%s' Database '%s' MAPI connectivity is %s",
+                                                            $options{server}, $options{database}, $mapi_result));
+        } elsif ($self->{thresholds}->{$th}->{operator} eq '!=' && 
+            $mapi_result !~ /$self->{thresholds}->{$th}->{state}/) {
+            $self->{output}->output_add(severity => $self->{thresholds}->{$th}->{out},
+                                        short_msg => sprintf("Server '%s' Database '%s' MAPI connectivity is %s",
+                                                               $options{server}, $options{database}, $mapi_result));
+        }
+    }
+}
+
+sub check_mailflow {
+    my ($self, %options) = @_;
+    
+    if (defined($self->{option_results}->{no_mailflow})) {
+        $self->{output}->output_add(long_msg => '    Skip Mailflow test');
+        return ;
+    }
+    
+    if ($options{line} !~ /\[mailflow=(.*?)\]\[latency=(.*?)\]/) {
+        $self->{output}->output_add(long_msg => '    Skip Mailflow test (information not found)');
+        return ;
+    }
+    
+    my ($mailflow_result, $latency) = (centreon::plugins::misc::trim($1), centreon::plugins::misc::trim($2));
+    
+    $self->{output}->output_add(long_msg => "    Mailflow Test: " . $mailflow_result);
+    foreach my $th (('critical_mailflow', 'warning_mailflow')) {
+        next if (!defined($self->{thresholds}->{$th}));
+        
+        if ($self->{thresholds}->{$th}->{operator} eq '=' && 
+            $mailflow_result =~ /$self->{thresholds}->{$th}->{state}/) {
+            $self->{output}->output_add(severity => $self->{thresholds}->{$th}->{out},
+                                        short_msg => sprintf("Server '%s' Database '%s' Mailflow test is %s",
+                                                            $options{server}, $options{database}, $mailflow_result));
+        } elsif ($self->{thresholds}->{$th}->{operator} eq '!=' && 
+            $mailflow_result !~ /$self->{thresholds}->{$th}->{state}/) {
+            $self->{output}->output_add(severity => $self->{thresholds}->{$th}->{out},
+                                        short_msg => sprintf("Server '%s' Database '%s' Mailflow test is %s",
+                                                            $options{server}, $options{database}, $mailflow_result));
+        }
+    }
+    
+    if ($latency =~ /^(\d+)/) {
+        $self->{output}->perfdata_add(label => 'latency_' . $options{database}, unit => 's',
+                                      value => sprintf("%.3f", $1 / 1000),
+                                      min => 0);
+    }
+}
+
+sub check {
+    my ($self, %options) = @_;
+    # options: stdout
+    
+    # Following output:
+    #[name= Mailbox Database 0975194476 ][server= SRVI-WIN-TEST ][mounted= True ][size= 136.1 MB (142,671,872 bytes) ][asize= 124.4 MB (130,482,176 bytes) ][mapi= Success ][mailflow= Success ][latency= 50,00 ]
+    #...
+    
+    $self->{output}->output_add(severity => 'OK',
+                                short_msg => 'Databases are mounted');
+    if (!defined($self->{option_results}->{no_mapi})) {
+        $self->{output}->output_add(severity => 'OK',
+                                    short_msg => 'MAPI Connectivities are ok');
+    }
+    if (!defined($self->{option_results}->{no_mailflow})) {
+        $self->{output}->output_add(severity => 'OK',
+                                    short_msg => 'Mailflow test are ok');
+    }
+    
+    my $checked = 0;
+    foreach my $line (split /\n/, $options{stdout}) {
+        next if ($line !~ /^\[name=(.*?)\]\[server=(.*?)\]\[mounted=(.*?)\]\[size=(.*?)\]\[asize=(.*?)\]/);
+        $checked++;
+        my ($database, $server, $mounted, $size, $asize) = (centreon::plugins::misc::trim($1), centreon::plugins::misc::trim($2), 
+                                             centreon::plugins::misc::trim($3), centreon::plugins::misc::trim($4), centreon::plugins::misc::trim($5));
+
+        $self->{output}->output_add(long_msg => sprintf("Test database '%s' server '%s':", $database, $server));
+        if ($size =~ /\((.*?)\s*bytes/) {
+            my $total_bytes = $1;
+            $total_bytes =~ s/[.,]//g;
+            $self->{output}->perfdata_add(label => 'size_' . $database, unit => 'B',
+                                          value => $total_bytes,
+                                          min => 0);
+            my ($total_value, $total_unit) = $self->{perfdata}->change_bytes(value => $total_bytes);
+            $self->{output}->output_add(long_msg => sprintf("    Size %s", $total_value . ' ' . $total_unit));
+        }
+        if ($asize =~ /\((.*?)\s*bytes/) {
+            my $total_bytes = $1;
+            $total_bytes =~ s/[.,]//g;
+            $self->{output}->perfdata_add(label => 'asize_' . $database, unit => 'B',
+                                          value => $total_bytes,
+                                          min => 0);
+            my ($total_value, $total_unit) = $self->{perfdata}->change_bytes(value => $total_bytes);
+            $self->{output}->output_add(long_msg => sprintf("    Available Size %s", $total_value . ' ' . $total_unit));
+        }
+        
+        
+        # Check mounted
+        if ($mounted =~ /False/i) {
+            $self->{output}->output_add(long_msg => sprintf("    not mounted\n   Skip mapi/mailflow test"));
+            $self->{output}->output_add(short_msg => 'CRITICAL',
+                                        long_msg => sprintf("Database '%s' server '%s' is not mounted", $database, $server));
+            next;
+        }
+        $self->{output}->output_add(long_msg => sprintf("    mounted"));
+        
+        check_mapi($self, database => $database, server => $server, line => $line);
+        check_mailflow($self, database => $database, server => $server, line => $line);
+    }
+    
+    if ($checked == 0) {
+        $self->{output}->output_add(severity => 'UNKNOWN',
+                                    short_msg => 'Cannot find informations');
+    }
+}
+
+1;
+
+__END__
+
+=head1 DESCRIPTION
+
+Method to check Exchange 2010 databases.
+
+=cut
\ No newline at end of file
diff --git a/centreon/common/powershell/exchange/2010/imapmailbox.pm b/centreon/common/powershell/exchange/2010/imapmailbox.pm
new file mode 100644
index 000000000..43a85ae24
--- /dev/null
+++ b/centreon/common/powershell/exchange/2010/imapmailbox.pm
@@ -0,0 +1,148 @@
+################################################################################
+# Copyright 2005-2014 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package centreon::common::powershell::exchange::2010::imapmailbox;
+
+use strict;
+use warnings;
+use centreon::plugins::misc;
+
+sub get_powershell {
+    my (%options) = @_;
+    # options: no_ps
+    my $no_ps = (defined($options{no_ps})) ? 1 : 0;
+    
+    return '' if ($no_ps == 1);
+    
+    my $ps = '
+$culture = new-object "System.Globalization.CultureInfo" "en-us"    
+[System.Threading.Thread]::CurrentThread.CurrentUICulture = $culture
+
+If (@(Get-PSSnapin -Registered | Where-Object {$_.Name -eq "Microsoft.Exchange.Management.PowerShell.E2010"} ).count -eq 1) {
+    If (@(Get-PSSnapin | Where-Object {$_.Name -eq "Microsoft.Exchange.Management.PowerShell.E2010"} ).count -eq 0) {
+        Try {
+            Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010 -ErrorAction STOP
+        } Catch {
+            Write-Host $Error[0].Exception
+            exit 1
+        }
+    } else {
+        Write-Host "Snap-In no present or not registered"
+        exit 1
+    }
+} else {
+    Write-Host "Snap-In no present or not registered"
+    exit 1
+}
+$ProgressPreference = "SilentlyContinue"
+
+# Check to make sure all databases are mounted
+try {
+    $ErrorActionPreference = "Stop"
+    $username = "' . $options{mailbox}  . '"
+    $password = "' . $options{password}  . '"
+    $secstr = New-Object -TypeName System.Security.SecureString
+    $password.ToCharArray() | ForEach-Object {$secstr.AppendChar($_)}
+    $cred = new-object -typename System.Management.Automation.PSCredential -argumentlist $username, $secstr
+    
+    $results = Test-ImapConnectivity -MailboxCredential $cred
+} catch {
+    Write-Host $Error[0].Exception
+    exit 1
+}
+
+Foreach ($result in $results) {
+    Write-Host "[scenario=" $result.Scenario "][result=" $result.Result "][latency=" $result.Latency.TotalMilliseconds "][[error=" $Result.Error "]]"
+}
+exit 0
+';
+
+    return centreon::plugins::misc::powershell_encoded($ps);
+}
+
+sub check {
+    my ($self, %options) = @_;
+    # options: stdout
+    
+    # Following output:
+    #[scenario= Options ][result= Failure ][latency= 52,00 ][[error=...]]
+    $self->{output}->output_add(severity => 'OK',
+                                short_msg => "Imap to '" . $options{mailbox} . "' is ok.");
+   
+    my $checked = 0;
+    $self->{output}->output_add(long_msg => $options{stdout});
+    while ($options{stdout} =~ /\[scenario=(.*?)\]\[result=(.*?)\]\[latency=(.*?)\]\[\[error=(.*?)\]\]/msg) {
+        my ($scenario, $result, $latency, $error) = ($self->{output}->to_utf8($1), centreon::plugins::misc::trim($2), 
+                                                    centreon::plugins::misc::trim($3), centreon::plugins::misc::trim($4));
+        
+        $checked++;
+        foreach my $th (('critical', 'warning')) {
+            next if (!defined($self->{thresholds}->{$th}));
+        
+            if ($self->{thresholds}->{$th}->{operator} eq '=' && 
+                $result =~ /$self->{thresholds}->{$th}->{state}/) {
+                $self->{output}->output_add(severity => $self->{thresholds}->{$th}->{out},
+                                            short_msg => sprintf("Imap scenario '%s' to '%s' is '%s'",
+                                                                 $scenario, $options{mailbox}, $result));
+            } elsif ($self->{thresholds}->{$th}->{operator} eq '!=' && 
+                $result !~ /$self->{thresholds}->{$th}->{state}/) {
+                $self->{output}->output_add(severity => $self->{thresholds}->{$th}->{out},
+                                            short_msg => sprintf("Imap scenario '%s' to '%s' is '%s'",
+                                                                 $scenario, $options{mailbox}, $result));
+            }
+        }
+        
+        if ($latency =~ /^(\d+)/) {
+            $self->{output}->perfdata_add(label => $scenario, unit => 's',
+                                          value => sprintf("%.3f", $1 / 1000),
+                                          min => 0);
+        }
+    }
+    
+    if ($checked == 0) {
+        $self->{output}->output_add(severity => 'UNKNOWN',
+                                    short_msg => 'Cannot find informations');
+    }
+}
+
+1;
+
+__END__
+
+=head1 DESCRIPTION
+
+Method to check Exchange 2010 imap on a specific mailbox.
+
+=cut
\ No newline at end of file
diff --git a/centreon/common/powershell/exchange/2010/mapimailbox.pm b/centreon/common/powershell/exchange/2010/mapimailbox.pm
new file mode 100644
index 000000000..55eef7c81
--- /dev/null
+++ b/centreon/common/powershell/exchange/2010/mapimailbox.pm
@@ -0,0 +1,132 @@
+################################################################################
+# Copyright 2005-2014 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package centreon::common::powershell::exchange::2010::mapimailbox;
+
+use strict;
+use warnings;
+use centreon::plugins::misc;
+
+sub get_powershell {
+    my (%options) = @_;
+    # options: no_ps
+    my $no_ps = (defined($options{no_ps})) ? 1 : 0;
+    
+    return '' if ($no_ps == 1);
+    
+    my $ps = '
+$culture = new-object "System.Globalization.CultureInfo" "en-us"    
+[System.Threading.Thread]::CurrentThread.CurrentUICulture = $culture
+
+If (@(Get-PSSnapin -Registered | Where-Object {$_.Name -eq "Microsoft.Exchange.Management.PowerShell.E2010"} ).count -eq 1) {
+    If (@(Get-PSSnapin | Where-Object {$_.Name -eq "Microsoft.Exchange.Management.PowerShell.E2010"} ).count -eq 0) {
+        Try {
+            Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010 -ErrorAction STOP
+        } Catch {
+            Write-Host $Error[0].Exception
+            exit 1
+        }
+    } else {
+        Write-Host "Snap-In no present or not registered"
+        exit 1
+    }
+} else {
+    Write-Host "Snap-In no present or not registered"
+    exit 1
+}
+$ProgressPreference = "SilentlyContinue"
+
+# Check to make sure all databases are mounted
+try { 
+    $ErrorActionPreference = "Stop"
+    $mapi = test-mapiconnectivity -Identity "' . $options{mailbox} . '"
+} catch {
+    Write-Host $Error[0].Exception
+    exit 1
+}
+
+Write-Host "[name=" $mapi.Database "][server=" $mapi.Server "][result=" $mapi.Result "][error=" $mapi.Error "]"
+
+exit 0
+';
+
+    return centreon::plugins::misc::powershell_encoded($ps);
+}
+
+sub check {
+    my ($self, %options) = @_;
+    # options: stdout
+    
+    # Following output:
+    #[name= Mailbox Database 0975194476 ][server= SRVI-WIN-TEST ][result= Success ][error=...]
+   
+    if ($options{stdout} !~ /^\[name=(.*?)\]\[server=(.*?)\]\[result=(.*?)\]\[error=(.*)\]$/) {
+        $self->{output}->output_add(severity => 'UNKNOWN',
+                                    short_msg => 'Cannot find informations');
+        return ;
+    }
+    my ($database, $server, $result, $error) = (centreon::plugins::misc::trim($1), centreon::plugins::misc::trim($2), 
+                                                centreon::plugins::misc::trim($3), centreon::plugins::misc::trim($4));
+    
+    $self->{output}->output_add(severity => 'OK',
+                                short_msg => "MAPI connection to '" . $options{mailbox} . "' is '" . $result . "'.");
+    $self->{output}->output_add(long_msg => sprintf("Database: %s, Server: %s\nError: %s",
+                                                    $database, $server, $error));
+    foreach my $th (('critical_mapi', 'warning_mapi')) {
+        next if (!defined($self->{thresholds}->{$th}));
+        
+        if ($self->{thresholds}->{$th}->{operator} eq '=' && 
+            $result =~ /$self->{thresholds}->{$th}->{state}/) {
+            $self->{output}->output_add(severity => $self->{thresholds}->{$th}->{out},
+                                        short_msg => sprintf("MAPI connection to '%s' is '%s'",
+                                                             $options{mailbox}, $result));
+        } elsif ($self->{thresholds}->{$th}->{operator} eq '!=' && 
+            $result !~ /$self->{thresholds}->{$th}->{state}/) {
+            $self->{output}->output_add(severity => $self->{thresholds}->{$th}->{out},
+                                        short_msg => sprintf("MAPI connection to '%s' is '%s'",
+                                                             $options{mailbox}, $result));
+        }
+    }
+}
+
+1;
+
+__END__
+
+=head1 DESCRIPTION
+
+Method to check Exchange 2010 mapi connection on a specific mailbox.
+
+=cut
\ No newline at end of file
diff --git a/centreon/plugins/dbi.pm b/centreon/plugins/dbi.pm
index 4629d72b9..fd946797e 100644
--- a/centreon/plugins/dbi.pm
+++ b/centreon/plugins/dbi.pm
@@ -63,6 +63,7 @@ sub new {
                     { "datasource:s@"      => { name => 'data_source' },
                       "username:s@"        => { name => 'username' },
                       "password:s@"        => { name => 'password' },
+                      "connect-options:s@" => { name => 'connect_options' },
                       "sql-errors-exit:s"  => { name => 'sql_errors_exit', default => 'unknown' },
         });
     }
@@ -77,6 +78,8 @@ sub new {
     $self->{data_source} = undef;
     $self->{username} = undef;
     $self->{password} = undef;
+    $self->{connect_options} = undef;
+    $self->{connect_options_hash} = {};
     
     # Sometimes, we need to set ENV
     $self->{env} = undef;
@@ -119,6 +122,7 @@ sub check_options {
     $self->{data_source} = (defined($self->{option_results}->{data_source})) ? shift(@{$self->{option_results}->{data_source}}) : undef;
     $self->{username} = (defined($self->{option_results}->{username})) ? shift(@{$self->{option_results}->{username}}) : undef;
     $self->{password} = (defined($self->{option_results}->{password})) ? shift(@{$self->{option_results}->{password}}) : undef;
+    $self->{connect_options} = (defined($self->{option_results}->{connect_options})) ? shift(@{$self->{option_results}->{connect_options}}) : undef;
     $self->{env} = (defined($self->{option_results}->{env})) ? shift(@{$self->{option_results}->{env}}) : undef;
     $self->{sql_errors_exit} = $self->{option_results}->{sql_errors_exit};
     
@@ -126,6 +130,15 @@ sub check_options {
         $self->{output}->add_option_msg(short_msg => "Need to specify data_source arguments.");
         $self->{output}->option_exit(exit_litteral => $self->{sql_errors_exit});
     }
+    if (defined($self->{connect_options}) && $self->{connect_options} ne '') {
+        foreach my $entry (split /,/, $self->{connect_options}) {
+            if ($entry !~ /^\s*([^=]+)=([^=]+)\s*$/) {
+                $self->{output}->add_option_msg(short_msg => "Wrong format for --connect-options '" . $entry . "'.");
+                $self->{output}->option_exit(exit_litteral => $self->{sql_errors_exit});
+            }
+            $self->{connect_options_hash}->{$1} = $2;
+        }
+    }
     
     if (scalar(@{$self->{option_results}->{data_source}}) == 0) {
         return 0;
@@ -175,7 +188,7 @@ sub connect {
         "DBI:". $self->{data_source},
         $self->{username},
         $self->{password},
-        { "RaiseError" => 0, "PrintError" => 0, "AutoCommit" => 1 }
+        { "RaiseError" => 0, "PrintError" => 0, "AutoCommit" => 1, %{$self->{connect_options_hash}} }
     );
 
     if (!defined($self->{instance})) {
@@ -264,6 +277,11 @@ Database username.
 
 Database password.
 
+=item B<--connect-options>
+
+Add options in database connect.
+Format: name=value,name2=value2,...
+
 =item B<--sql-errors-exit>
 
 Exit code for DB Errors (default: unknown)
diff --git a/apps/apache/serverstatus/mode/libconnect.pm b/centreon/plugins/httplib.pm
similarity index 64%
rename from apps/apache/serverstatus/mode/libconnect.pm
rename to centreon/plugins/httplib.pm
index e912956fa..4ccaabb49 100644
--- a/apps/apache/serverstatus/mode/libconnect.pm
+++ b/centreon/plugins/httplib.pm
@@ -34,27 +34,48 @@
 # Based on De Bodt Lieven plugin
 ####################################################################################
 
-package apps::apache::serverstatus::mode::libconnect;
+package centreon::plugins::httplib;
 
 use strict;
 use warnings;
 use LWP::UserAgent;
 
+sub get_port {
+    my ($self, %options) = @_;
+    
+    my $cache_port = '';
+    if (defined($self->{option_results}->{port}) && $self->{option_results}->{port} ne '') {
+        $cache_port = $self->{option_results}->{port};
+    } else {
+        $cache_port = 80 if ($self->{option_results}->{proto} eq 'http');
+        $cache_port = 443 if ($self->{option_results}->{proto} eq 'https');
+    }
+    
+    return $cache_port;
+}
+
 sub connect {
     my ($self, %options) = @_;
-    my $ua = LWP::UserAgent->new( protocols_allowed => ['http', 'https'], timeout => $self->{option_results}->{timeout});
+    my $ua = LWP::UserAgent->new( keep_alive => 1, protocols_allowed => ['http', 'https'], timeout => $self->{option_results}->{timeout});
     my $connection_exit = defined($options{connection_exit}) ? $options{connection_exit} : 'unknown';
     
     my ($response, $content);
+    my $req;
 
-    my $req = HTTP::Request->new( GET => $self->{option_results}->{proto}."://" .$self->{option_results}->{hostname}.':'.$self->{option_results}->{port}.'/server-status');
-    
-    if (defined($self->{option_results}->{credentials})) {
+    if (defined($self->{option_results}->{port}) && $self->{option_results}->{port} =~ /^[0-9]+$/) {
+        $req = HTTP::Request->new( GET => $self->{option_results}->{proto}. "://" . $self->{option_results}->{hostname}.':'. $self->{option_results}->{port} . $self->{option_results}->{url_path});
+    } else {
+        $req = HTTP::Request->new( GET => $self->{option_results}->{proto}. "://" . $self->{option_results}->{hostname} . $self->{option_results}->{url_path});
+    }
+   
+    if (defined($self->{option_results}->{credentials}) && defined($self->{option_results}->{ntlm})) {
+        $ua->credentials($self->{option_results}->{hostname} . ':' . $self->{option_results}->{port}, '', $self->{option_results}->{username}, $self->{option_results}->{password});
+    } elsif (defined($self->{option_results}->{credentials})) {
         $req->authorization_basic($self->{option_results}->{username}, $self->{option_results}->{password});
     }
     
     if (defined($self->{option_results}->{proxyurl})) {
-         $ua->proxy(['http', 'https'], $self->{option_results}->{proxyurl});
+        $ua->proxy(['http', 'https'], $self->{option_results}->{proxyurl});
     }
     
     $response = $ua->request($req);
@@ -71,4 +92,3 @@ sub connect {
 }
 
 1;
-
diff --git a/centreon/plugins/misc.pm b/centreon/plugins/misc.pm
index 633c9ddc4..6a87b4e85 100644
--- a/centreon/plugins/misc.pm
+++ b/centreon/plugins/misc.pm
@@ -37,6 +37,7 @@ package centreon::plugins::misc;
 
 use strict;
 use warnings;
+use utf8;
 
 # Function more simple for Windows platform
 sub windows_execute {
@@ -50,11 +51,11 @@ sub windows_execute {
     $cmd .= $options{command_options} if (defined($options{command_options}));
     
     eval {
-           local $SIG{ALRM} = sub { die "Timeout by signal ALARM\n"; };
-           alarm( $options{timeout} );
-           $stdout = `$cmd`;
-           $exit_code = ($? >> 8);
-           alarm(0);
+        local $SIG{ALRM} = sub { die "Timeout by signal ALARM\n"; };
+        alarm( $options{timeout} );
+        $stdout = `$cmd`;
+        $exit_code = ($? >> 8);
+        alarm(0);
     };
 
     if ($@) {
@@ -183,6 +184,8 @@ sub backtick {
         $sig_do = 'DEFAULT';
     }
     local $SIG{CHLD} = $sig_do;
+    $SIG{TTOU} = 'IGNORE';
+    $| = 1;
 
     if (!defined($pid = open( KID, "-|" ))) {
         return (-1001, "Cant fork: $!", -1);
@@ -220,6 +223,7 @@ sub backtick {
         # child
         # set the child process to be a group leader, so that
         # kill -9 will kill it and all its descendents
+        # We have ignore SIGTTOU to let write background processes
         setpgrp( 0, 0 );
 
         if ($arg{redirect_stderr} == 1) {
@@ -247,6 +251,41 @@ sub trim {
     return $value;
 }
 
+sub powershell_encoded {
+	my ($value) = $_[0];
+
+	require Encode;
+	require MIME::Base64;
+	my $bytes = Encode::encode("utf16LE", $value);
+	my $script = MIME::Base64::encode_base64($bytes, "\n");
+	$script =~ s/\n//g;
+	return $script;
+}
+
+sub minimal_version {
+    my ($version_src, $version_dst) = @_;
+    
+    # No Version. We skip
+    
+    if (!defined($version_src) || !defined($version_dst) || 
+        $version_src !~ /^[0-9]+(?:\.[0-9\.])*$/ || $version_dst !~ /^[0-9x]+(?:\.[0-9x\.])*$/) {
+        return 1;
+    }
+    
+    my @version_src = split /\./, $version_src;
+    my @versions = split /\./, $version_dst;
+    for (my $i = 0; $i < scalar(@versions); $i++) {
+        return 1 if ($versions[$i] eq 'x');
+        return 1 if (!defined($version_src[$i]));
+        $version_src[$i] =~ /^([0-9]*)/;
+        next if ($versions[$i] == int($1));
+        return 0 if ($versions[$i] > int($1));
+        return 1 if ($versions[$i] < int($1));
+    }
+    
+    return 1;
+}
+
 1;
 
 __END__
diff --git a/centreon/plugins/options.pm b/centreon/plugins/options.pm
index 73acddc6c..52743ffd0 100644
--- a/centreon/plugins/options.pm
+++ b/centreon/plugins/options.pm
@@ -34,11 +34,14 @@
 ####################################################################################
 
 package centreon::plugins::options;
+
 use Pod::Usage;
 use Pod::Find qw(pod_where);
 use Getopt::Long;
 Getopt::Long::Configure("pass_through");
 Getopt::Long::Configure('bundling');
+use strict;
+use warnings;
 
 sub new {
     my $class = shift;
@@ -61,9 +64,9 @@ sub set_output {
 sub display_help {
     my ($self, %options) = @_;
     
+    my $stdout;
     foreach (@{$self->{pod_package}}) {
-        my $stdout;
-       
+        
         {
             local *STDOUT;
             open STDOUT, '>', \$stdout;
@@ -88,9 +91,9 @@ sub add_help {
     }
     
     if (defined($options{help_first})) {
-        shift @{$self->{pod_package}}, {package => $options{package}, sections => $options{sections}};
+        unshift @{$self->{pod_package}}, {package => $options{package}, sections => $options{sections}};
     } else {
-        push @{$self->{pod_package}}, {package => $options{package}, sections => $options{sections}};
+        push @{$self->{pod_package}}, { package => $options{package}, sections => $options{sections} };
     }
     
     $self->{pod_packages_once}->{$options{package}} = 1;
diff --git a/centreon/plugins/output.pm b/centreon/plugins/output.pm
index 87df5f003..82fb0dd1f 100644
--- a/centreon/plugins/output.pm
+++ b/centreon/plugins/output.pm
@@ -34,8 +34,10 @@
 ####################################################################################
 
 package centreon::plugins::output;
-use Encode;
+
 use centreon::plugins::misc;
+use strict;
+use warnings;
 
 sub new {
     my ($class, %options) = @_;
@@ -49,6 +51,8 @@ sub new {
 
     $options{options}->add_options(arguments =>
                                 {
+                                  "explode-perfdata-max:s@" => { name => 'explode_perfdata_max' },
+                                  "range-perfdata:s"        => { name => 'range_perfdata' },
                                   "filter-perfdata:s"       => { name => 'filter_perfdata' },
                                   "verbose"                 => { name => 'verbose' },
                                   "opt-exit:s"              => { name => 'opt_exit', default => 'unknown' },
@@ -70,7 +74,12 @@ sub new {
     $self->{global_short_outputs} = {OK => [], WARNING => [], CRITICAL => [], UNKNOWN => [], UNQUALIFIED_YET => []};
     $self->{global_long_output} = [];
     $self->{perfdatas} = [];
+    $self->{explode_perfdatas} = {};
+    $self->{explode_perfdata_total} = 0;
+    $self->{range_perfdata} = 0;
     $self->{global_status} = 0;
+    $self->{encode_utf8_import} = 0;
+    $self->{perlqq} = 0;
 
     $self->{disco_elements} = [];
     $self->{disco_entries} = [];
@@ -98,6 +107,31 @@ sub check_options {
             $self->{option_results}->{output_xml} = 1;
         }
     }
+    
+    if (defined($self->{option_results}->{range_perfdata})) {
+        $self->{range_perfdata} = $self->{option_results}->{range_perfdata};
+        $self->{range_perfdata} = 1 if ($self->{range_perfdata} eq '');
+        if ($self->{range_perfdata} !~ /^[012]$/) {
+            $self->add_option_msg(short_msg => "Wrong range-perfdata option '" . $self->{range_perfdata} . "'");
+            $self->option_exit();
+        }
+    }
+    
+    if (defined($self->{option_results}->{explode_perfdata_max})) {
+        if (${$self->{option_results}->{explode_perfdata_max}}[0] eq '') {
+            $self->{explode_perfdata_total} = 2;
+        } else {
+            $self->{explode_perfdata_total} = 1;
+            foreach (@{$self->{option_results}->{explode_perfdata_max}}) {
+                my ($perf_match, $perf_result) = split /,/;
+                if (!defined($perf_result)) {
+                    $self->add_option_msg(short_msg => "Wrong explode-perfdata-max option '" . $_ . "' (syntax: match,value)");
+                    $self->option_exit();
+                }
+                $self->{explode_perfdatas}->{$perf_match} = $perf_result;
+            }
+        }
+    }
 }
 
 sub add_option_msg {
@@ -150,13 +184,52 @@ sub output_add {
 sub perfdata_add {
     my ($self, %options) = @_;
     my $perfdata = {'label' => '', 'value' => '', unit => '', warning => '', critical => '', min => '', max => ''}; 
-    $perfdata = {%$perfdata, %options};
+    foreach (keys %options) {
+        next if (!defined($options{$_}));
+        $perfdata->{$_} = $options{$_};
+    }
+    $perfdata->{label} =~ s/'/''/g;
     push @{$self->{perfdatas}}, $perfdata;
 }
 
+sub explode_perfdatas {
+    my ($self, %options) = @_;
+    
+    return if ($self->{explode_perfdata_total} == 0);
+    foreach (@{$self->{perfdatas}}) {
+        next if ($_->{max} eq '');
+        if ($self->{explode_perfdata_total} == 2) {
+            $self->perfdata_add(label => $_->{label} . '_max', value => $_->{max});
+            next;
+        }
+        foreach my $regexp (keys %{$self->{explode_perfdatas}}) {
+            if ($_->{label} =~ /$regexp/) {
+                $self->perfdata_add(label => $self->{explode_perfdatas}->{$regexp}, value => $_->{max});
+                last;
+            }
+        }
+    }
+}
+
+sub range_perfdata {
+    my ($self, %options) = @_;
+    
+    return if ($self->{range_perfdata} == 0);
+    if ($self->{range_perfdata} == 1) {
+        for (my $i = 0; $i < scalar(@{$options{ranges}}); $i++) {
+            ${${$options{ranges}}[$i]} =~ s/^(@?)-?[0\.]+:/$1/;
+        }
+    } else {
+        for (my $i = 0; $i < scalar(@{$options{ranges}}); $i++) {
+            ${${$options{ranges}}[$i]} = '';
+        }
+    }
+}
+
 sub output_json {
     my ($self, %options) = @_;
     my $force_ignore_perfdata = (defined($options{force_ignore_perfdata}) && $options{force_ignore_perfdata} == 1) ? 1 : 0;
+    my $force_long_output = (defined($options{force_long_output}) && $options{force_long_output} == 1) ? 1 : 0;
     my $json_content = {plugin => {
                                    name => $self->{plugin},
                                    mode => $self->{mode},
@@ -179,7 +252,7 @@ sub output_json {
         }
     }
 
-    if (defined($self->{option_results}->{verbose}) || defined($options{force_long_output})) {
+    if (defined($self->{option_results}->{verbose}) || $force_long_output == 1) {
         foreach (@{$self->{global_long_output}}) {
             push @{$json_content->{plugin}->{outputs}}, {
                                                            type => 2,
@@ -189,13 +262,15 @@ sub output_json {
     }
 
     if ($options{force_ignore_perfdata} == 0) {
-        foreach (@{$self->{perfdatas}}) {
+        $self->explode_perfdatas();
+        foreach my $perf (@{$self->{perfdatas}}) {
             next if (defined($self->{option_results}->{filter_perfdata}) &&
-                     $_->{label} !~ /$self->{option_results}->{filter_perfdata}/);
+                     $perf->{label} !~ /$self->{option_results}->{filter_perfdata}/);
+            $self->range_perfdata(ranges => [\$perf->{warning}, \$perf->{critical}]);
             
             my %values = ();
-            foreach my $key (keys %$_) {
-                $values{$key} = $_->{$key};
+            foreach my $key (keys %$perf) {
+                $values{$key} = $perf->{$key};
             }
             
             push @{$json_content->{plugin}->{perfdatas}}, {
@@ -210,6 +285,7 @@ sub output_json {
 sub output_xml {
     my ($self, %options) = @_;
     my $force_ignore_perfdata = (defined($options{force_ignore_perfdata}) && $options{force_ignore_perfdata} == 1) ? 1 : 0;
+    my $force_long_output = (defined($options{force_long_output}) && $options{force_long_output} == 1) ? 1 : 0;
     my ($child_plugin_name, $child_plugin_mode, $child_plugin_exit, $child_plugin_output, $child_plugin_perfdata); 
 
     my $root = $self->{xml_output}->createElement('plugin');
@@ -255,7 +331,7 @@ sub output_xml {
         }
     }
 
-    if (defined($self->{option_results}->{verbose}) || defined($options{force_long_output})) {
+    if (defined($self->{option_results}->{verbose}) || $force_long_output == 1) {
         foreach (@{$self->{global_long_output}}) {
             my ($child_output, $child_type, $child_msg);
         
@@ -274,16 +350,18 @@ sub output_xml {
     }
 
     if ($options{force_ignore_perfdata} == 0) {
-        foreach (@{$self->{perfdatas}}) {
+        $self->explode_perfdatas();
+        foreach my $perf (@{$self->{perfdatas}}) {
             next if (defined($self->{option_results}->{filter_perfdata}) &&
-                     $_->{label} !~ /$self->{option_results}->{filter_perfdata}/);
+                     $perf->{label} !~ /$self->{option_results}->{filter_perfdata}/);
+            $self->range_perfdata(ranges => [\$perf->{warning}, \$perf->{critical}]);
         
             my ($child_perfdata);
             $child_perfdata = $self->{xml_output}->createElement("perfdata");
             $child_plugin_perfdata->addChild($child_perfdata);
-            foreach my $key (keys %$_) {
+            foreach my $key (keys %$perf) {
                 my $child = $self->{xml_output}->createElement($key);
-                $child->appendText($_->{$key});
+                $child->appendText($perf->{$key});
                 $child_perfdata->addChild($child);
             }
         }
@@ -295,6 +373,7 @@ sub output_xml {
 sub output_txt {
     my ($self, %options) = @_;
     my $force_ignore_perfdata = (defined($options{force_ignore_perfdata}) && $options{force_ignore_perfdata} == 1) ? 1 : 0;
+    my $force_long_output = (defined($options{force_long_output}) && $options{force_long_output} == 1) ? 1 : 0;
 
     if (defined($self->{global_short_concat_outputs}->{UNQUALIFIED_YET})) {
         $self->output_add(severity => uc($options{exit_litteral}), short_msg => $self->{global_short_concat_outputs}->{UNQUALIFIED_YET});
@@ -310,22 +389,24 @@ sub output_txt {
         print (($options{nolabel} == 0 ? 'UNKNOWN: ' : '') . $self->{global_short_concat_outputs}->{UNKNOWN} . " ");
     }
     if (uc($options{exit_litteral}) eq 'OK') {
-        print (($options{nolabel} == 0 ? 'OK: ' : '') . $self->{global_short_concat_outputs}->{OK} . " ");
+        print (($options{nolabel} == 0 ? 'OK: ' : '') . (defined($self->{global_short_concat_outputs}->{OK}) ? $self->{global_short_concat_outputs}->{OK} : '') . " ");
     }
 
     if ($force_ignore_perfdata == 1) {
         print "\n";
     } else {
         print "|";
-        foreach (@{$self->{perfdatas}}) {
+        $self->explode_perfdatas();
+        foreach my $perf (@{$self->{perfdatas}}) {
             next if (defined($self->{option_results}->{filter_perfdata}) &&
-                     $_->{label} !~ /$self->{option_results}->{filter_perfdata}/);
-            print " '" . $_->{label} . "'=" . $_->{value} . $_->{unit} . ";" . $_->{warning} . ";" . $_->{critical} . ";" . $_->{min} . ";" . $_->{max};
+                     $perf->{label} !~ /$self->{option_results}->{filter_perfdata}/);
+            $self->range_perfdata(ranges => [\$perf->{warning}, \$perf->{critical}]);
+            print " '" . $perf->{label} . "'=" . $perf->{value} . $perf->{unit} . ";" . $perf->{warning} . ";" . $perf->{critical} . ";" . $perf->{min} . ";" . $perf->{max};
         }
         print "\n";
     }
     
-    if (defined($self->{option_results}->{verbose}) || defined($options{force_long_output})) {
+    if (defined($self->{option_results}->{verbose}) || $force_long_output == 1) {
         if (scalar(@{$self->{global_long_output}})) {
             print join("\n", @{$self->{global_long_output}});
             print "\n";
@@ -337,25 +418,29 @@ sub display {
     my ($self, %options) = @_;
     my $nolabel = defined($options{nolabel}) ? 1 : 0;
     my $force_ignore_perfdata = (defined($options{force_ignore_perfdata}) && $options{force_ignore_perfdata} == 1) ? 1 : 0;
+    my $force_long_output = (defined($options{force_long_output}) && $options{force_long_output} == 1) ? 1 : 0;
 
     if (defined($self->{option_results}->{output_xml})) {
         $self->create_xml_document();
         if ($self->{is_output_xml}) {
             $self->output_xml(exit_litteral => $self->get_litteral_status(), 
-                              nolabel => $nolabel, force_ignore_perfdata => $force_ignore_perfdata);
+                              nolabel => $nolabel, 
+                              force_ignore_perfdata => $force_ignore_perfdata, force_long_output => $force_long_output);
             return ;
         }
     } elsif (defined($self->{option_results}->{output_json})) {
         $self->create_json_document();
         if ($self->{is_output_json}) {
             $self->output_json(exit_litteral => $self->get_litteral_status(), 
-                               nolabel => $nolabel, force_ignore_perfdata => $force_ignore_perfdata);
+                               nolabel => $nolabel,
+                               force_ignore_perfdata => $force_ignore_perfdata, force_long_output => $force_long_output);
             return ;
         }
     } 
     
     $self->output_txt(exit_litteral => $self->get_litteral_status(), 
-                      nolabel => $nolabel, force_ignore_perfdata => $force_ignore_perfdata);
+                      nolabel => $nolabel,
+                      force_ignore_perfdata => $force_ignore_perfdata, force_long_output => $force_long_output);
 }
 
 sub die_exit {
@@ -484,7 +569,8 @@ sub is_litteral_status {
 sub create_json_document {
     my ($self) = @_;
 
-    require JSON;
+    centreon::plugins::misc::mymodule_load(output => $self->{output}, module => 'JSON',
+                                               error_msg => "Cannot load module 'JSON'.");
     $self->{is_output_json} = 1;
     $self->{json_output} = JSON->new->utf8();
 }
@@ -492,7 +578,8 @@ sub create_json_document {
 sub create_xml_document {
     my ($self) = @_;
 
-    require XML::LibXML;
+    centreon::plugins::misc::mymodule_load(output => $self->{output}, module => 'XML::LibXML',
+                                               error_msg => "Cannot load module 'XML::LibXML'.");
     $self->{is_output_xml} = 1;
     $self->{xml_output} = XML::LibXML::Document->new('1.0', 'utf-8');
 }
@@ -586,7 +673,18 @@ sub display_disco_show {
 sub to_utf8 {
     my ($self, $value) = @_;
     
-    return centreon::plugins::misc::trim(Encode::decode('UTF-8', $value, Encode::PERLQQ));
+    if ($self->{encode_utf8_import} == 0) {
+        
+        
+        # Some Perl version dont have the following module (like Perl 5.6.x)
+        centreon::plugins::misc::mymodule_load(output => $self->{output}, module => 'Encode',
+                                               error_msg => "Cannot load module 'Encode'.");
+        
+        $self->{encode_utf8_import} = 1;
+        eval '$self->{perlqq} = Encode::PERLQQ';
+    }
+    
+    return centreon::plugins::misc::trim(Encode::decode('UTF-8', $value, $self->{perlqq}));
 }
 
 sub add_disco_entry {
@@ -598,7 +696,7 @@ sub add_disco_entry {
 sub is_disco_format {
     my ($self) = @_;
 
-    if (defined($self->{option_results}->{disco_format}) ) {
+    if (defined($self->{option_results}->{disco_format})) {
         return 1;
     }
     return 0;
@@ -607,7 +705,7 @@ sub is_disco_format {
 sub is_disco_show {
     my ($self) = @_;
 
-    if ( defined($self->{option_results}->{disco_show}) ) {
+    if (defined($self->{option_results}->{disco_show})) {
         return 1;
     }
     return 0;
@@ -637,6 +735,16 @@ Display long output.
 
 Filter perfdata that match the regexp.
 
+=item B<--explode-perfdata-max>
+
+Put max perfdata (if it exist) in a specific perfdata 
+(without values: same with '_max' suffix)
+
+=item B<--range-perfdata>
+
+Change perfdata range thresholds display: 
+1 = start value equals to '0' is removed, 2 = threshold range is not display.
+
 =item B<--opt-exit>
 
 Exit code for an option error, usage (default: unknown).
diff --git a/centreon/plugins/perfdata.pm b/centreon/plugins/perfdata.pm
index 7f9e0d803..52eac55d0 100644
--- a/centreon/plugins/perfdata.pm
+++ b/centreon/plugins/perfdata.pm
@@ -35,6 +35,9 @@
 
 package centreon::plugins::perfdata;
 
+use strict;
+use warnings;
+
 sub new {
     my ($class, %options) = @_;
     my $self  = {};
@@ -52,18 +55,34 @@ sub get_perfdata_for_output {
     # $options{label} : threshold label
     # $options{total} : percent threshold to transform in global
     # $options{cast_int} : cast absolute to int
+    # $options{op} : operator to apply to start/end value (uses with 'value'})
+    # $options{value} : value to apply with 'op' option
     
-    my $perf_output = $self->{threshold_label}->{$options{label}}->{value};
-    if (defined($perf_output) && $perf_output ne '' && defined($options{total})) {
-            $perf_output = ($self->{threshold_label}->{$options{label}}->{arobase} == 1 ? "@" : "") . 
-                            (($self->{threshold_label}->{$options{label}}->{infinite_neg} == 0) ? (defined($options{cast_int}) ? sprintf("%d", ($self->{threshold_label}->{$options{label}}->{start} * $options{total} / 100)) : sprintf("%.2f", ($self->{threshold_label}->{$options{label}}->{start} * $options{total} / 100))) : "") . 
-                             ":" . 
-                             (($self->{threshold_label}->{$options{label}}->{infinite_pos} == 0) ? (defined($options{cast_int}) ? sprintf("%d", ($self->{threshold_label}->{$options{label}}->{end} * $options{total} / 100)) : sprintf("%.2f", ($self->{threshold_label}->{$options{label}}->{end} * $options{total} / 100))) : "");
+    if (!defined($self->{threshold_label}->{$options{label}}->{value}) || $self->{threshold_label}->{$options{label}}->{value} eq '') {
+        return '';
     }
+    
+    my %perf_value = %{$self->{threshold_label}->{$options{label}}};
+    
+    if (defined($options{op}) && defined($options{value})) {
+        eval "\$perf_value{start} = \$perf_value{start} $options{op} \$options{value}" if ($perf_value{infinite_neg} == 0);
+        eval "\$perf_value{end} = \$perf_value{end} $options{op} \$options{value}" if ($perf_value{infinite_pos} == 0);
+    }
+    if (defined($options{total})) {
+        $perf_value{start} = $perf_value{start} * $options{total} / 100 if ($perf_value{infinite_neg} == 0);
+        $perf_value{end} = $perf_value{end} * $options{total} / 100 if ($perf_value{infinite_pos} == 0);
+        $perf_value{start} = sprintf("%.2f", $perf_value{start}) if ($perf_value{infinite_neg} == 0 && !defined($options{cast_int}));
+        $perf_value{end} = sprintf("%.2f", $perf_value{end}) if ($perf_value{infinite_pos} == 0 && !defined($options{cast_int}));
+    }
+    
+    $perf_value{start} = sprintf("%d", $perf_value{start}) if ($perf_value{infinite_neg} == 0 && defined($options{cast_int}));
+    $perf_value{end} = sprintf("%d", $perf_value{end}) if ($perf_value{infinite_pos} == 0 && defined($options{cast_int}));
+    
+    my $perf_output = ($perf_value{arobase} == 1 ? "@" : "") . 
+                      (($perf_value{infinite_neg} == 0) ? $perf_value{start} : "~") . 
+                      ":" . 
+                      (($perf_value{infinite_pos} == 0) ? $perf_value{end} : "");
 
-    if (!defined($perf_output)) {
-        $perf_output = '';
-    }
     return $perf_output;
 }
 
@@ -93,7 +112,7 @@ sub threshold_check {
         next if (!defined($self->{threshold_label}->{$_->{label}}->{value}) || $self->{threshold_label}->{$_->{label}}->{value} eq '');
         if ($self->{threshold_label}->{$_->{label}}->{arobase} == 0 && ($options{value} < $self->{threshold_label}->{$_->{label}}->{start} || $options{value} > $self->{threshold_label}->{$_->{label}}->{end})) {
             return $_->{exit_litteral};
-        } elsif ($self->{threshold_label}->{$_->{label}}->{arobase}  == 1 && ($options{value} >= $self->{threshold_label}->{$_->{label}}->{end} && $options{value} <= $self->{threshold_label}->{$_->{label}}->{end})) {
+        } elsif ($self->{threshold_label}->{$_->{label}}->{arobase}  == 1 && ($options{value} >= $self->{threshold_label}->{$_->{label}}->{start} && $options{value} <= $self->{threshold_label}->{$_->{label}}->{end})) {
             return $_->{exit_litteral};
         }
     }
@@ -109,42 +128,10 @@ sub trim {
     return $value;
 }
 
-sub continue_to {
-    my $self = shift;
-    my ($forbidden, $stop1, $not_stop_after) = @_;
-    my $value = "";
-
-    while ($self->{perfdata_pos} < $self->{perfdata_size}) {
-        if (defined($forbidden) && ${$self->{perfdata_chars}}[$self->{perfdata_pos}] =~ /$forbidden/) {
-            return undef;
-        }
-        if (${$self->{perfdata_chars}}[$self->{perfdata_pos}] =~ /$stop1/) {
-            if (!defined($not_stop_after)) {
-                return $value;
-            }
-            if (!($self->{perfdata_pos} + 1 < $self->{perfdata_size} && ${$self->{perfdata_chars}}[$self->{perfdata_pos} + 1] =~ /$not_stop_after/)) {
-                $self->{perfdata_pos}++;
-                return $value;
-            }
-            $self->{perfdata_pos}++;
-        }
-
-        $value .= ${$self->{perfdata_chars}}[$self->{perfdata_pos}];
-        $self->{perfdata_pos}++;
-    }
-
-    return $value;
-}
-
 sub parse_threshold {
     my $self = shift;
 
-    @{$self->{perfdata_chars}} = split //, $self->trim($_[0]);
-    $self->{perfdata_pos} = 0;
-    $self->{perfdata_size} = scalar(@{$self->{perfdata_chars}});
-
-    my $neg = 1;
-    my $value_tmp = "";
+    my $perf = $self->trim($_[0]);
 
     my $arobase = 0;
     my $infinite_neg = 0;
@@ -153,85 +140,44 @@ sub parse_threshold {
     my $value_end = "";
     my $global_status = 1;
     
-    if (defined(${$self->{perfdata_chars}}[$self->{perfdata_pos}]) && ${$self->{perfdata_chars}}[$self->{perfdata_pos}] eq "@") {
-        $arobase = 1;
-        $self->{perfdata_pos}++;
-    }
-
-    if (defined(${$self->{perfdata_chars}}[$self->{perfdata_pos}]) && ${$self->{perfdata_chars}}[$self->{perfdata_pos}] eq "~") {
-        $infinite_neg = 1;
-        $self->{perfdata_pos}++;
-    } else {
-        if (defined(${$self->{perfdata_chars}}[$self->{perfdata_pos}]) && ${$self->{perfdata_chars}}[$self->{perfdata_pos}] eq "-") {
-            $neg = -1;
-            $self->{perfdata_pos}++;
-        }
-        $value_tmp = $self->continue_to(undef, "[^0-9\.,]");
-        if (defined($value_tmp) && $value_tmp ne "") {
-            $value_tmp =~ s/,/./g;
-            $value_tmp = $value_tmp * $neg;
-        }
-        $neg = 1;
-    }
-
-    if (defined(${$self->{perfdata_chars}}[$self->{perfdata_pos}]) && ${$self->{perfdata_chars}}[$self->{perfdata_pos}] eq ":") {
-        if ($value_tmp ne "") {
-            $value_start = $value_tmp;
-        } else {
-            $value_start = 0;
-        }
-        $self->{perfdata_pos}++;
-
-        if (defined(${$self->{perfdata_chars}}[$self->{perfdata_pos}]) && ${$self->{perfdata_chars}}[$self->{perfdata_pos}] eq "-") {
-            $neg = -1;
-            $self->{perfdata_pos}++;
-        }
-        $value_end = $self->continue_to(undef, "[^0-9\.,]");
-        if (defined($value_tmp) && $value_end ne "") {
-            $value_end =~ s/,/./g;
-            $value_end = $value_end * $neg;
-        } else {
+    if ($perf =~ /^(\@?)((?:~|(?:\+|-)?\d+(?:[\.,]\d+)?|):)?((?:\+|-)?\d+(?:[\.,]\d+)?)?$/) {
+        $value_start = $2 if (defined($2));
+        $value_end = $3 if (defined($3));
+        $arobase = 1 if (defined($1) && $1 eq '@');
+        $value_start =~ s/[\+:]//g;
+        $value_end =~ s/\+//;
+        if ($value_end eq '') {
+            $value_end = 1e500;
             $infinite_pos = 1;
         }
+        $value_start = 0 if ($value_start eq '');      
+        $value_start =~ s/,/\./;
+        $value_end =~ s/,/\./;
+        
+        if ($value_start eq '~') {
+            $value_start = -1e500;
+            $infinite_neg = 1;
+        }
     } else {
-        $value_start = 0;
-        $value_end = $value_tmp;
-    }
-    
-    my $value = $self->continue_to(undef, "[ \t;]");
-    if ($value ne '') {
         $global_status = 0;
     }
 
-    if ($infinite_neg == 1) {
-        $value_start = '-1e500';
-    }
-    if ($infinite_pos == 1) {
-        $value_end = '1e500';
-    }
-
     return ($global_status, $value_start, $value_end, $arobase, $infinite_neg, $infinite_pos);
 }
 
 sub change_bytes {
     my ($self, %options) = @_;
-
-    my $unit = defined($options{network}) ? 'b' : 'B';
     my $divide = defined($options{network}) ? 1000 : 1024;
+    my @units = ('K', 'M', 'G', 'T');
+    my $unit = '';
     
-    if (($options{value} / $divide) >= 1) {
+    for (my $i = 0; $i < scalar(@units); $i++) {
+        last if (($options{value} / $divide) < 1);
+        $unit = $units[$i];
         $options{value} = $options{value} / $divide;
-        $unit = defined($options{network}) ? 'Kb' : 'KB';
     }
-    if (($options{value} / $divide) >= 1) {
-        $options{value} = $options{value} / $divide;
-        $unit = defined($options{network}) ? 'Mb' : 'MB';
-    }
-    if (($options{value} / $divide) >= 1) {
-        $options{value} = $options{value} / $divide;
-        $unit = defined($options{network}) ? 'Gb' : 'GB';
-    }
-    return (sprintf("%.2f", $options{value}), $unit);
+
+    return (sprintf("%.2f", $options{value}), $unit . (defined($options{network}) ? 'b' : 'B'));
 }
 
 1;
diff --git a/centreon/plugins/script.pm b/centreon/plugins/script.pm
index 2b435358d..4f184b2e0 100644
--- a/centreon/plugins/script.pm
+++ b/centreon/plugins/script.pm
@@ -77,8 +77,7 @@ sub class_handle_DIE {
 sub handle_DIE {
     my ($self, $msg) = @_;
 
-    # For 'mod_perl'
-    die $msg if $^S;
+    return unless defined $^S and $^S == 0; # Ignore errors in eval
     $self->{output}->add_option_msg(short_msg => $msg);
     $self->{output}->die_exit();
 }
@@ -94,16 +93,18 @@ sub get_plugin {
     $self->{options}->set_output(output => $self->{output});
 
     $self->{options}->add_options(arguments => {
-                                                'plugin:s' => { name => 'plugin' }, 
-                                                'help' => { name => 'help' },
-                                                'version' => { name => 'version' },
-                                                'runas:s' => { name => 'runas' },
+                                                'plugin:s'       => { name => 'plugin' },
+                                                'list-plugin'    => { name => 'list_plugin' }, 
+                                                'help'           => { name => 'help' },
+                                                'version'        => { name => 'version' },
+                                                'runas:s'        => { name => 'runas' },
                                                 'environment:s%' => { name => 'environment' },
                                                 } );
 
     $self->{options}->parse_options();
 
     $self->{plugin} = $self->{options}->get_option(argument => 'plugin' );
+    $self->{list_plugin} = $self->{options}->get_option(argument => 'list_plugin' );
     $self->{help} = $self->{options}->get_option(argument => 'help' );
     $self->{version} = $self->{options}->get_option(argument => 'version' );
     $self->{runas} = $self->{options}->get_option(argument => 'runas' );
@@ -129,6 +130,46 @@ sub display_local_help {
     $self->{output}->add_option_msg(long_msg => $stdout) if (defined($stdout));
 }
 
+sub check_directory {
+    my ($self, $directory) = @_;
+    
+    opendir(my $dh, $directory) || return ;
+    while (my $filename = readdir $dh) {
+        $self->check_directory($directory . "/" . $filename) if ($filename !~ /^\./ && -d $directory . "/" . $filename);
+        if ($filename eq 'plugin.pm') {
+            my $stdout = '';
+            
+            {
+                local *STDOUT;
+                open STDOUT, '>', \$stdout;
+                pod2usage(-exitval => 'NOEXIT', -input => $directory . "/" . $filename,
+                          -verbose => 99, 
+                          -sections => "PLUGIN DESCRIPTION");
+            }
+            $self->{plugins_result}->{$directory . "/" . $filename} = $stdout;
+        }
+    }
+    closedir $dh;
+}
+
+sub display_list_plugin {
+    my $self = shift;
+    $self->{plugins_result} = {};
+    
+    # Search file 'plugin.pm'
+    $self->check_directory($FindBin::Bin);
+    foreach my $key (keys %{$self->{plugins_result}}) {
+        my $name = $key;
+        $name =~ s/^$FindBin::Bin\/(.*)\.pm/$1/;
+        $name =~ s/\//::/g;
+        $self->{plugins_result}->{$key} =~ s/^Plugin Description/DESCRIPTION/i;
+        
+        $self->{output}->add_option_msg(long_msg => '-----------------');
+        $self->{output}->add_option_msg(long_msg => 'PLUGIN: ' . $name);
+        $self->{output}->add_option_msg(long_msg => $self->{plugins_result}->{$key});
+    }
+}
+
 sub check_relaunch {
     my $self = shift;
     my $need_restart = 0;
@@ -200,6 +241,10 @@ sub run {
         $self->display_local_help();
         $self->{output}->option_exit();
     }
+    if (defined($self->{list_plugin})) {
+        $self->display_list_plugin();
+        $self->{output}->option_exit();
+    }
     if (!defined($self->{plugin}) || $self->{plugin} eq '') {
         $self->{output}->add_option_msg(short_msg => "Need to specify '--plugin' option.");
         $self->{output}->option_exit();
@@ -235,6 +280,10 @@ centreon_plugins.pl [options]
 
 Specify the path to the plugin.
 
+=item B<--list-plugin>
+
+Print available plugins.
+
 =item B<--version>
 
 Print plugin version.
diff --git a/centreon/plugins/script_simple.pm b/centreon/plugins/script_simple.pm
index 372b0dcb0..b9a9863d7 100644
--- a/centreon/plugins/script_simple.pm
+++ b/centreon/plugins/script_simple.pm
@@ -50,9 +50,10 @@ sub new {
     
     $self->{options}->add_options(
                                    arguments => {
-                                                'mode:s'       => { name => 'mode' },
-                                                'dyn-mode:s'   => { name => 'dynmode_name' },
-                                                'list-mode'    => { name => 'list_mode' },
+                                                'mode:s'         => { name => 'mode' },
+                                                'dyn-mode:s'     => { name => 'dynmode_name' },
+                                                'list-mode'      => { name => 'list_mode' },
+                                                'mode-version:s' => { name => 'mode_version' },
                                                 }
                                   );
     $self->{version} = '1.0';
@@ -60,8 +61,9 @@ sub new {
     $self->{default} = undef;
     
     $self->{options}->parse_options();
-    $self->{mode_name} = $self->{options}->get_option(argument => 'mode' );
-    $self->{list_mode} = $self->{options}->get_option(argument => 'list_mode' );
+    $self->{mode_name} = $self->{options}->get_option(argument => 'mode');
+    $self->{list_mode} = $self->{options}->get_option(argument => 'list_mode');
+    $self->{mode_version} = $self->{options}->get_option(argument => 'mode_version');
     $self->{options}->clean();
 
     $self->{options}->add_help(package => $options{package}, sections => 'PLUGIN DESCRIPTION');
@@ -113,6 +115,10 @@ sub init {
         $self->{mode}->version();
         $self->{output}->option_exit(nolabel => 1);
     }
+    if (centreon::plugins::misc::minimal_version($self->{mode}->{version}, $self->{mode_version}) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Not good version for plugin mode. Excepted at least: " . $self->{mode_version} . ". Get: ".  $self->{mode}->{version});
+        $self->{output}->option_exit();
+    }
     
     $self->{options}->parse_options();
     $self->{option_results} = $self->{options}->get_options();
@@ -192,6 +198,10 @@ Specify a mode with the path (separated by '::').
 
 List available modes.
 
+=item B<--mode-version>
+
+Check minimal version of mode. If not, unknown error.
+
 =item B<--version>
 
 Display plugin version.
diff --git a/centreon/plugins/script_snmp.pm b/centreon/plugins/script_snmp.pm
index f5bf29dc7..9dfa4fa7f 100644
--- a/centreon/plugins/script_snmp.pm
+++ b/centreon/plugins/script_snmp.pm
@@ -52,9 +52,10 @@ sub new {
     
     $self->{options}->add_options(
                                    arguments => {
-                                                'mode:s'       => { name => 'mode' },
-                                                'dyn-mode:s'   => { name => 'dynmode_name' },
-                                                'list-mode'    => { name => 'list_mode' },
+                                                'mode:s'         => { name => 'mode' },
+                                                'dyn-mode:s'     => { name => 'dynmode_name' },
+                                                'list-mode'      => { name => 'list_mode' },
+                                                'mode-version:s' => { name => 'mode_version' },
                                                 }
                                   );
     $self->{version} = '1.0';
@@ -62,8 +63,9 @@ sub new {
     $self->{default} = undef;
     
     $self->{options}->parse_options();
-    $self->{mode_name} = $self->{options}->get_option(argument => 'mode' );
-    $self->{list_mode} = $self->{options}->get_option(argument => 'list_mode' );
+    $self->{mode_name} = $self->{options}->get_option(argument => 'mode');
+    $self->{list_mode} = $self->{options}->get_option(argument => 'list_mode');
+    $self->{mode_version} = $self->{options}->get_option(argument => 'mode_version');
     $self->{options}->clean();
 
     $self->{options}->add_help(package => $options{package}, sections => 'PLUGIN DESCRIPTION');
@@ -118,10 +120,14 @@ sub init {
         $self->{mode}->version();
         $self->{output}->option_exit(nolabel => 1);
     }
+    if (centreon::plugins::misc::minimal_version($self->{mode}->{version}, $self->{mode_version}) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Not good version for plugin mode. Excepted at least: " . $self->{mode_version} . ". Get: ".  $self->{mode}->{version});
+        $self->{output}->option_exit();
+    }
     
     $self->{options}->parse_options();
     $self->{option_results} = $self->{options}->get_options();
-
+    
     $self->{snmp}->check_options(option_results => $self->{option_results});
     $self->{mode}->check_options(option_results => $self->{option_results}, default => $self->{default});
 }
@@ -200,6 +206,10 @@ Specify a mode with the path (separated by '::').
 
 List available modes.
 
+=item B<--mode-version>
+
+Check minimal version of mode. If not, unknown error.
+
 =item B<--version>
 
 Display plugin version.
diff --git a/centreon/plugins/script_sql.pm b/centreon/plugins/script_sql.pm
index 92c92fc49..e6b03df4c 100644
--- a/centreon/plugins/script_sql.pm
+++ b/centreon/plugins/script_sql.pm
@@ -51,12 +51,13 @@ sub new {
     
     $self->{options}->add_options(
                                    arguments => {
-                                                'mode:s'       => { name => 'mode_name' },
-                                                'dyn-mode:s'   => { name => 'dynmode_name' },
-                                                'list-mode'    => { name => 'list_mode' },
-                                                'sqlmode:s'    => { name => 'sqlmode_name', default => 'dbi' },
-                                                'list-sqlmode' => { name => 'list_sqlmode' },
-                                                'multiple'     => { name => 'multiple' },
+                                                'mode:s'         => { name => 'mode_name' },
+                                                'dyn-mode:s'     => { name => 'dynmode_name' },
+                                                'list-mode'      => { name => 'list_mode' },
+                                                'mode-version:s' => { name => 'mode_version' },
+                                                'sqlmode:s'      => { name => 'sqlmode_name', default => 'dbi' },
+                                                'list-sqlmode'   => { name => 'list_sqlmode' },
+                                                'multiple'       => { name => 'multiple' },
                                                 }
                                   );
     $self->{version} = '1.0';
@@ -136,6 +137,10 @@ sub init {
         $self->{mode}->version();
         $self->{output}->option_exit(nolabel => 1);
     }
+    if (centreon::plugins::misc::minimal_version($self->{mode}->{version}, $self->{mode_version}) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Not good version for plugin mode. Excepted at least: " . $self->{mode_version} . ". Get: ".  $self->{mode}->{version});
+        $self->{output}->option_exit();
+    }
     
     $self->{options}->parse_options();
     $self->{option_results} = $self->{options}->get_options();
@@ -255,6 +260,10 @@ List available modes.
 
 Display plugin version.
 
+=item B<--mode-version>
+
+Check minimal version of mode. If not, unknown error.
+
 =item B<--dyn-mode>
 
 Specify a mode with the path (separated by '::').
diff --git a/centreon/plugins/script_wsman.pm b/centreon/plugins/script_wsman.pm
index 8e7b89165..151f3ae01 100644
--- a/centreon/plugins/script_wsman.pm
+++ b/centreon/plugins/script_wsman.pm
@@ -52,9 +52,10 @@ sub new {
     
     $self->{options}->add_options(
                                    arguments => {
-                                                'mode:s'       => { name => 'mode' },
-                                                'dyn-mode:s'   => { name => 'dynmode_name' },
-                                                'list-mode'    => { name => 'list_mode' },
+                                                'mode:s'         => { name => 'mode' },
+                                                'dyn-mode:s'     => { name => 'dynmode_name' },
+                                                'list-mode'      => { name => 'list_mode' },
+                                                'mode-version:s' => { name => 'mode_version' },
                                                 }
                                   );
     $self->{version} = '1.0';
@@ -62,8 +63,9 @@ sub new {
     $self->{default} = undef;
     
     $self->{options}->parse_options();
-    $self->{mode_name} = $self->{options}->get_option(argument => 'mode' );
-    $self->{list_mode} = $self->{options}->get_option(argument => 'list_mode' );
+    $self->{mode_name} = $self->{options}->get_option(argument => 'mode');
+    $self->{list_mode} = $self->{options}->get_option(argument => 'list_mode');
+    $self->{mode_version} = $self->{options}->get_option(argument => 'mode_version');
     $self->{options}->clean();
 
     $self->{options}->add_help(package => $options{package}, sections => 'PLUGIN DESCRIPTION');
@@ -118,6 +120,10 @@ sub init {
         $self->{mode}->version();
         $self->{output}->option_exit(nolabel => 1);
     }
+    if (centreon::plugins::misc::minimal_version($self->{mode}->{version}, $self->{mode_version}) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Not good version for plugin mode. Excepted at least: " . $self->{mode_version} . ". Get: ".  $self->{mode}->{version});
+        $self->{output}->option_exit();
+    }
     
     $self->{options}->parse_options();
     $self->{option_results} = $self->{options}->get_options();
@@ -204,6 +210,10 @@ List available modes.
 
 Display plugin version.
 
+=item B<--mode-version>
+
+Check minimal version of mode. If not, unknown error.
+
 =back
 
 =head1 DESCRIPTION
diff --git a/centreon/plugins/statefile.pm b/centreon/plugins/statefile.pm
index 3a4f6c200..125ab9bf4 100644
--- a/centreon/plugins/statefile.pm
+++ b/centreon/plugins/statefile.pm
@@ -34,8 +34,12 @@
 ####################################################################################
 
 package centreon::plugins::statefile;
+
+use strict;
+use warnings;
 use Data::Dumper;
 use vars qw($datas);
+use centreon::plugins::misc;
 
 my $default_dir = '/var/lib/centreon/centplugins';
 
@@ -47,15 +51,18 @@ sub new {
     if (defined($options{options})) {
         $options{options}->add_options(arguments =>
                                 {
-                                  "memcached:s"         => { name => 'memcached' },
+                                  "memcached:s"           => { name => 'memcached' },
                                   "statefile-dir:s"       => { name => 'statefile_dir', default => $default_dir },
                                   "statefile-concat-cwd"  => { name => 'statefile_concat_cwd' },
+                                  "statefile-storable"    => { name => 'statefile_storable' },
                                 });
         $options{options}->add_help(package => __PACKAGE__, sections => 'RETENTION OPTIONS', once => 1);
     }
     
     $self->{output} = $options{output};
     $self->{datas} = {};
+    $self->{storable} = 0;
+    $self->{memcached_ok} = 0;
     $self->{memcached} = undef;
     
     $self->{statefile_dir} = undef;
@@ -67,15 +74,22 @@ sub check_options {
     my ($self, %options) = @_;
 
     if (defined($options{option_results}) && defined($options{option_results}->{memcached})) {
-        require Memcached::libmemcached;
+        centreon::plugins::misc::mymodule_load(output => $self->{output}, module => 'Memcached::libmemcached',
+                                               error_msg => "Cannot load module 'Memcached::libmemcached'.");
         $self->{memcached} = Memcached::libmemcached->new();
         Memcached::libmemcached::memcached_server_add($self->{memcached}, $options{option_results}->{memcached});
     }
     $self->{statefile_dir} = $options{option_results}->{statefile_dir};
     if ($self->{statefile_dir} ne $default_dir && defined($options{option_results}->{statefile_concat_cwd})) {
-        require Cwd;
+        centreon::plugins::misc::mymodule_load(output => $self->{output}, module => 'Cwd',
+                                               error_msg => "Cannot load module 'Cwd'.");
         $self->{statefile_dir} = Cwd::cwd() . '/' . $self->{statefile_dir};
     }
+    if (defined($options{option_results}->{statefile_storable})) {
+        centreon::plugins::misc::mymodule_load(output => $self->{output}, module => 'Storable',
+                                               error_msg => "Cannot load module 'Storable'.");
+        $self->{storable} = 1;
+    }
 }
 
 sub read {
@@ -87,6 +101,7 @@ sub read {
         # if "SUCCESS" or "NOT FOUND" is ok. Other with use the file
         my $val = Memcached::libmemcached::memcached_get($self->{memcached}, $self->{statefile_dir} . "/" . $self->{statefile});
         if (defined($self->{memcached}->errstr) && $self->{memcached}->errstr =~ /^SUCCESS|NOT FOUND$/i) {
+            $self->{memcached_ok} = 1;
             if (defined($val)) {
                 eval( $val );
                 $self->{datas} = $datas;
@@ -95,7 +110,6 @@ sub read {
             }
             return 0;
         }
-        $self->{memcached_ok} = 0;
     }
     
     if (! -e $self->{statefile_dir} . "/" . $self->{statefile}) {
@@ -112,22 +126,36 @@ sub read {
         return 0;
     }
     
-    unless (my $return = do $self->{statefile_dir} . "/" . $self->{statefile}) {
+    if ($self->{storable} == 1) {
+        open FILE, $self->{statefile_dir} . "/" . $self->{statefile};
+        eval {
+            $self->{datas} = Storable::fd_retrieve(*FILE);
+        };
+        # File is corrupted surely. We'll reset it
         if ($@) {
-            $self->{output}->add_option_msg(short_msg => "Couldn't parse '" . $self->{statefile_dir} . "/" . $self->{statefile} . "': $@");
-            $self->{output}->option_exit();
+            close FILE;
+            return 0;
         }
-        unless (defined($return)) {
-            $self->{output}->add_option_msg(short_msg => "Couldn't do '" . $self->{statefile_dir} . "/" . $self->{statefile} . "': $!");
-            $self->{output}->option_exit();
-        }
-        unless ($return) {
-            $self->{output}->add_option_msg(short_msg => "Couldn't run '" . $self->{statefile_dir} . "/" . $self->{statefile} . "': $!");
-            $self->{output}->option_exit();
+        close FILE;
+    } else {
+        unless (my $return = do $self->{statefile_dir} . "/" . $self->{statefile}) {
+            # File is corrupted surely. We'll reset it
+            return 0;
+            #if ($@) {
+            #    $self->{output}->add_option_msg(short_msg => "Couldn't parse '" . $self->{statefile_dir} . "/" . $self->{statefile} . "': $@");
+            #    $self->{output}->option_exit();
+            #}
+            #unless (defined($return)) {
+            #    $self->{output}->add_option_msg(short_msg => "Couldn't do '" . $self->{statefile_dir} . "/" . $self->{statefile} . "': $!");
+            #    $self->{output}->option_exit();
+            #}
+            #unless ($return) {
+            #    $self->{output}->add_option_msg(short_msg => "Couldn't run '" . $self->{statefile_dir} . "/" . $self->{statefile} . "': $!");
+            #    $self->{output}->option_exit();
         }
+        $self->{datas} = $datas;
+        $datas = {};
     }
-    $self->{datas} = $datas;
-    $datas = {};
 
     return 1;
 }
@@ -150,7 +178,7 @@ sub get {
 sub write {
     my ($self, %options) = @_;
 
-    if (defined($self->{memcached})) {
+    if ($self->{memcached_ok} == 1) {
         Memcached::libmemcached::memcached_set($self->{memcached}, $self->{statefile_dir} . "/" . $self->{statefile}, 
                                                Data::Dumper->Dump([$options{data}], ["datas"]));
         if (defined($self->{memcached}->errstr) && $self->{memcached}->errstr =~ /^SUCCESS$/i) {
@@ -158,7 +186,11 @@ sub write {
         }
     }
     open FILE, ">", $self->{statefile_dir} . "/" . $self->{statefile};
-    print FILE Data::Dumper->Dump([$options{data}], ["datas"]);
+    if ($self->{storable} == 1) {
+        Storable::store_fd($options{data}, *FILE);
+    } else {
+        print FILE Data::Dumper->Dump([$options{data}], ["datas"]);
+    }
     close FILE;
 }
 
@@ -191,6 +223,10 @@ Directory for statefile (Default: '/var/lib/centreon/centplugins').
 Concat current working directory with option '--statefile-dir'.
 Useful on Windows when plugin is compiled.
 
+=item B<--statefile-storable>
+
+Use Perl Module 'Storable' (instead Data::Dumper) to store datas.
+
 =back
 
 =head1 DESCRIPTION
diff --git a/database/informix/mode/listdatabases.pm b/database/informix/mode/listdatabases.pm
index e3f87c9d2..dd54c8763 100644
--- a/database/informix/mode/listdatabases.pm
+++ b/database/informix/mode/listdatabases.pm
@@ -71,6 +71,7 @@ SELECT name FROM sysdatabases ORDER BY name
     $self->{list_databases} = [];
     while ((my $row = $self->{sql}->fetchrow_hashref())) {
         if (defined($self->{option_results}->{exclude}) && $row->{name} !~ /$self->{option_results}->{exclude}/) {
+            $self->{output}->output_add(long_msg => "Skipping database '" . centreon::plugins::misc::trim($row->{name}) . "': no matching filter name");
             next;
         }
         push @{$self->{list_databases}}, centreon::plugins::misc::trim($row->{name});
@@ -84,10 +85,13 @@ sub run {
 
     $self->manage_selection();
     
+    foreach my $name (sort @{$self->{list_databases}}) {
+        $self->{output}->output_add(long_msg => "'" . $name . "'");
+    }
     $self->{output}->output_add(severity => 'OK',
-                                short_msg => "List of dbspaces: " . join(', ', @{$self->{list_databases}}));
+                                short_msg => "List of databases:");
 
-    $self->{output}->display();
+    $self->{output}->display(nolabel => 1, force_ignore_perfdata => 1, force_long_output => 1);
     $self->{output}->exit();
 }
 
diff --git a/database/informix/mode/listdbspaces.pm b/database/informix/mode/listdbspaces.pm
index 9fff39883..e6266b5ac 100644
--- a/database/informix/mode/listdbspaces.pm
+++ b/database/informix/mode/listdbspaces.pm
@@ -71,6 +71,7 @@ SELECT name FROM sysdbspaces ORDER BY name
     $self->{list_dbspaces} = [];
     while ((my $row = $self->{sql}->fetchrow_hashref())) {
         if (defined($self->{option_results}->{exclude}) && $row->{name} !~ /$self->{option_results}->{exclude}/) {
+            $self->{output}->output_add(long_msg => "Skipping dbspace '" . centreon::plugins::misc::trim($row->{name}) . "': no matching filter name");
             next;
         }
         push @{$self->{list_dbspaces}}, centreon::plugins::misc::trim($row->{name});
@@ -84,10 +85,13 @@ sub run {
 
     $self->manage_selection();
     
+    foreach my $name (sort @{$self->{list_dbspaces}}) {
+        $self->{output}->output_add(long_msg => "'" . $name . "'");
+    }
     $self->{output}->output_add(severity => 'OK',
-                                short_msg => "List of dbspaces: " . join(', ', @{$self->{list_dbspaces}}));
+                                short_msg => "List of dbspaces:");
 
-    $self->{output}->display();
+    $self->{output}->display(nolabel => 1, force_ignore_perfdata => 1, force_long_output => 1);
     $self->{output}->exit();
 }
 
diff --git a/database/mssql/mode/blockedprocesses.pm b/database/mssql/mode/blockedprocesses.pm
new file mode 100644
index 000000000..f2466261e
--- /dev/null
+++ b/database/mssql/mode/blockedprocesses.pm
@@ -0,0 +1,116 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Stephane Duret 
+#
+####################################################################################
+
+package database::mssql::mode::blockedprocesses;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+use Time::HiRes;
+use POSIX;
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+                                { 
+                                  "warning:s"               => { name => 'warning', },
+                                  "critical:s"              => { name => 'critical', },
+                                });
+
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+
+    if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{option_results}->{warning})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'.");
+       $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'.");
+       $self->{output}->option_exit();
+    }
+}
+
+sub run {
+    my ($self, %options) = @_;
+    # $options{sql} = sqlmode object
+    $self->{sql} = $options{sql};
+
+    $self->{sql}->connect();
+    $self->{sql}->query(query => q{SELECT count(*) FROM master.dbo.sysprocesses WHERE blocked <> '0'});
+    my $blocked = $self->{sql}->fetchrow_array();
+
+    my $exit_code = $self->{perfdata}->threshold_check(value => $blocked, threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
+    $self->{output}->output_add(severity => $exit_code,
+                                  short_msg => sprintf("%i Blocked process(es).", $blocked));
+    $self->{output}->perfdata_add(label => 'blocked_processes',
+                                  value => $blocked,
+                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
+                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'),
+                                  min => 0);
+
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check MSSQL blocked processes.
+
+=over 8
+
+=item B<--warning>
+
+Threshold warning.
+
+=item B<--critical>
+
+Threshold critical.
+
+=back
+
+=cut
diff --git a/database/mssql/mode/cachehitratio.pm b/database/mssql/mode/cachehitratio.pm
new file mode 100644
index 000000000..500b8c0c8
--- /dev/null
+++ b/database/mssql/mode/cachehitratio.pm
@@ -0,0 +1,131 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Stephane Duret 
+#
+####################################################################################
+
+package database::mssql::mode::cachehitratio;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+use Time::HiRes;
+use POSIX;
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+                                { 
+                                  "warning:s"               => { name => 'warning', },
+                                  "critical:s"              => { name => 'critical', },
+                                });
+
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+
+    if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{option_results}->{warning})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'.");
+       $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'.");
+       $self->{output}->option_exit();
+    }
+}
+
+sub run {
+    my ($self, %options) = @_;
+    # $options{sql} = sqlmode object
+    $self->{sql} = $options{sql};
+
+    $self->{sql}->connect();
+    $self->{sql}->query(query => q{
+        SELECT CAST(
+            (
+                SELECT CAST (cntr_value AS BIGINT)
+                FROM sys.dm_os_performance_counters  
+                WHERE counter_name = 'Buffer cache hit ratio'
+            )* 100.00
+            /
+            (
+                SELECT CAST (cntr_value AS BIGINT)
+                FROM sys.dm_os_performance_counters  
+                WHERE counter_name = 'Buffer cache hit ratio base'
+            ) AS NUMERIC(6,3)
+        )
+    });
+    my $hitratio = $self->{sql}->fetchrow_array();
+
+    my $exit_code = $self->{perfdata}->threshold_check(value => $hitratio, threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
+    $self->{output}->output_add(severity => $exit_code,
+                                  short_msg => sprintf("Buffer cache hit ratio is %.2f%%", $hitratio));
+    $self->{output}->perfdata_add(label => 'cache_hitratio',
+                                  value => $hitratio,
+                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
+                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'),
+                                  min => 0,
+                                  max => 100);
+
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check MSSQL buffer cache hit ratio.
+
+=over 8
+
+=item B<--warning>
+
+Threshold warning.
+
+=item B<--critical>
+
+Threshold critical.
+
+=back
+
+=cut
diff --git a/database/mssql/mode/connectedusers.pm b/database/mssql/mode/connectedusers.pm
new file mode 100644
index 000000000..dba6fa36a
--- /dev/null
+++ b/database/mssql/mode/connectedusers.pm
@@ -0,0 +1,116 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Stephane Duret 
+#
+####################################################################################
+
+package database::mssql::mode::connectedusers;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+use Time::HiRes;
+use POSIX;
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+                                { 
+                                  "warning:s"               => { name => 'warning', },
+                                  "critical:s"              => { name => 'critical', },
+                                });
+
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+
+    if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{option_results}->{warning})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'.");
+       $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'.");
+       $self->{output}->option_exit();
+    }
+}
+
+sub run {
+    my ($self, %options) = @_;
+    # $options{sql} = sqlmode object
+    $self->{sql} = $options{sql};
+
+    $self->{sql}->connect();
+    $self->{sql}->query(query => q{SELECT count(*) FROM master..sysprocesses WHERE spid >= '51'});
+    my $users = $self->{sql}->fetchrow_array();
+
+    my $exit_code = $self->{perfdata}->threshold_check(value => $users, threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
+    $self->{output}->output_add(severity => $exit_code,
+                                  short_msg => sprintf("%i Connected user(s).", $users));
+    $self->{output}->perfdata_add(label => 'connected_users',
+                                  value => $users,
+                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
+                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'),
+                                  min => 0);
+
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check MSSQL connected users.
+
+=over 8
+
+=item B<--warning>
+
+Threshold warning.
+
+=item B<--critical>
+
+Threshold critical.
+
+=back
+
+=cut
diff --git a/database/mssql/mode/connectiontime.pm b/database/mssql/mode/connectiontime.pm
new file mode 100644
index 000000000..dd8abd016
--- /dev/null
+++ b/database/mssql/mode/connectiontime.pm
@@ -0,0 +1,123 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Kevin Duret 
+#
+####################################################################################
+
+package database::mssql::mode::connectiontime;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+use Time::HiRes;
+use POSIX;
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+                                { 
+                                  "warning:s"               => { name => 'warning', },
+                                  "critical:s"              => { name => 'critical', },
+                                });
+
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+
+    if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{option_results}->{warning})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'.");
+       $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'.");
+       $self->{output}->option_exit();
+    }
+}
+
+sub run {
+    my ($self, %options) = @_;
+    # $options{sql} = sqlmode object
+    $self->{sql} = $options{sql};
+
+    my $now = Time::HiRes::time();
+    my ($exit, $msg_error) = $self->{sql}->connect(dontquit => 1);
+    my $now2 = Time::HiRes::time();    
+ 
+    if ($exit == -1) {
+        $self->{output}->output_add(severity => 'CRITICAL',
+                                    short_msg => $msg_error);
+    } else {
+        my $milliseconds = $now2 - $now;
+        $milliseconds = floor($milliseconds * 1000);
+        my $exit_code = $self->{perfdata}->threshold_check(value => $milliseconds, threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
+        $self->{output}->output_add(severity => $exit_code,
+                                    short_msg => sprintf("Connection established in %.3fs.", $milliseconds / 1000));
+        $self->{output}->perfdata_add(label => 'connection_time', unit => 'ms',
+                                      value => $milliseconds,
+                                      warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
+                                      critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'),
+                                      min => 0);
+    }
+    
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check MSSQL connection time.
+
+=over 8
+
+=item B<--warning>
+
+Threshold warning in milliseconds.
+
+=item B<--critical>
+
+Threshold critical in milliseconds.
+
+=back
+
+=cut
diff --git a/database/mssql/mode/lockswaits.pm b/database/mssql/mode/lockswaits.pm
new file mode 100644
index 000000000..70ce1d1d5
--- /dev/null
+++ b/database/mssql/mode/lockswaits.pm
@@ -0,0 +1,142 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Kevin Duret 
+#
+####################################################################################
+
+package database::mssql::mode::lockswaits;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+                                { 
+                                  "warning:s"               => { name => 'warning', },
+                                  "critical:s"              => { name => 'critical', },
+                                  "filter:s"                => { name => 'filter', },
+                                });
+
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+
+    if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{option_results}->{warning})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'.");
+       $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'.");
+       $self->{output}->option_exit();
+    }
+}
+
+sub run {
+    my ($self, %options) = @_;
+    # $options{sql} = sqlmode object
+    $self->{sql} = $options{sql};
+    
+    $self->{sql}->connect();
+    my $query = "SELECT 
+                    cntr_value
+                FROM
+                    sys.dm_os_performance_counters
+                WHERE
+                    object_name = 'SQLServer:Locks'
+                AND
+                    counter_name = 'Lock Waits/sec%'
+                ";
+    
+    $self->{sql}->query(query => $query);
+    my $result = $self->{sql}->fetchall_arrayref();
+
+    my $locks = 0;
+
+    $self->{output}->output_add(severity => 'OK',
+                                short_msg => "0 Locks Waits/sec.");
+    foreach my $row (@$result) {
+        print $$row[0];
+        next if (defined($self->{option_results}->{filter}) && 
+                 $$row[0] !~ /$self->{option_results}->{filter}/);
+        $locks++;
+    }
+    my $exit_code = $self->{perfdata}->threshold_check(value => $locks, threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
+    $self->{output}->output_add(long_msg => sprintf( "%i Locks Waits/sec.", $locks));
+    if (!$self->{output}->is_status(value => $exit_code, compare => 'ok', litteral => 1)) {
+        $self->{output}->output_add(severity => $exit_code,
+                                    short_msg => sprintf("%i Locks Waits/sec.", $locks));
+    }
+    $self->{output}->perfdata_add(label => 'locks_waits_per_sec',
+                                  value => $locks,
+                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
+                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'),
+                                  min => 0);
+    
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check MySQL databases size.
+
+=over 8
+
+=item B<--warning>
+
+Threshold warning in bytes.
+
+=item B<--critical>
+
+Threshold critical in bytes.
+
+=item B<--filter>
+
+Filter database to checks.
+
+=back
+
+=cut
diff --git a/database/mssql/mode/transactions.pm b/database/mssql/mode/transactions.pm
new file mode 100644
index 000000000..e62f41b3f
--- /dev/null
+++ b/database/mssql/mode/transactions.pm
@@ -0,0 +1,123 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Stephane Duret 
+#
+####################################################################################
+
+package database::mssql::mode::transactions;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+use Time::HiRes;
+use POSIX;
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+                                { 
+                                  "warning:s"               => { name => 'warning', },
+                                  "critical:s"              => { name => 'critical', },
+                                });
+
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+
+    if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{option_results}->{warning})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'.");
+       $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'.");
+       $self->{output}->option_exit();
+    }
+}
+
+sub run {
+    my ($self, %options) = @_;
+    # $options{sql} = sqlmode object
+    $self->{sql} = $options{sql};
+
+    $self->{sql}->connect();
+    $self->{sql}->query(query => q{SELECT cntr_value FROM sys.dm_os_performance_counters WHERE counter_name = 'transactions/sec' AND instance_name = '_Total'});
+    my $transaction1 = $self->{sql}->fetchrow_array();
+
+    sleep 1;
+
+    $self->{sql}->query(query => q{SELECT cntr_value FROM sys.dm_os_performance_counters WHERE counter_name = 'transactions/sec' AND instance_name = '_Total'});
+    my $transaction2 = $self->{sql}->fetchrow_array();
+
+    my $transactions = $transaction2 - $transaction1 ;
+
+    my $exit_code = $self->{perfdata}->threshold_check(value => $transactions, threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
+    $self->{output}->output_add(severity => $exit_code,
+                                  short_msg => sprintf("%i transaction(s) per second.", $transactions));
+    $self->{output}->perfdata_add(label => 'transactions_per_second',
+                                  value => $transactions,
+                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
+                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'),
+                                  min => 0);
+
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check MSSQL transactions per second.
+
+=over 8
+
+=item B<--warning>
+
+Threshold warning.
+
+=item B<--critical>
+
+Threshold critical.
+
+=back
+
+=cut
diff --git a/database/mssql/plugin.pm b/database/mssql/plugin.pm
new file mode 100644
index 000000000..1bfcd8f2d
--- /dev/null
+++ b/database/mssql/plugin.pm
@@ -0,0 +1,113 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package database::mssql::plugin;
+
+use strict;
+use warnings;
+use base qw(centreon::plugins::script_sql);
+
+sub new {
+    my ($class, %options) = @_;
+    
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    # $options->{options} = options object
+
+    $self->{version} = '0.1';
+    %{$self->{modes}} = (
+                         'availability-group-states'    => 'database::mssql::mode::availabilitygroupstates',
+                         'blocked-processes'            => 'database::mssql::mode::blockedprocesses',
+                         'cache-hitratio'               => 'database::mssql::mode::cachehitratio',
+                         'connected-users'              => 'database::mssql::mode::connectedusers',
+                         'connection-time'              => 'database::mssql::mode::connectiontime',
+                         'database-size'                => 'database::mssql::mode::databasesize',
+                         'locks-waits'                  => 'database::mssql::mode::lockswaits',
+                         'transactions'                 => 'database::mssql::mode::transactions',
+                         );
+
+    return $self;
+}
+
+sub init {
+    my ($self, %options) = @_;
+
+    $self->{options}->add_options(
+                                   arguments => {
+                                                'host:s@'       => { name => 'db_host' },
+                                                'port:s@'       => { name => 'db_port' },
+                                                'database:s'    => { name => 'database' },
+                                                }
+                                  );
+    $self->{options}->parse_options();
+    my $options_result = $self->{options}->get_options();
+    $self->{options}->clean();
+
+    if (defined($options_result->{db_host})) {
+        @{$self->{sqldefault}->{dbi}} = ();
+        for (my $i = 0; $i < scalar(@{$options_result->{db_host}}); $i++) {
+            $self->{sqldefault}->{dbi}[$i] = { data_source => 'Sybase:host=' . $options_result->{db_host}[$i] };
+            if (defined($options_result->{db_port}[$i])) {
+                $self->{sqldefault}->{dbi}[$i]->{data_source} .= ';port=' . $options_result->{db_port}[$i];
+            }
+            if ((defined($options_result->{database})) && ($options_result->{database} ne '')) {
+                $self->{sqldefault}->{dbi}[$i]->{data_source} .= ';database=' . $options_result->{database};
+            }
+        }
+    }
+    $self->SUPER::init(%options);    
+}
+
+1;
+
+__END__
+
+=head1 PLUGIN DESCRIPTION
+
+Check MSSQL Server.
+
+=over 8
+
+=item B<--host>
+
+Hostname to query.
+
+=item B<--port>
+
+Database Server Port.
+
+=back
+
+=cut
diff --git a/database/mysql/mode/innodbbufferpoolhitrate.pm b/database/mysql/mode/innodbbufferpoolhitrate.pm
index 62cfd9d2d..57dd9550c 100644
--- a/database/mysql/mode/innodbbufferpoolhitrate.pm
+++ b/database/mysql/mode/innodbbufferpoolhitrate.pm
@@ -108,8 +108,7 @@ sub run {
     if (defined($old_read_request) && defined($old_read) &&
         $new_datas->{Innodb_buffer_pool_read_requests} >= $old_read_request &&
         $new_datas->{Innodb_buffer_pool_reads} >= $old_read) {
-        
-        
+             
         my %prcts = ();
         my $total_read_requests = $new_datas->{Innodb_buffer_pool_read_requests} - $old_read_request;
         my $total_read_disk = $new_datas->{Innodb_buffer_pool_reads} - $old_read;
diff --git a/database/mysql/mode/openfiles.pm b/database/mysql/mode/openfiles.pm
index f13cc88ce..089b8b7ab 100644
--- a/database/mysql/mode/openfiles.pm
+++ b/database/mysql/mode/openfiles.pm
@@ -85,7 +85,7 @@ sub run {
     $self->{sql}->query(query => q{SHOW VARIABLES LIKE 'open_files_limit'});
     my ($dummy, $open_files_limit) = $self->{sql}->fetchrow_array();
     if (!defined($open_files_limit)) {
-        $self->{output}->add_option_msg(short_msg => "Cannot get ope files limit.");
+        $self->{output}->add_option_msg(short_msg => "Cannot get open files limit.");
         $self->{output}->option_exit();
     }
     $self->{sql}->query(query => q{SHOW /*!50000 global */ STATUS LIKE 'Open_files'});
diff --git a/database/mysql/mode/qcachehitrate.pm b/database/mysql/mode/qcachehitrate.pm
new file mode 100644
index 000000000..e37d427c3
--- /dev/null
+++ b/database/mysql/mode/qcachehitrate.pm
@@ -0,0 +1,183 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package database::mysql::mode::qcachehitrate;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+use centreon::plugins::statefile;
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+                                { 
+                                  "warning:s"               => { name => 'warning', },
+                                  "critical:s"              => { name => 'critical', },
+                                  "lookback"                => { name => 'lookback', },
+                                });
+    $self->{statefile_cache} = centreon::plugins::statefile->new(%options);
+
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+
+    if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{option_results}->{warning})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'.");
+       $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'.");
+       $self->{output}->option_exit();
+    }
+
+    $self->{statefile_cache}->check_options(%options);
+}
+
+sub run {
+    my ($self, %options) = @_;
+    # $options{sql} = sqlmode object
+    $self->{sql} = $options{sql};
+
+    $self->{sql}->connect();
+    
+    if (!($self->{sql}->is_version_minimum(version => '5'))) {
+        $self->{output}->add_option_msg(short_msg => "MySQL version '" . $self->{sql}->{version} . "' is not supported (need version >= '5.x').");
+        $self->{output}->option_exit();
+    }
+    
+    $self->{sql}->query(query => q{SHOW /*!50000 global */ STATUS WHERE Variable_name IN ('Com_select', 'Qcache_hits')});
+    my $new_datas = {Com_select => undef, Qcache_hits => undef};
+    my $result = $self->{sql}->fetchall_arrayref();
+    foreach my $row (@{$result}) {
+        $new_datas->{$$row[0]} = $$row[1];
+    }
+    foreach (keys %$new_datas) {
+        if (!defined($new_datas->{$_})) {
+            $self->{output}->add_option_msg(short_msg => "Cannot get '$_' variable.");
+            $self->{output}->option_exit();
+        }
+    }
+    $self->{sql}->query(query => q{SHOW VARIABLES WHERE Variable_name IN ('have_query_cache', 'query_cache_size')});
+    my ($dummy, $have_query_cache) = $self->{sql}->fetchrow_array();
+    if (!defined($have_query_cache)) {
+        $self->{output}->add_option_msg(short_msg => "Cannot get have_query_cache variable.");
+        $self->{output}->option_exit();
+    }
+    ($dummy, my $query_cache_size) = $self->{sql}->fetchrow_array();
+    if (!defined($query_cache_size)) {
+        $self->{output}->add_option_msg(short_msg => "Cannot get query_cache_size variable.");
+        $self->{output}->option_exit();
+    }
+    if ($have_query_cache !~ /^yes$/i || $query_cache_size == 0) {
+        $self->{output}->output_add(severity => 'OK',
+                                    short_msg => "Query cache is turned off.");
+        $self->{output}->display();
+        $self->{output}->exit();
+    }
+
+    $self->{statefile_cache}->read(statefile => 'mysql_' . $self->{mode} . '_' . $self->{sql}->get_unique_id4save());
+    my $old_timestamp = $self->{statefile_cache}->get(name => 'last_timestamp');
+    $new_datas->{last_timestamp} = time();
+
+    my $old_com_select = $self->{statefile_cache}->get(name => 'Com_select');
+    my $old_qcache_hits = $self->{statefile_cache}->get(name => 'Qcache_hits');
+    if (defined($old_com_select) && defined($old_qcache_hits) &&
+        $new_datas->{Com_select} >= $old_com_select &&
+        $new_datas->{Qcache_hits} >= $old_qcache_hits) {
+   
+        my %prcts = ();
+        my $total_select_requests = ($new_datas->{Com_select} - $old_com_select) + ($new_datas->{Qcache_hits} - $old_qcache_hits);
+        my $total_hits = $new_datas->{Qcache_hits} - $old_qcache_hits;
+        $prcts{qcache_hitrate_now} = ($total_select_requests == 0) ? 100 : ($total_hits) * 100 / $total_select_requests;
+        $prcts{qcache_hitrate} = (($new_datas->{Qcache_hits} + $new_datas->{Com_select}) == 0) ? 100 : ($new_datas->{Qcache_hits}) * 100 / ($new_datas->{Qcache_hits} + $new_datas->{Com_select});
+        
+        my $exit_code = $self->{perfdata}->threshold_check(value => $prcts{'qcache_hitrate' . ((defined($self->{option_results}->{lookback})) ? '' : '_now' )}, threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
+        $self->{output}->output_add(severity => $exit_code,
+                                    short_msg => sprintf("query cache hitrate at %.2f%%", $prcts{'qcache_hitrate' . ((defined($self->{option_results}->{lookback})) ? '' : '_now')})
+                                    );
+        $self->{output}->perfdata_add(label => 'qcache_hitrate' . ((defined($self->{option_results}->{lookback})) ? '' : '_now'), unit => '%',
+                                      value => sprintf("%.2f", $prcts{'qcache_hitrate' . ((defined($self->{option_results}->{lookback})) ? '' : '_now')}),
+                                      warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
+                                      critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'),
+                                      min => 0);
+        $self->{output}->perfdata_add(label => 'qcache_hitrate' . ((defined($self->{option_results}->{lookback})) ? '_now' : ''), unit => '%',
+                                      value => sprintf("%.2f", $prcts{'qcache_hitrate' . ((defined($self->{option_results}->{lookback})) ? '_now' : '')}),
+                                      min => 0);
+    }
+    
+    $self->{statefile_cache}->write(data => $new_datas); 
+    if (!defined($old_timestamp)) {
+        $self->{output}->output_add(severity => 'OK',
+                                    short_msg => "Buffer creation...");
+    }
+    
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check hitrate in the Query Cache.
+
+=over 8
+
+=item B<--warning>
+
+Threshold warning.
+
+=item B<--critical>
+
+Threshold critical.
+
+=item B<--lookback>
+
+Threshold isn't on the percent calculated from the difference ('qcache_hitrate_now').
+
+=back
+
+=cut
diff --git a/database/mysql/mode/replicationmastermaster.pm b/database/mysql/mode/replicationmastermaster.pm
new file mode 100644
index 000000000..9659c8358
--- /dev/null
+++ b/database/mysql/mode/replicationmastermaster.pm
@@ -0,0 +1,286 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package database::mysql::mode::replicationmastermaster;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+                                { 
+                                  "warning:s"               => { name => 'warning', },
+                                  "critical:s"              => { name => 'critical', },
+                                });
+
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+
+    if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{option_results}->{warning})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'.");
+       $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'.");
+       $self->{output}->option_exit();
+    }
+}
+
+sub check_replication {
+    my ($self, %options) = @_;
+    
+    my ($master, $slave) = ($options{master}, $options{slave});
+    
+    my ($slave_status, $slave_status_error) = (0, "");
+    my ($position_status, $position_status_error) = (0, "");
+    
+    my ($total_srv, $last_error);
+
+    my ($io_thread_status_srv, $sql_thread_status_srv);
+    if ($self->{$slave->get_id()}->{exit} != -1) {
+        $slave->query(query => q{
+            SHOW SLAVE STATUS
+        });
+        my $result = $slave->fetchrow_hashref();
+        my $slave_io_running = $result->{Slave_IO_Running};
+        my $slave_sql_running = $result->{Slave_SQL_Running};
+        $last_error = $result->{Last_Error};
+        
+        if (defined($slave_io_running) && $slave_io_running =~ /^yes$/i) {
+            $io_thread_status_srv = 0;
+        } else {
+            $io_thread_status_srv = 1;
+        }
+        if (defined($slave_sql_running) && $slave_sql_running =~ /^yes$/i) {
+            $sql_thread_status_srv = 0;
+        } else {
+            $sql_thread_status_srv = 1;
+        }
+    } else {
+        $io_thread_status_srv = 100;
+        $sql_thread_status_srv = 100;
+    }
+
+    $total_srv = $io_thread_status_srv + $sql_thread_status_srv;
+    
+    # Check if a thread is down
+    if ($total_srv == 1) {
+        $slave_status = -1;
+        $slave_status_error = "A Replication thread is down on '" . $slave->get_id() . "'.";
+        if ($sql_thread_status_srv != 0) {
+            if (defined($last_error) && $last_error ne "") {
+                $slave_status = 1;
+                $slave_status_error .= " SQL Thread is stopped because of an error (error='" . $last_error . "').";
+            }
+        }
+    }
+    
+    # Check if we need to SKIP
+    if ($io_thread_status_srv == 100) {
+        $slave_status = -1;
+        $slave_status_error .= " Skip check on '" . $slave->get_id() . "'.";
+    }
+
+    if ($total_srv > 1) {
+        $slave_status = 1;
+        $slave_status_error .= " not a slave '"  . $slave->get_id() . "' (maybe because we cannot check the server).";
+    }
+    
+    ####
+    # Check Slave position
+    ####    
+    if ($self->{$master->get_id()}->{exit} == -1) {
+        $position_status = -1;
+        $position_status_error = "Can't get master position on '" . $master->get_id() . "'.";
+    } else {
+        # Get Master Position
+        $master->query(query => q{
+            SHOW MASTER STATUS
+        });
+        my $result = $master->fetchrow_hashref();
+        my $master_file = $result->{File};
+        my $master_position = $result->{Position};
+        
+        $slave->query(query => q{
+            SHOW SLAVE STATUS
+        });
+        my $result2 = $slave->fetchrow_hashref();
+        my $slave_file = $result2->{Master_Log_File}; # 'Master_Log_File'
+        my $slave_position = $result2->{Read_Master_Log_Pos}; # 'Read_Master_Log_Pos'
+        my $num_sec_lates = $result2->{Seconds_Behind_Master};
+
+        my $exit_code_sec = $self->{perfdata}->threshold_check(value => $num_sec_lates, threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
+        if (!$self->{output}->is_status(value => $exit_code_sec, compare => 'ok', litteral => 1)) {
+            $self->{output}->output_add(severity => $exit_code_sec,
+                                        short_msg => sprintf("Slave '%s' has %d seconds latency behind master", $slave->get_id(), $num_sec_lates));
+        }
+        $self->{output}->perfdata_add(label => 'slave_latency_' . $slave->get_id(), unit => 's',
+                                      value => $num_sec_lates,
+                                      warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
+                                      critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'),
+                                      min => 0);
+        
+        my $slave_sql_thread_ko = 1;
+        my $slave_sql_thread_warning = 1;
+        my $slave_sql_thread_ok = 1;
+        
+        $slave->query(query => q{
+            SHOW FULL PROCESSLIST
+        });
+        while ((my $row = $slave->fetchrow_hashref())) {
+            my $state = $row->{State};
+            $slave_sql_thread_ko = 0 if (defined($state) && $state =~ /^(Waiting to reconnect after a failed binlog dump request|Connecting to master|Reconnecting after a failed binlog dump request|Waiting to reconnect after a failed master event read|Waiting for the slave SQL thread to free enough relay log space)$/i);
+            $slave_sql_thread_warning = 0 if (defined($state) && $state =~ /^Waiting for the next event in relay log|Reading event from the relay log$/i);
+            $slave_sql_thread_ok = 0 if (defined($state) && $state =~ /^Has read all relay log; waiting for the slave I\/O thread to update it$/i);
+        }
+        
+        if ($slave_sql_thread_ko == 0) {
+            $position_status = 1;
+            $position_status_error .= " Slave replication has connection issue with the master.";
+        } elsif (($master_file ne $slave_file || $master_position != $slave_position) && $slave_sql_thread_warning == 0) {
+            $position_status = -1;
+            $position_status_error .= " Slave replication is late but it's progressing..";
+        } elsif (($master_file ne $slave_file || $master_position != $slave_position) && $slave_sql_thread_ok == 0) {
+            $position_status = -1;
+            $position_status_error .= " Slave replication is late but it's progressing..";
+        }
+    }
+
+    $self->replication_add($slave_status, "Slave Thread Status '" . $slave->get_id() . "'", $slave_status_error);
+	$self->replication_add($position_status, "Position Status '" . $slave->get_id() . "'", $position_status_error);
+}
+
+sub run {
+    my ($self, %options) = @_;
+    # $options{sql} = sqlmode object
+    
+    if (ref($options{sql}) ne 'ARRAY') {
+        $self->{output}->add_option_msg(short_msg => "Need to use --multiple options.");
+        $self->{output}->option_exit();
+    }
+    if (scalar(@{$options{sql}}) < 2) {
+        $self->{output}->add_option_msg(short_msg => "Need to specify two MySQL Server.");
+        $self->{output}->option_exit();
+    }
+
+    my ($msg_error1, $msg_error2);
+    my ($sql_one, $sql_two) = @{$options{sql}};
+    
+    ($self->{$sql_one->get_id()}->{exit}, $msg_error1) = $sql_one->connect(dontquit => 1);
+    ($self->{$sql_two->get_id()}->{exit}, $msg_error2) = $sql_two->connect(dontquit => 1);
+    $self->{output}->output_add(severity => 'OK',
+                                short_msg => "No problems. Replication is ok.");
+    if ($self->{$sql_one->get_id()}->{exit} == -1) {
+        $self->{output}->output_add(severity => 'CRITICAL',
+                                    short_msg => "Connection Status '" . $sql_one->get_id() . "': " . $msg_error1);
+    } else {
+        $self->{output}->output_add(long_msg => "Connection Status '" . $sql_one->get_id() . "' [OK]");
+    }
+    if ($self->{$sql_two->get_id()}->{exit} == -1) {
+        $self->{output}->output_add(severity => 'CRITICAL',
+                                    short_msg => "Connection Status '" . $sql_two->get_id() . "': " . $msg_error2);
+    } else {
+        $self->{output}->output_add(long_msg => "Connection Status '" . $sql_two->get_id() . "' [OK]");
+    }
+    
+    $self->check_replication(master => $sql_one, slave => $sql_two);
+    $self->check_replication(master => $sql_two, slave => $sql_one);
+    
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+sub replication_add {
+	my ($self, $lstate, $str_display, $lerr) = @_;
+	my $status;
+    my $status_msg;
+
+	if ($lstate == 0) {
+		$status = 'OK';
+	} elsif ($lstate == -1) {
+		$status = 'WARNING';
+	} elsif ($lstate == -2) {
+		$status = 'CRITICAL';
+        $status_msg = 'SKIP';
+	} else {
+		$status = 'CRITICAL';
+	}
+
+    my $output;
+	if (defined($lerr) && $lerr ne "") {
+		$output = $str_display . " [" . (defined($status_msg) ? $status_msg : $status) . "] [" . $lerr . "]";
+	} else {
+		$output = $str_display . " [" . (defined($status_msg) ? $status_msg : $status) . "]";
+	}
+    if (!$self->{output}->is_status(value => $status, compare => 'ok', litteral => 1)) {
+        $self->{output}->output_add(severity => $status,
+                                    short_msg => $output);
+    }
+    
+	$self->{output}->output_add(long_msg => $output);
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check MySQL replication master/master (need to use --multiple).
+
+=over 8
+
+=item B<--warning>
+
+Threshold warning in seconds (slave latency).
+
+=item B<--critical>
+
+Threshold critical in seconds (slave latency).
+
+=back
+
+=cut
diff --git a/database/mysql/plugin.pm b/database/mysql/plugin.pm
index 8ca7976c5..d8293dbcf 100644
--- a/database/mysql/plugin.pm
+++ b/database/mysql/plugin.pm
@@ -48,16 +48,18 @@ sub new {
 
     $self->{version} = '0.1';
     %{$self->{modes}} = (
-                         'connection-time' => 'database::mysql::mode::connectiontime',
-                         'databases-size' => 'database::mysql::mode::databasessize',
-                         'queries' => 'database::mysql::mode::queries',
-                         'slow-queries' => 'database::mysql::mode::slowqueries',
-                         'threads-connected' => 'database::mysql::mode::threadsconnected',
-                         'uptime' => 'database::mysql::mode::uptime',
-                         'open-files' => 'database::mysql::mode::openfiles',
-                         'innodb-bufferpool-hitrate' => 'database::mysql::mode::innodbbufferpoolhitrate',
-                         'myisam-keycache-hitrate' => 'database::mysql::mode::myisamkeycachehitrate',
-                         'replication-master-slave' => 'database::mysql::mode::replicationmasterslave',
+                         'connection-time'              => 'database::mysql::mode::connectiontime',
+                         'databases-size'               => 'database::mysql::mode::databasessize',
+                         'queries'                      => 'database::mysql::mode::queries',
+                         'slow-queries'                 => 'database::mysql::mode::slowqueries',
+                         'threads-connected'            => 'database::mysql::mode::threadsconnected',
+                         'uptime'                       => 'database::mysql::mode::uptime',
+                         'open-files'                   => 'database::mysql::mode::openfiles',
+                         'innodb-bufferpool-hitrate'    => 'database::mysql::mode::innodbbufferpoolhitrate',
+                         'myisam-keycache-hitrate'      => 'database::mysql::mode::myisamkeycachehitrate',
+                         'qcache-hitrate'               => 'database::mysql::mode::qcachehitrate',
+                         'replication-master-slave'     => 'database::mysql::mode::replicationmasterslave',
+                         'replication-master-master'    => 'database::mysql::mode::replicationmastermaster',
                          );
     $self->{sql_modes}{mysqlcmd} = 'database::mysql::mysqlcmd';
 
diff --git a/database/postgres/mode/listdatabases.pm b/database/postgres/mode/listdatabases.pm
index 75a44de96..5b0553656 100644
--- a/database/postgres/mode/listdatabases.pm
+++ b/database/postgres/mode/listdatabases.pm
@@ -70,6 +70,7 @@ SELECT datname FROM pg_database
     $self->{list_db} = [];
     while ((my $row = $self->{sql}->fetchrow_hashref())) {
         if (defined($self->{option_results}->{exclude}) && $row->{datname} !~ /$self->{option_results}->{exclude}/) {
+            $self->{output}->output_add(long_msg => "Skipping database '" . $row->{datname} . "': no matching filter name");
             next;
         }
         push @{$self->{list_db}}, $row->{datname};
@@ -83,10 +84,13 @@ sub run {
 
     $self->manage_selection();
     
+    foreach my $name (sort @{$self->{list_db}}) {
+        $self->{output}->output_add(long_msg => "'" . $name . "'");
+    }
     $self->{output}->output_add(severity => 'OK',
-                                short_msg => "List of databases: " . join(', ', @{$self->{list_db}}));
+                                short_msg => "List of databases:");
 
-    $self->{output}->display();
+    $self->{output}->display(nolabel => 1, force_ignore_perfdata => 1, force_long_output => 1);
     $self->{output}->exit();
 }
 
diff --git a/hardware/printers/standard/rfc3805/mode/papertray.pm b/hardware/printers/standard/rfc3805/mode/papertray.pm
index e9c385b7d..0422c36d4 100644
--- a/hardware/printers/standard/rfc3805/mode/papertray.pm
+++ b/hardware/printers/standard/rfc3805/mode/papertray.pm
@@ -53,8 +53,9 @@ sub new {
     $self->{version} = '1.0';
     $options{options}->add_options(arguments =>
                                 {
-                                  "warning:s"   => { name => 'warning' },
-                                  "critical:s"  => { name => 'critical' },
+                                  "warning:s"       => { name => 'warning' },
+                                  "critical:s"      => { name => 'critical' },
+                                  "filter-tray:s"   => { name => 'filter_tray' },
                                 });
 
     return $self;
@@ -106,6 +107,12 @@ sub run {
             $descr = $hrDeviceIndex . '#' . $prtInputIndex;
         }
         
+        if (defined($self->{option_results}->{filter_tray}) && $self->{option_results}->{filter_tray} ne '' &&
+            $descr !~ /$self->{option_results}->{filter_tray}/) {
+            $self->{output}->output_add(long_msg => "Skipping tray '$descr': not matching filter."); 
+            next;
+        }
+
         if (!defined($unit_managed{$unit})) {
             $self->{output}->output_add(long_msg => "Skipping input '$descr': unit not managed."); 
             next;
@@ -114,7 +121,7 @@ sub run {
             $self->{output}->output_add(long_msg => "Skipping tray '$descr': no level."); 
             next;
         } elsif ($current_value == -2) {
-            $self->{output}->output_add(long_msg => "Skippinp tray'$descr': level unknown."); 
+            $self->{output}->output_add(long_msg => "Skippinp tray '$descr': level unknown."); 
             next;
         } elsif ($current_value == -3) {
             $self->{output}->output_add(long_msg => "Tray '$descr': no level but some space remaining."); 
@@ -161,6 +168,10 @@ Threshold warning in percent.
 
 Threshold critical in percent.
 
+=item B<--filter-tray>
+
+Filter tray to check (can use a regexp).
+
 =back
 
 =cut
diff --git a/hardware/sensors/sequoia/em01/web/mode/contact.pm b/hardware/sensors/sequoia/em01/web/mode/contact.pm
new file mode 100644
index 000000000..b5f3afdb1
--- /dev/null
+++ b/hardware/sensors/sequoia/em01/web/mode/contact.pm
@@ -0,0 +1,177 @@
+###############################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an timeelapsedutable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting timeelapsedutable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Author : Simon BOMM 
+#
+# Based on De Bodt Lieven plugin
+####################################################################################
+
+package hardware::sensors::sequoia::em01::web::mode::contact;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+use centreon::plugins::httplib;
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+            {
+            "hostname:s"        => { name => 'hostname' },
+            "port:s"            => { name => 'port', },
+            "proto:s"           => { name => 'proto', default => "http" },
+            "urlpath:s"         => { name => 'url_path', default => "/index.htm?eL" },
+            "credentials"       => { name => 'credentials' },
+            "username:s"        => { name => 'username' },
+            "password:s"        => { name => 'password' },
+            "proxyurl:s"        => { name => 'proxyurl' },
+            "warning"           => { name => 'warning' },
+            "critical"          => { name => 'critical' },
+            "closed"            => { name => 'closed' },
+            "timeout:s"         => { name => 'timeout', default => '3' },
+            });
+    $self->{status} = { closed => 'ok', opened => 'ok' };
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+    
+    my $label = 'opened';
+    $label = 'closed' if (defined($self->{option_results}->{closed}));
+    if (defined($self->{option_results}->{critical})) {
+        $self->{status}->{$label} = 'critical';
+    } elsif (defined($self->{option_results}->{warning})) {
+        $self->{status}->{$label} = 'warning';
+    }
+    
+    if (!defined($self->{option_results}->{hostname})) {
+        $self->{output}->add_option_msg(short_msg => "Please set the hostname option");
+        $self->{output}->option_exit();
+    }
+    if ((defined($self->{option_results}->{credentials})) && (!defined($self->{option_results}->{username}) || !defined($self->{option_results}->{password}))) {
+        $self->{output}->add_option_msg(short_msg => "You need to set --username= and --password= options when --credentials is used");
+        $self->{output}->option_exit();
+    }
+}
+
+sub run {
+    my ($self, %options) = @_;
+        
+    my $webcontent = centreon::plugins::httplib::connect($self);
+    my $contact;
+
+    if ($webcontent !~ /(.*)<\/body>/msi || $1 !~ /([NW]).*?:/) {
+        $self->{output}->add_option_msg(short_msg => "Could not find door contact information.");
+        $self->{output}->option_exit();
+    }
+    $contact = $1;
+
+    if ($contact eq 'N') {
+        $self->{output}->output_add(severity => $self->{status}->{opened},
+                                short_msg => sprintf("Door is opened."));
+    } else {
+        $self->{output}->output_add(severity => $self->{status}->{closed},
+                                short_msg => sprintf("Door is closed."));
+    }
+
+    $self->{output}->display();
+    $self->{output}->exit();
+
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check sensor voltage.
+
+=over 8
+
+=item B<--hostname>
+
+IP Addr/FQDN of the webserver host
+
+=item B<--port>
+
+Port used by Apache
+
+=item B<--proxyurl>
+
+Proxy URL if any
+
+=item B<--proto>
+
+Specify https if needed
+
+=item B<--urlpath>
+
+Set path to get server-status page in auto mode (Default: '/index.htm?eL')
+
+=item B<--credentials>
+
+Specify this option if you access server-status page over basic authentification
+
+=item B<--username>
+
+Specify username for basic authentification (Mandatory if --credentials is specidied)
+
+=item B<--password>
+
+Specify password for basic authentification (Mandatory if --credentials is specidied)
+
+=item B<--timeout>
+
+Threshold for HTTP timeout
+
+=item B<--warning>
+
+Warning if door is opened (can set --close for closed door)
+
+=item B<--critical>
+
+Critical if door is opened (can set --close for closed door)
+
+=item B<--closed>
+
+Threshold is on closed door (default: opened)
+
+=back
+
+=cut
diff --git a/hardware/sensors/sequoia/em01/web/mode/flood.pm b/hardware/sensors/sequoia/em01/web/mode/flood.pm
new file mode 100644
index 000000000..2ea40f5a4
--- /dev/null
+++ b/hardware/sensors/sequoia/em01/web/mode/flood.pm
@@ -0,0 +1,177 @@
+###############################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an timeelapsedutable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting timeelapsedutable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Author : Simon BOMM 
+#
+# Based on De Bodt Lieven plugin
+####################################################################################
+
+package hardware::sensors::sequoia::em01::web::mode::flood;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+use centreon::plugins::httplib;
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+            {
+            "hostname:s"        => { name => 'hostname' },
+            "port:s"            => { name => 'port', },
+            "proto:s"           => { name => 'proto', default => "http" },
+            "urlpath:s"         => { name => 'url_path', default => "/" },
+            "credentials"       => { name => 'credentials' },
+            "username:s"        => { name => 'username' },
+            "password:s"        => { name => 'password' },
+            "proxyurl:s"        => { name => 'proxyurl' },
+            "warning"           => { name => 'warning' },
+            "critical"          => { name => 'critical' },
+            "dry"               => { name => 'dry' },
+            "timeout:s"         => { name => 'timeout', default => '3' },
+            });
+    $self->{status} = { dry => 'ok', wet => 'ok' };
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+    
+    my $label = 'wet';
+    $label = 'dry' if (defined($self->{option_results}->{dry}));
+    if (defined($self->{option_results}->{critical})) {
+        $self->{status}->{$label} = 'critical';
+    } elsif (defined($self->{option_results}->{warning})) {
+        $self->{status}->{$label} = 'warning';
+    }
+    
+    if (!defined($self->{option_results}->{hostname})) {
+        $self->{output}->add_option_msg(short_msg => "Please set the hostname option");
+        $self->{output}->option_exit();
+    }
+    if ((defined($self->{option_results}->{credentials})) && (!defined($self->{option_results}->{username}) || !defined($self->{option_results}->{password}))) {
+        $self->{output}->add_option_msg(short_msg => "You need to set --username= and --password= options when --credentials is used");
+        $self->{output}->option_exit();
+    }
+}
+
+sub run {
+    my ($self, %options) = @_;
+        
+    my $webcontent = centreon::plugins::httplib::connect($self);
+    my $flood;
+
+    if ($webcontent !~ /(.*)<\/body>/msi || $1 !~ /(dry|wet)/i) {
+        $self->{output}->add_option_msg(short_msg => "Could not find flood information (need to set good --urlpath option).");
+        $self->{output}->option_exit();
+    }
+    $flood = lc($1);
+
+    if ($flood eq 'dry') {
+        $self->{output}->output_add(severity => $self->{status}->{dry},
+                                    short_msg => sprintf("Flood sensor is dry."));
+    } else {
+        $self->{output}->output_add(severity => $self->{status}->{wet},
+                                short_msg => sprintf("Flood sensor is wet."));
+    }
+
+    $self->{output}->display();
+    $self->{output}->exit();
+
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check sensor flood.
+
+=over 8
+
+=item B<--hostname>
+
+IP Addr/FQDN of the webserver host
+
+=item B<--port>
+
+Port used by Apache
+
+=item B<--proxyurl>
+
+Proxy URL if any
+
+=item B<--proto>
+
+Specify https if needed
+
+=item B<--urlpath>
+
+Set path to get server-status page in auto mode (Default: '/')
+
+=item B<--credentials>
+
+Specify this option if you access server-status page over basic authentification
+
+=item B<--username>
+
+Specify username for basic authentification (Mandatory if --credentials is specidied)
+
+=item B<--password>
+
+Specify password for basic authentification (Mandatory if --credentials is specidied)
+
+=item B<--timeout>
+
+Threshold for HTTP timeout
+
+=item B<--warning>
+
+Warning if flood sensor is wet (can set --dry for dry sensor)
+
+=item B<--critical>
+
+Critical if flood sensor is wet (can set --dry for dry sensor)
+
+=item B<--closed>
+
+Threshold is on dry sensor (default: wet)
+
+=back
+
+=cut
diff --git a/hardware/sensors/sequoia/em01/web/mode/humidity.pm b/hardware/sensors/sequoia/em01/web/mode/humidity.pm
new file mode 100644
index 000000000..ce356d3ac
--- /dev/null
+++ b/hardware/sensors/sequoia/em01/web/mode/humidity.pm
@@ -0,0 +1,174 @@
+###############################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an timeelapsedutable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting timeelapsedutable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Author : Simon BOMM 
+#
+# Based on De Bodt Lieven plugin
+####################################################################################
+
+package hardware::sensors::sequoia::em01::web::mode::humidity;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+use centreon::plugins::httplib;
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+            {
+            "hostname:s"        => { name => 'hostname' },
+            "port:s"            => { name => 'port', },
+            "proto:s"           => { name => 'proto', default => "http" },
+            "urlpath:s"         => { name => 'url_path', default => "/index.htm?em" },
+            "credentials"       => { name => 'credentials' },
+            "username:s"        => { name => 'username' },
+            "password:s"        => { name => 'password' },
+            "proxyurl:s"        => { name => 'proxyurl' },
+            "warning:s"         => { name => 'warning' },
+            "critical:s"        => { name => 'critical' },
+            "timeout:s"         => { name => 'timeout', default => '3' },
+            });
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+
+    if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{option_results}->{warning})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'.");
+        $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'.");
+        $self->{output}->option_exit();
+    }
+    if (!defined($self->{option_results}->{hostname})) {
+        $self->{output}->add_option_msg(short_msg => "Please set the hostname option");
+        $self->{output}->option_exit();
+    }
+    if ((defined($self->{option_results}->{credentials})) && (!defined($self->{option_results}->{username}) || !defined($self->{option_results}->{password}))) {
+        $self->{output}->add_option_msg(short_msg => "You need to set --username= and --password= options when --credentials is used");
+        $self->{output}->option_exit();
+    }
+}
+
+sub run {
+    my ($self, %options) = @_;
+        
+    my $webcontent = centreon::plugins::httplib::connect($self);
+    my $humidity;
+
+    if ($webcontent !~ /(.*)<\/body>/msi || $1 !~ /HU:\s*([0-9\.]+)/i) {
+        $self->{output}->add_option_msg(short_msg => "Could not find humidity information.");
+        $self->{output}->option_exit();
+    }
+    $humidity = $1;
+    $humidity = '0' . $humidity if ($humidity =~ /^\./);
+
+    my $exit = $self->{perfdata}->threshold_check(value => $humidity, threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
+    
+    $self->{output}->output_add(severity => $exit,
+                                short_msg => sprintf("Humidity: %.2f %%", $humidity));
+    $self->{output}->perfdata_add(label => "humidity", unit => '%',
+                                  value => sprintf("%.2f", $humidity),
+                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
+                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'),
+                                  );
+
+    $self->{output}->display();
+    $self->{output}->exit();
+
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check sensor Humidity.
+
+=over 8
+
+=item B<--hostname>
+
+IP Addr/FQDN of the webserver host
+
+=item B<--port>
+
+Port used by Apache
+
+=item B<--proxyurl>
+
+Proxy URL if any
+
+=item B<--proto>
+
+Specify https if needed
+
+=item B<--urlpath>
+
+Set path to get server-status page in auto mode (Default: '/index.htm?em')
+
+=item B<--credentials>
+
+Specify this option if you access server-status page over basic authentification
+
+=item B<--username>
+
+Specify username for basic authentification (Mandatory if --credentials is specidied)
+
+=item B<--password>
+
+Specify password for basic authentification (Mandatory if --credentials is specidied)
+
+=item B<--timeout>
+
+Threshold for HTTP timeout
+
+=item B<--warning>
+
+Warning Threshold for Humidity
+
+=item B<--critical>
+
+Critical Threshold for Humidity
+
+=back
+
+=cut
diff --git a/hardware/sensors/sequoia/em01/web/mode/illumination.pm b/hardware/sensors/sequoia/em01/web/mode/illumination.pm
new file mode 100644
index 000000000..0618ff12e
--- /dev/null
+++ b/hardware/sensors/sequoia/em01/web/mode/illumination.pm
@@ -0,0 +1,174 @@
+###############################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an timeelapsedutable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting timeelapsedutable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Author : Simon BOMM 
+#
+# Based on De Bodt Lieven plugin
+####################################################################################
+
+package hardware::sensors::sequoia::em01::web::mode::illumination;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+use centreon::plugins::httplib;
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+            {
+            "hostname:s"        => { name => 'hostname' },
+            "port:s"            => { name => 'port', },
+            "proto:s"           => { name => 'proto', default => "http" },
+            "urlpath:s"         => { name => 'url_path', default => "/index.htm?em" },
+            "credentials"       => { name => 'credentials' },
+            "username:s"        => { name => 'username' },
+            "password:s"        => { name => 'password' },
+            "proxyurl:s"        => { name => 'proxyurl' },
+            "warning:s"         => { name => 'warning' },
+            "critical:s"        => { name => 'critical' },
+            "timeout:s"         => { name => 'timeout', default => '3' },
+            });
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+
+    if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{option_results}->{warning})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'.");
+        $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'.");
+        $self->{output}->option_exit();
+    }
+    if (!defined($self->{option_results}->{hostname})) {
+        $self->{output}->add_option_msg(short_msg => "Please set the hostname option");
+        $self->{output}->option_exit();
+    }
+    if ((defined($self->{option_results}->{credentials})) && (!defined($self->{option_results}->{username}) || !defined($self->{option_results}->{password}))) {
+        $self->{output}->add_option_msg(short_msg => "You need to set --username= and --password= options when --credentials is used");
+        $self->{output}->option_exit();
+    }
+}
+
+sub run {
+    my ($self, %options) = @_;
+        
+    my $webcontent = centreon::plugins::httplib::connect($self);
+    my $illumination;
+
+    if ($webcontent !~ /(.*)<\/body>/msi || $1 !~ /IL\s*([0-9\.]+)/i) {
+        $self->{output}->add_option_msg(short_msg => "Could not find illumination information.");
+        $self->{output}->option_exit();
+    }
+    $illumination = $1;
+    $illumination = '0' . $illumination if ($illumination =~ /^\./);
+
+    my $exit = $self->{perfdata}->threshold_check(value => $illumination, threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
+    
+    $self->{output}->output_add(severity => $exit,
+                                short_msg => sprintf("Illumination: %.1f", $illumination));
+    $self->{output}->perfdata_add(label => "illumination",
+                                  value => sprintf("%.1f", $illumination),
+                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
+                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'),
+                                  );
+
+    $self->{output}->display();
+    $self->{output}->exit();
+
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check sensor Illumination.
+
+=over 8
+
+=item B<--hostname>
+
+IP Addr/FQDN of the webserver host
+
+=item B<--port>
+
+Port used by Apache
+
+=item B<--proxyurl>
+
+Proxy URL if any
+
+=item B<--proto>
+
+Specify https if needed
+
+=item B<--urlpath>
+
+Set path to get server-status page in auto mode (Default: '/index.htm?em')
+
+=item B<--credentials>
+
+Specify this option if you access server-status page over basic authentification
+
+=item B<--username>
+
+Specify username for basic authentification (Mandatory if --credentials is specidied)
+
+=item B<--password>
+
+Specify password for basic authentification (Mandatory if --credentials is specidied)
+
+=item B<--timeout>
+
+Threshold for HTTP timeout
+
+=item B<--warning>
+
+Warning Threshold for Illumination
+
+=item B<--critical>
+
+Critical Threshold for Illumination
+
+=back
+
+=cut
diff --git a/hardware/sensors/sequoia/em01/web/mode/temperature.pm b/hardware/sensors/sequoia/em01/web/mode/temperature.pm
new file mode 100644
index 000000000..12c973283
--- /dev/null
+++ b/hardware/sensors/sequoia/em01/web/mode/temperature.pm
@@ -0,0 +1,173 @@
+###############################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an timeelapsedutable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting timeelapsedutable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Author : Simon BOMM 
+#
+# Based on De Bodt Lieven plugin
+####################################################################################
+
+package hardware::sensors::sequoia::em01::web::mode::temperature;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+use centreon::plugins::httplib;
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+            {
+            "hostname:s"        => { name => 'hostname' },
+            "port:s"            => { name => 'port', },
+            "proto:s"           => { name => 'proto', default => "http" },
+            "urlpath:s"         => { name => 'url_path', default => "/index.htm?em" },
+            "credentials"       => { name => 'credentials' },
+            "username:s"        => { name => 'username' },
+            "password:s"        => { name => 'password' },
+            "proxyurl:s"        => { name => 'proxyurl' },
+            "warning:s"         => { name => 'warning' },
+            "critical:s"        => { name => 'critical' },
+            "timeout:s"         => { name => 'timeout', default => '3' },
+            });
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+
+    if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{option_results}->{warning})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'.");
+        $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'.");
+        $self->{output}->option_exit();
+    }
+    if (!defined($self->{option_results}->{hostname})) {
+        $self->{output}->add_option_msg(short_msg => "Please set the hostname option");
+        $self->{output}->option_exit();
+    }
+    if ((defined($self->{option_results}->{credentials})) && (!defined($self->{option_results}->{username}) || !defined($self->{option_results}->{password}))) {
+        $self->{output}->add_option_msg(short_msg => "You need to set --username= and --password= options when --credentials is used");
+        $self->{output}->option_exit();
+    }
+}
+
+sub run {
+    my ($self, %options) = @_;
+        
+    my $webcontent = centreon::plugins::httplib::connect($self);
+
+    if ($webcontent !~ /(.*)<\/body>/msi || $1 !~ /T([CF]):\s*([0-9\.]+)/i) {
+        $self->{output}->add_option_msg(short_msg => "Could not find temperature information.");
+        $self->{output}->option_exit();
+    }
+    my ($temperature, $unit) = ($2, $1);
+    $temperature = '0' . $temperature if ($temperature =~ /^\./);
+
+    my $exit = $self->{perfdata}->threshold_check(value => $temperature, threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
+    
+    $self->{output}->output_add(severity => $exit,
+                                short_msg => sprintf("Temperature: %.2f %s", $temperature, $unit));
+    $self->{output}->perfdata_add(label => "temperature", unit => $unit,
+                                  value => sprintf("%.2f", $temperature),
+                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
+                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'),
+                                  );
+
+    $self->{output}->display();
+    $self->{output}->exit();
+
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check sensor Temperature.
+
+=over 8
+
+=item B<--hostname>
+
+IP Addr/FQDN of the webserver host
+
+=item B<--port>
+
+Port used by Apache
+
+=item B<--proxyurl>
+
+Proxy URL if any
+
+=item B<--proto>
+
+Specify https if needed
+
+=item B<--urlpath>
+
+Set path to get server-status page in auto mode (Default: '/index.htm?em')
+
+=item B<--credentials>
+
+Specify this option if you access server-status page over basic authentification
+
+=item B<--username>
+
+Specify username for basic authentification (Mandatory if --credentials is specidied)
+
+=item B<--password>
+
+Specify password for basic authentification (Mandatory if --credentials is specidied)
+
+=item B<--timeout>
+
+Threshold for HTTP timeout
+
+=item B<--warning>
+
+Warning Threshold for Humidity
+
+=item B<--critical>
+
+Critical Threshold for Humidity
+
+=back
+
+=cut
diff --git a/hardware/sensors/sequoia/em01/web/mode/thermistor.pm b/hardware/sensors/sequoia/em01/web/mode/thermistor.pm
new file mode 100644
index 000000000..fdd609241
--- /dev/null
+++ b/hardware/sensors/sequoia/em01/web/mode/thermistor.pm
@@ -0,0 +1,173 @@
+###############################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an timeelapsedutable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting timeelapsedutable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Author : Simon BOMM 
+#
+# Based on De Bodt Lieven plugin
+####################################################################################
+
+package hardware::sensors::sequoia::em01::web::mode::thermistor;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+use centreon::plugins::httplib;
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+            {
+            "hostname:s"        => { name => 'hostname' },
+            "port:s"            => { name => 'port', },
+            "proto:s"           => { name => 'proto', default => "http" },
+            "urlpath:s"         => { name => 'url_path', default => "/index.htm?eR" },
+            "credentials"       => { name => 'credentials' },
+            "username:s"        => { name => 'username' },
+            "password:s"        => { name => 'password' },
+            "proxyurl:s"        => { name => 'proxyurl' },
+            "warning:s"         => { name => 'warning' },
+            "critical:s"        => { name => 'critical' },
+            "timeout:s"         => { name => 'timeout', default => '3' },
+            });
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+
+    if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{option_results}->{warning})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'.");
+        $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'.");
+        $self->{output}->option_exit();
+    }
+    if (!defined($self->{option_results}->{hostname})) {
+        $self->{output}->add_option_msg(short_msg => "Please set the hostname option");
+        $self->{output}->option_exit();
+    }
+    if ((defined($self->{option_results}->{credentials})) && (!defined($self->{option_results}->{username}) || !defined($self->{option_results}->{password}))) {
+        $self->{output}->add_option_msg(short_msg => "You need to set --username= and --password= options when --credentials is used");
+        $self->{output}->option_exit();
+    }
+}
+
+sub run {
+    my ($self, %options) = @_;
+        
+    my $webcontent = centreon::plugins::httplib::connect($self);
+
+    if ($webcontent !~ /(.*)<\/body>/msi || $1 !~ /R([CF])\s*([0-9\.]+)/i) {
+        $self->{output}->add_option_msg(short_msg => "Could not find thermistor temperature information.");
+        $self->{output}->option_exit();
+    }
+    my ($temperature, $unit) = ($2, $1);
+    $temperature = '0' . $temperature if ($temperature =~ /^\./);
+
+    my $exit = $self->{perfdata}->threshold_check(value => $temperature, threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
+    
+    $self->{output}->output_add(severity => $exit,
+                                short_msg => sprintf("Temperature: %.2f %s", $temperature, $unit));
+    $self->{output}->perfdata_add(label => "temperature", unit => $unit,
+                                  value => sprintf("%.2f", $temperature),
+                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
+                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'),
+                                  );
+
+    $self->{output}->display();
+    $self->{output}->exit();
+
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check sensor thermistor temperature.
+
+=over 8
+
+=item B<--hostname>
+
+IP Addr/FQDN of the webserver host
+
+=item B<--port>
+
+Port used by Apache
+
+=item B<--proxyurl>
+
+Proxy URL if any
+
+=item B<--proto>
+
+Specify https if needed
+
+=item B<--urlpath>
+
+Set path to get server-status page in auto mode (Default: '/index.htm?eR')
+
+=item B<--credentials>
+
+Specify this option if you access server-status page over basic authentification
+
+=item B<--username>
+
+Specify username for basic authentification (Mandatory if --credentials is specidied)
+
+=item B<--password>
+
+Specify password for basic authentification (Mandatory if --credentials is specidied)
+
+=item B<--timeout>
+
+Threshold for HTTP timeout
+
+=item B<--warning>
+
+Warning Threshold for Humidity
+
+=item B<--critical>
+
+Critical Threshold for Humidity
+
+=back
+
+=cut
diff --git a/hardware/sensors/sequoia/em01/web/mode/voltage.pm b/hardware/sensors/sequoia/em01/web/mode/voltage.pm
new file mode 100644
index 000000000..206463b59
--- /dev/null
+++ b/hardware/sensors/sequoia/em01/web/mode/voltage.pm
@@ -0,0 +1,174 @@
+###############################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an timeelapsedutable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting timeelapsedutable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Author : Simon BOMM 
+#
+# Based on De Bodt Lieven plugin
+####################################################################################
+
+package hardware::sensors::sequoia::em01::web::mode::voltage;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+use centreon::plugins::httplib;
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+            {
+            "hostname:s"        => { name => 'hostname' },
+            "port:s"            => { name => 'port', },
+            "proto:s"           => { name => 'proto', default => "http" },
+            "urlpath:s"         => { name => 'url_path', default => "/index.htm?ev" },
+            "credentials"       => { name => 'credentials' },
+            "username:s"        => { name => 'username' },
+            "password:s"        => { name => 'password' },
+            "proxyurl:s"        => { name => 'proxyurl' },
+            "warning:s"         => { name => 'warning' },
+            "critical:s"        => { name => 'critical' },
+            "timeout:s"         => { name => 'timeout', default => '3' },
+            });
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+
+    if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{option_results}->{warning})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'.");
+        $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'.");
+        $self->{output}->option_exit();
+    }
+    if (!defined($self->{option_results}->{hostname})) {
+        $self->{output}->add_option_msg(short_msg => "Please set the hostname option");
+        $self->{output}->option_exit();
+    }
+    if ((defined($self->{option_results}->{credentials})) && (!defined($self->{option_results}->{username}) || !defined($self->{option_results}->{password}))) {
+        $self->{output}->add_option_msg(short_msg => "You need to set --username= and --password= options when --credentials is used");
+        $self->{output}->option_exit();
+    }
+}
+
+sub run {
+    my ($self, %options) = @_;
+        
+    my $webcontent = centreon::plugins::httplib::connect($self);
+    my $voltage;
+
+    if ($webcontent !~ /(.*)<\/body>/msi || $1 !~ /CV\s*([0-9\.]+)/i) {
+        $self->{output}->add_option_msg(short_msg => "Could not find voltage information.");
+        $self->{output}->option_exit();
+    }
+    $voltage = $1;
+    $voltage = '0' . $voltage if ($voltage =~ /^\./);
+
+    my $exit = $self->{perfdata}->threshold_check(value => $voltage, threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
+    
+    $self->{output}->output_add(severity => $exit,
+                                short_msg => sprintf("Voltage: %.2f V", $voltage));
+    $self->{output}->perfdata_add(label => "voltage", unit => 'V',
+                                  value => sprintf("%.2f", $voltage),
+                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
+                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'),
+                                  );
+
+    $self->{output}->display();
+    $self->{output}->exit();
+
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check sensor voltage.
+
+=over 8
+
+=item B<--hostname>
+
+IP Addr/FQDN of the webserver host
+
+=item B<--port>
+
+Port used by Apache
+
+=item B<--proxyurl>
+
+Proxy URL if any
+
+=item B<--proto>
+
+Specify https if needed
+
+=item B<--urlpath>
+
+Set path to get server-status page in auto mode (Default: '/index.htm?ev')
+
+=item B<--credentials>
+
+Specify this option if you access server-status page over basic authentification
+
+=item B<--username>
+
+Specify username for basic authentification (Mandatory if --credentials is specidied)
+
+=item B<--password>
+
+Specify password for basic authentification (Mandatory if --credentials is specidied)
+
+=item B<--timeout>
+
+Threshold for HTTP timeout
+
+=item B<--warning>
+
+Warning Threshold for Voltage
+
+=item B<--critical>
+
+Critical Threshold for Voltage
+
+=back
+
+=cut
diff --git a/hardware/sensors/sequoia/em01/web/plugin.pm b/hardware/sensors/sequoia/em01/web/plugin.pm
new file mode 100644
index 000000000..7a9ef0a5d
--- /dev/null
+++ b/hardware/sensors/sequoia/em01/web/plugin.pm
@@ -0,0 +1,70 @@
+###############################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package hardware::sensors::sequoia::em01::web::plugin;
+
+use strict;
+use warnings;
+use base qw(centreon::plugins::script_simple);
+
+sub new {
+	my ($class, %options) = @_;
+	my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+	bless $self, $class;
+# $options->{options} = options object
+
+	$self->{version} = '0.1';
+	%{$self->{modes}} = (
+            'contact'       => 'hardware::sensors::sequoia::em01::web::mode::contact',
+            'temperature'   => 'hardware::sensors::sequoia::em01::web::mode::temperature',
+            'humidity'      => 'hardware::sensors::sequoia::em01::web::mode::humidity',
+            'illumination'  => 'hardware::sensors::sequoia::em01::web::mode::illumination',
+            'flood'         => 'hardware::sensors::sequoia::em01::web::mode::flood',
+            'thermistor'    => 'hardware::sensors::sequoia::em01::web::mode::thermistor',
+            'voltage'       => 'hardware::sensors::sequoia::em01::web::mode::voltage',
+			);
+
+	return $self;
+}
+
+1;
+
+__END__
+
+=head1 PLUGIN DESCRIPTION
+
+Check Sequoia em01 sensors through webpage.
+
+=cut
diff --git a/hardware/server/dell/openmanage/mode/hardware.pm b/hardware/server/dell/openmanage/mode/hardware.pm
index 99df232af..b7516d648 100644
--- a/hardware/server/dell/openmanage/mode/hardware.pm
+++ b/hardware/server/dell/openmanage/mode/hardware.pm
@@ -113,6 +113,33 @@ sub global {
                                 );
 }
 
+sub globalstatus {
+    my %status = (
+        1 => ['other', 'CRITICAL'],
+        2 => ['unknown', 'UNKNOWN'],
+        3 => ['ok', 'OK'],
+        4 => ['nonCritical', 'WARNING'],
+        5 => ['critical', 'CRITICAL'],
+        6 => ['nonRecoverable', 'CRITICAL'],
+    );
+
+    my ($self) = @_;
+
+    $self->{output}->output_add(long_msg => "Checking global system status");
+    return if ($self->check_exclude('globalstatus'));
+
+    my $oid_globalSystemStatus = '.1.3.6.1.4.1.674.10892.1.200.10.1.2.1';
+    my $result = $self->{snmp}->get_leef(oids => [$oid_globalSystemStatus], nothing_quit => 1);
+    
+    $self->{output}->output_add(long_msg => sprintf("Overall global status is '%s'.",
+                                    ${$status{$result->{$oid_globalSystemStatus}}}[0]
+                                    ));
+    
+    $self->{output}->output_add(severity =>  ${$status{$result->{$oid_globalSystemStatus}}}[1],
+                            short_msg => sprintf("Overall global status is '%s'",
+                                            ${$status{$result->{$oid_globalSystemStatus}}}[0]));
+}
+
 sub component {
     my ($self, %options) = @_;
 
@@ -179,6 +206,8 @@ sub run {
 
     if ($self->{option_results}->{component} eq 'all') {
         $self->global();
+    } elsif ($self->{option_results}->{component} eq 'globalstatus') {
+        $self->globalstatus();
     } else {
         $self->component();
     }
diff --git a/hardware/server/hpproliant/mode/components/cpu.pm b/hardware/server/hpproliant/mode/components/cpu.pm
index 3ce002c41..5f0884643 100644
--- a/hardware/server/hpproliant/mode/components/cpu.pm
+++ b/hardware/server/hpproliant/mode/components/cpu.pm
@@ -51,15 +51,15 @@ sub check {
     # In MIB 'CPQSTDEQ-MIB.mib'
     
     $self->{output}->output_add(long_msg => "Checking cpu");
-    $self->{components}->{cpu} = {name => 'cpus', total => 0};
-    return if ($self->check_exclude('cpu'));
+    $self->{components}->{cpu} = {name => 'cpus', total => 0, skip => 0};
+    return if ($self->check_exclude(section => 'cpu'));
     
     my $oid_cpqSeCpuUnitIndex = '.1.3.6.1.4.1.232.1.2.2.1.1.1';
     my $oid_cpqSeCpuSlot = '.1.3.6.1.4.1.232.1.2.2.1.1.2';
     my $oid_cpqSeCpuName = '.1.3.6.1.4.1.232.1.2.2.1.1.3';
     my $oid_cpqSeCpuStatus = '.1.3.6.1.4.1.232.1.2.2.1.1.6';
     my $oid_cpqSeCpuSocketNumber = '.1.3.6.1.4.1.232.1.2.2.1.1.9';
-    
+
     my $result = $self->{snmp}->get_table(oid => $oid_cpqSeCpuUnitIndex);
     return if (scalar(keys %$result) <= 0);
     
@@ -76,7 +76,9 @@ sub check {
         my $cpu_status = $result2->{$oid_cpqSeCpuStatus . '.' . $instance};
         my $cpu_socket_number =  $result2->{$oid_cpqSeCpuSocketNumber . '.' . $instance};
         
+        next if ($self->check_exclude(section => 'cpu', instance => $instance));
         $self->{components}->{cpu}->{total}++;
+
         $self->{output}->output_add(long_msg => sprintf("cpu [slot: %s, unit: %s, name: %s, socket: %s] status is %s.", 
                                     $cpu_slot, $result->{$key}, $cpu_name, $cpu_socket_number,
                                     ${$cpustatus{$cpu_status}}[0]));
diff --git a/hardware/server/hpproliant/mode/components/fan.pm b/hardware/server/hpproliant/mode/components/fan.pm
index 88b30b24e..12ba019d5 100644
--- a/hardware/server/hpproliant/mode/components/fan.pm
+++ b/hardware/server/hpproliant/mode/components/fan.pm
@@ -84,8 +84,8 @@ sub check {
 
     # In MIB 'CPQHLTH-MIB.mib'
     $self->{output}->output_add(long_msg => "Checking fans");
-    $self->{components}->{fan} = {name => 'fans', total => 0};
-    return if ($self->check_exclude('fan'));
+    $self->{components}->{fan} = {name => 'fans', total => 0, skip => 0};
+    return if ($self->check_exclude(section => 'fan'));
     
     my $oid_cpqHeFltTolFanPresent = '.1.3.6.1.4.1.232.6.2.6.7.1.4';
     my $oid_cpqHeFltTolFanChassis = '.1.3.6.1.4.1.232.6.2.6.7.1.1';
@@ -102,10 +102,13 @@ sub check {
     my @get_oids = ();
     my @oids_end = ();
     foreach my $key ($self->{snmp}->oid_lex_sort(keys %$result)) {
-        next if ($present_map{$result->{$key}} ne 'present');
         # Chassis + index
-        $key =~ /(\d+\.\d+)$/;
-        my $oid_end = $1;
+        $key =~ /(\d+)\.(\d+)$/;
+        my $oid_end = $1 . '.' . $2;
+        
+        next if ($present_map{$result->{$key}} ne 'present' && 
+                 $self->absent_problem(section => 'fans', instance => $1 . '.' . $2));
+        
         
         push @oids_end, $oid_end;
         push @get_oids, $oid_cpqHeFltTolFanLocale . "." . $oid_end, $oid_cpqHeFltTolFanCondition . "." . $oid_end,
@@ -122,7 +125,9 @@ sub check {
         my $fan_redundant = $result->{$oid_cpqHeFltTolFanRedundant . '.' . $_};
         my $fan_redundantpartner = $result->{$oid_cpqHeFltTolFanRedundantPartner . '.' . $_};
 
+        next if ($self->check_exclude(section => 'fans', instance => $fan_chassis . '.' . $fan_index));
         $self->{components}->{fan}->{total}++;
+
         $self->{output}->output_add(long_msg => sprintf("fan %d status is %s, speed is %s [chassis: %s, location: %s, redundance: %s, redundant partner: %s].",
                                     $fan_index, ${$conditions{$fan_condition}}[0], $fanspeed{$fan_speed},
                                     $fan_chassis, $location_map{$fan_locale},
diff --git a/hardware/server/hpproliant/mode/components/fca.pm b/hardware/server/hpproliant/mode/components/fca.pm
index 7d164d1e8..91d91de49 100644
--- a/hardware/server/hpproliant/mode/components/fca.pm
+++ b/hardware/server/hpproliant/mode/components/fca.pm
@@ -182,8 +182,8 @@ sub host_array_controller {
     my ($self) = @_;
     
     $self->{output}->output_add(long_msg => "Checking fca host controller");
-    $self->{components}->{fcahostctl} = {name => 'fca host controllers', total => 0};
-    return if ($self->check_exclude('fcahostctl'));
+    $self->{components}->{fcahostctl} = {name => 'fca host controllers', total => 0, skip => 0};
+    return if ($self->check_exclude(section => 'fcahostctl'));
     
     my $oid_cpqFcaHostCntlrIndex = '.1.3.6.1.4.1.232.16.2.7.1.1.1';
     my $oid_cpqFcaHostCntlrSlot = '.1.3.6.1.4.1.232.16.2.7.1.1.2';
@@ -208,7 +208,9 @@ sub host_array_controller {
         my $fca_slot = $result2->{$oid_cpqFcaHostCntlrSlot . '.' . $instance};
         my $fca_condition = $result2->{$oid_cpqFcaHostCntlrCondition . '.' . $instance};
         
+        next if ($self->check_exclude(section => 'fcahostctl', instance => $instance));
         $self->{components}->{fcahostctl}->{total}++;
+        
         $self->{output}->output_add(long_msg => sprintf("fca host controller %s [slot: %s, model: %s, status: %s] condition is %s.", 
                                     $fca_index, $fca_slot, $model_map{$fca_model}, $hostctlstatus_map{$fca_status},
                                     ${$conditions{$fca_condition}}[0]));
@@ -224,8 +226,8 @@ sub external_array_controller {
     my ($self) = @_;
     
     $self->{output}->output_add(long_msg => "Checking fca external controller");
-    $self->{components}->{fcaexternalctl} = {name => 'fca external controllers', total => 0};
-    return if ($self->check_exclude('fcaexternalctl'));
+    $self->{components}->{fcaexternalctl} = {name => 'fca external controllers', total => 0, skip => 0};
+    return if ($self->check_exclude(section => 'fcaexternalctl'));
     
     my $oid_cpqFcaCntlrCondition = '.1.3.6.1.4.1.232.16.2.2.1.1.6';
     my $oid_cpqFcaCntlrModel = '.1.3.6.1.4.1.232.16.2.2.1.1.3';
@@ -251,7 +253,9 @@ sub external_array_controller {
         my $fca_role = $result2->{$oid_cpqFcaCntlrCurrentRole . '.' . $instance};
         my $fca_condition = $result->{$key};
         
+        next if ($self->check_exclude(section => 'fcaexternalctl', instance => $instance));
         $self->{components}->{fcaexternalctl}->{total}++;
+        
         $self->{output}->output_add(long_msg => sprintf("fca external controller %s [model: %s, status: %s, role: %s] condition is %s.", 
                                     $fca_box_index . ':' . $fca_box_slot,
                                     $external_model_map{$fca_model}, $externalctlstatus_map{$fca_status}, $externalrole_map{$fca_role},
@@ -268,8 +272,8 @@ sub external_array_accelerator {
     my ($self) = @_;
     
     $self->{output}->output_add(long_msg => "Checking fca external accelerator boards");
-    $self->{components}->{fcaexternalacc} = {name => 'fca external accelerator boards', total => 0};
-    return if ($self->check_exclude('fcaexternalacc'));
+    $self->{components}->{fcaexternalacc} = {name => 'fca external accelerator boards', total => 0, skip => 0};
+    return if ($self->check_exclude(section => 'fcaexternalacc'));
     
     my $oid_cpqFcaAccelCondition = '.1.3.6.1.4.1.232.16.2.2.2.1.9';
     my $oid_cpqFcaAccelStatus = '.1.3.6.1.4.1.232.16.2.2.2.1.3';
@@ -292,7 +296,9 @@ sub external_array_accelerator {
         my $accel_condition = $result->{$key};
         my $accel_battery = $result2->{$oid_cpqFcaAccelBatteryStatus . '.' . $instance};
         
+        next if ($self->check_exclude(section => 'fcaexternalacc', instance => $instance));
         $self->{components}->{fcaexternalacc}->{total}++;
+
         $self->{output}->output_add(long_msg => sprintf("fca external accelerator boards %s [status: %s, battery status: %s] condition is %s.", 
                                     $fca_box_index . ':' . $fca_box_slot, 
                                     $accelstatus_map{$accel_status}, ${$conditionsbattery{$accel_battery}}[0],
@@ -314,8 +320,8 @@ sub logical_drive {
     my ($self) = @_;
     
     $self->{output}->output_add(long_msg => "Checking fca logical drives");
-    $self->{components}->{fcaldrive} = {name => 'fca logical drives', total => 0};
-    return if ($self->check_exclude('fcaldrive'));
+    $self->{components}->{fcaldrive} = {name => 'fca logical drives', total => 0, skip => 0};
+    return if ($self->check_exclude(section => 'fcaldrive'));
     
     my $oid_cpqFcaLogDrvCondition = '.1.3.6.1.4.1.232.16.2.3.1.1.11';
     my $oid_cpqFcaLogDrvStatus = '.1.3.6.1.4.1.232.16.2.3.1.1.4';
@@ -339,7 +345,9 @@ sub logical_drive {
         my $ldrive_condition = $result->{$key};
         my $ldrive_faultol = $result2->{$oid_cpqFcaLogDrvFaultTol . '.' . $instance};
         
+        next if ($self->check_exclude(section => 'fcaldrive', instance => $instance));
         $self->{components}->{fcaldrive}->{total}++;
+
         $self->{output}->output_add(long_msg => sprintf("fca logical drive %s [fault tolerance: %s, status: %s] condition is %s.", 
                                     $box_index . ':' . $drive_index,
                                     $ldrive_fault_tolerance_map{$ldrive_faultol}, 
@@ -363,8 +371,8 @@ sub physical_drive {
     my ($self) = @_;
     
     $self->{output}->output_add(long_msg => "Checking fca physical drives");
-    $self->{components}->{fcapdrive} = {name => 'fca physical drives', total => 0};
-    return if ($self->check_exclude('fcapdrive'));
+    $self->{components}->{fcapdrive} = {name => 'fca physical drives', total => 0, skip => 0};
+    return if ($self->check_exclude(section => 'fcapdrive'));
     
     my $oid_cpqFcaPhyDrvCondition = '.1.3.6.1.4.1.232.16.2.5.1.1.31';
     my $oid_cpqFcaPhyDrvStatus = '.1.3.6.1.4.1.232.16.2.5.1.1.6';
@@ -385,7 +393,9 @@ sub physical_drive {
         my $pdrive_status = $result2->{$oid_cpqFcaPhyDrvStatus . '.' . $instance};
         my $pdrive_condition = $result->{$key};
         
+        next if ($self->check_exclude(section => 'fcapdrive', instance => $instance));
         $self->{components}->{fcapdrive}->{total}++;
+
         $self->{output}->output_add(long_msg => sprintf("fca physical drive %s [status: %s] condition is %s.", 
                                     $box_index . ':' . $drive_index,
                                     $pdrive_status_map{$pdrive_status},
diff --git a/hardware/server/hpproliant/mode/components/ida.pm b/hardware/server/hpproliant/mode/components/ida.pm
index 231cdea8f..c7c009577 100644
--- a/hardware/server/hpproliant/mode/components/ida.pm
+++ b/hardware/server/hpproliant/mode/components/ida.pm
@@ -154,8 +154,8 @@ sub array_controller {
     my ($self) = @_;
     
     $self->{output}->output_add(long_msg => "Checking da controller");
-    $self->{components}->{dactl} = {name => 'da controllers', total => 0};
-    return if ($self->check_exclude('dactl'));
+    $self->{components}->{dactl} = {name => 'da controllers', total => 0, skip => 0};
+    return if ($self->check_exclude(section => 'dactl'));
     
     my $oid_cpqDaCntlrIndex = '.1.3.6.1.4.1.232.3.2.2.1.1.1';
     my $oid_cpqDaCntlrModel = '.1.3.6.1.4.1.232.3.2.2.1.1.2';
@@ -176,8 +176,10 @@ sub array_controller {
         my $da_model = $result2->{$oid_cpqDaCntlrModel . '.' . $instance};
         my $da_slot = $result2->{$oid_cpqDaCntlrSlot . '.' . $instance};
         my $da_condition = $result2->{$oid_cpqDaCntlrCondition . '.' . $instance};
-        
+
+        next if ($self->check_exclude(section => 'dactl', instance => $instance));
         $self->{components}->{dactl}->{total}++;
+
         $self->{output}->output_add(long_msg => sprintf("da controller %s [slot: %s, model: %s] status is %s.", 
                                     $instance, $da_slot, $model_map{$da_model},
                                     ${$conditions{$da_condition}}[0]));
@@ -193,8 +195,8 @@ sub array_accelerator {
     my ($self) = @_;
     
     $self->{output}->output_add(long_msg => "Checking da accelerator boards");
-    $self->{components}->{daacc} = {name => 'da accelerator boards', total => 0};
-    return if ($self->check_exclude('daacc'));
+    $self->{components}->{daacc} = {name => 'da accelerator boards', total => 0, skip => 0};
+    return if ($self->check_exclude(section => 'daacc'));
     
     my $oid_cpqDaAccelCntlrIndex = '.1.3.6.1.4.1.232.3.2.2.2.1.1';
     my $oid_cpqDaAccelStatus = '.1.3.6.1.4.1.232.3.2.2.2.1.2';
@@ -215,8 +217,10 @@ sub array_accelerator {
         my $accel_status = $result2->{$oid_cpqDaAccelStatus . '.' . $instance};
         my $accel_condition = $result2->{$oid_cpqDaAccelCondition . '.' . $instance};
         my $accel_battery = $result2->{$oid_cpqDaAccelBattery . '.' . $instance};
-        
+
+        next if ($self->check_exclude(section => 'daacc', instance => $instance));
         $self->{components}->{daacc}->{total}++;
+
         $self->{output}->output_add(long_msg => sprintf("da controller accelerator %s [status: %s, battery status: %s] condition is %s.", 
                                     $instance, $accelstatus_map{$accel_status}, ${$conditionsbattery{$accel_battery}}[0],
                                     ${$conditions{$accel_condition}}[0]));
@@ -237,8 +241,8 @@ sub logical_drive {
     my ($self) = @_;
     
     $self->{output}->output_add(long_msg => "Checking da logical drives");
-    $self->{components}->{daldrive} = {name => 'da logical drives', total => 0};
-    return if ($self->check_exclude('daldrive'));
+    $self->{components}->{daldrive} = {name => 'da logical drives', total => 0, skip => 0};
+    return if ($self->check_exclude(section => 'daldrive'));
     
     my $oid_cpqDaLogDrvCondition = '.1.3.6.1.4.1.232.3.2.3.1.1.11';
     my $oid_cpqDaLogDrvStatus = '.1.3.6.1.4.1.232.3.2.3.1.1.4';
@@ -261,8 +265,10 @@ sub logical_drive {
         my $ldrive_status = $result2->{$oid_cpqDaLogDrvStatus . '.' . $instance};
         my $ldrive_condition = $result->{$key};
         my $ldrive_faultol = $result2->{$oid_cpqDaLogDrvFaultTol . '.' . $instance};
-        
+
+        next if ($self->check_exclude(section => 'daldrive', instance => $instance));
         $self->{components}->{daldrive}->{total}++;
+
         $self->{output}->output_add(long_msg => sprintf("da logical drive %s [fault tolerance: %s, status: %s] condition is %s.", 
                                     $controller_index . ':' . $drive_index,
                                     $ldrive_fault_tolerance_map{$ldrive_faultol}, 
@@ -286,8 +292,8 @@ sub physical_drive {
     my ($self) = @_;
     
     $self->{output}->output_add(long_msg => "Checking da physical drives");
-    $self->{components}->{dapdrive} = {name => 'da physical drives', total => 0};
-    return if ($self->check_exclude('dapdrive'));
+    $self->{components}->{dapdrive} = {name => 'da physical drives', total => 0, skip => 0};
+    return if ($self->check_exclude(section => 'dapdrive'));
     
     my $oid_cpqDaPhyDrvCondition = '.1.3.6.1.4.1.232.3.2.5.1.1.37';
     my $oid_cpqDaPhyDrvStatus = '.1.3.6.1.4.1.232.3.2.5.1.1.6';
@@ -307,8 +313,10 @@ sub physical_drive {
 
         my $pdrive_status = $result2->{$oid_cpqDaPhyDrvStatus . '.' . $instance};
         my $pdrive_condition = $result->{$key};
-        
+
+        next if ($self->check_exclude(section => 'dapdrive', instance => $instance));
         $self->{components}->{dapdrive}->{total}++;
+
         $self->{output}->output_add(long_msg => sprintf("da physical drive %s [status: %s] condition is %s.", 
                                     $controller_index . ':' . $drive_index,
                                     $pdrive_status_map{$pdrive_status},
diff --git a/hardware/server/hpproliant/mode/components/ide.pm b/hardware/server/hpproliant/mode/components/ide.pm
index 87191af13..4e56ec71a 100644
--- a/hardware/server/hpproliant/mode/components/ide.pm
+++ b/hardware/server/hpproliant/mode/components/ide.pm
@@ -73,8 +73,8 @@ sub controller {
     my ($self) = @_;
     
     $self->{output}->output_add(long_msg => "Checking ide controllers");
-    $self->{components}->{idectl} = {name => 'ide controllers', total => 0};
-    return if ($self->check_exclude('idectl'));
+    $self->{components}->{idectl} = {name => 'ide controllers', total => 0, skip => 0};
+    return if ($self->check_exclude(section => 'idectl'));
     
     my $oid_cpqIdeControllerIndex = '.1.3.6.1.4.1.232.14.2.3.1.1.1';
     my $oid_cpqIdeControllerCondition = '.1.3.6.1.4.1.232.14.2.3.1.1.7';
@@ -97,8 +97,10 @@ sub controller {
         my $ide_slot = $result2->{$oid_cpqIdeControllerSlot . '.' . $instance};
         my $ide_condition = $result2->{$oid_cpqIdeControllerCondition . '.' . $instance};
         my $ide_status = $result2->{$oid_cpqIdeControllerStatus . '.' . $instance};
-        
+
+        next if ($self->check_exclude(section => 'idectl', instance => $instance));
         $self->{components}->{idectl}->{total}++;
+
         $self->{output}->output_add(long_msg => sprintf("ide controller %s [slot: %s, model: %s, status: %s] condition is %s.", 
                                     $instance, $ide_slot, $ide_model, $controllerstatus_map{$ide_status},
                                     ${$conditions{$ide_condition}}[0]));
@@ -114,8 +116,8 @@ sub logical_drive {
     my ($self) = @_;
     
     $self->{output}->output_add(long_msg => "Checking ide logical drives");
-    $self->{components}->{ideldrive} = {name => 'ide logical drives', total => 0};
-    return if ($self->check_exclude('ideldrive'));
+    $self->{components}->{ideldrive} = {name => 'ide logical drives', total => 0, skip => 0};
+    return if ($self->check_exclude(section => 'ideldrive'));
     
     my $oid_cpqIdeLogicalDriveCondition = '.1.3.6.1.4.1.232.14.2.6.1.1.6';
     my $oid_cpqIdeLogicalDriveStatus = '.1.3.6.1.4.1.232.14.2.6.1.1.5';
@@ -135,8 +137,10 @@ sub logical_drive {
 
         my $ldrive_status = $result2->{$oid_cpqIdeLogicalDriveStatus . '.' . $instance};
         my $ldrive_condition = $result->{$key};
-        
+
+        next if ($self->check_exclude(section => 'ideldrive', instance => $instance));
         $self->{components}->{ideldrive}->{total}++;
+
         $self->{output}->output_add(long_msg => sprintf("ide logical drive %s [status: %s] condition is %s.", 
                                     $controller_index . ':' . $drive_index,
                                     $ldrive_status_map{$ldrive_status},
@@ -159,8 +163,8 @@ sub physical_drive {
     my ($self) = @_;
     
     $self->{output}->output_add(long_msg => "Checking ide physical drives");
-    $self->{components}->{idepdrive} = {name => 'ide physical drives', total => 0};
-    return if ($self->check_exclude('idepdrive'));
+    $self->{components}->{idepdrive} = {name => 'ide physical drives', total => 0, skip => 0};
+    return if ($self->check_exclude(section => 'idepdrive'));
     
     my $oid_cpqIdeAtaDiskCondition = '.1.3.6.1.4.1.232.14.2.4.1.1.7';
     my $oid_cpqIdeAtaDiskStatus = '.1.3.6.1.4.1.232.14.2.4.1.1.6';
@@ -180,8 +184,10 @@ sub physical_drive {
 
         my $pdrive_status = $result2->{$oid_cpqIdeAtaDiskStatus . '.' . $instance};
         my $pdrive_condition = $result->{$key};
-        
+
+        next if ($self->check_exclude(section => 'idepdrive', instance => $instance));
         $self->{components}->{idepdrive}->{total}++;
+
         $self->{output}->output_add(long_msg => sprintf("ide physical drive %s [status: %s] condition is %s.", 
                                     $controller_index . ':' . $drive_index,
                                     $pdrive_status_map{$pdrive_status},
diff --git a/hardware/server/hpproliant/mode/components/network.pm b/hardware/server/hpproliant/mode/components/network.pm
index 0d2f6eefa..7e9773682 100644
--- a/hardware/server/hpproliant/mode/components/network.pm
+++ b/hardware/server/hpproliant/mode/components/network.pm
@@ -88,8 +88,8 @@ sub physical_nic {
     # In MIB 'CPQNIC-MIB.mib'
     
     $self->{output}->output_add(long_msg => "Checking physical nics");
-    $self->{components}->{pnic} = {name => 'physical nics', total => 0};
-    return if ($self->check_exclude('pnic'));
+    $self->{components}->{pnic} = {name => 'physical nics', total => 0, skip => 0};
+    return if ($self->check_exclude(section => 'pnic'));
     
     my $oid_cpqNicIfPhysAdapterIndex = '.1.3.6.1.4.1.232.18.2.3.1.1.1';
     my $oid_cpqNicIfPhysAdapterRole = '.1.3.6.1.4.1.232.18.2.3.1.1.3';
@@ -110,6 +110,9 @@ sub physical_nic {
         $key =~ /(\d+)$/;
         my $instance = $1;
     
+        next if ($self->check_exclude(section => 'pnic', instance => $instance));
+        $self->{components}->{pnic}->{total}++;
+        
         my $nic_index = $result->{$key};
         my $nic_role = $result2->{$oid_cpqNicIfPhysAdapterRole . '.' . $instance};
         my $nic_condition = $result2->{$oid_cpqNicIfPhysAdapterCondition . '.' . $instance};
@@ -117,7 +120,6 @@ sub physical_nic {
         my $nic_status = $result2->{$oid_cpqNicIfPhysAdapterStatus . '.' . $instance};
         my $nic_duplex = $result2->{$oid_cpqNicIfPhysAdapterDuplexState . '.' . $instance};
         
-        $self->{components}->{pnic}->{total}++;
         $self->{output}->output_add(long_msg => sprintf("physical nic %s [duplex: %s, role: %s, state: %s, status: %s] condition is %s.", 
                                     $nic_index, $map_nic_duplex{$nic_duplex}, $map_pnic_role{$nic_role},
                                     $map_nic_state{$nic_state}, $map_pnic_status{$nic_status},
@@ -135,8 +137,8 @@ sub logical_nic {
     # In MIB 'CPQNIC-MIB.mib'
     
     $self->{output}->output_add(long_msg => "Checking logical nics");
-    $self->{components}->{lnic} = {name => 'logical nics', total => 0};
-    return if ($self->check_exclude('lnic'));
+    $self->{components}->{lnic} = {name => 'logical nics', total => 0, skip => 0};
+    return if ($self->check_exclude(section => 'lnic'));
     
     my $oid_cpqNicIfLogMapIndex = '.1.3.6.1.4.1.232.18.2.2.1.1.1';
     my $oid_cpqNicIfLogMapDescription = '.1.3.6.1.4.1.232.18.2.2.1.1.3';
@@ -155,13 +157,15 @@ sub logical_nic {
         $key =~ /(\d+)$/;
         my $instance = $1;
     
+        next if ($self->check_exclude(section => 'lnic', instance => $instance));
+        $self->{components}->{lnic}->{total}++;
+    
         my $nic_index = $result->{$key};
         my $nic_description = centreon::plugins::misc::trim($result2->{$oid_cpqNicIfLogMapDescription . '.' . $instance});
         my $nic_count = $result2->{$oid_cpqNicIfLogMapAdapterCount . '.' . $instance};
         my $nic_condition = $result2->{$oid_cpqNicIfLogMapCondition . '.' . $instance};
         my $nic_status = $result2->{$oid_cpqNicIfLogMapStatus . '.' . $instance};
         
-        $self->{components}->{lnic}->{total}++;
         $self->{output}->output_add(long_msg => sprintf("logical nic %s [adapter count: %s, description: %s, status: %s] condition is %s.", 
                                     $nic_index, $nic_count, $nic_description,
                                     $map_lnic_status{$nic_status},
diff --git a/hardware/server/hpproliant/mode/components/pc.pm b/hardware/server/hpproliant/mode/components/pc.pm
index f12c2d0dc..a84f67bed 100644
--- a/hardware/server/hpproliant/mode/components/pc.pm
+++ b/hardware/server/hpproliant/mode/components/pc.pm
@@ -62,8 +62,8 @@ sub check {
 
     # In MIB 'CPQHLTH-MIB.mib'
     $self->{output}->output_add(long_msg => "Checking power converters");
-    $self->{components}->{pc} = {name => 'power converters', total => 0};
-    return if ($self->check_exclude('pc'));
+    $self->{components}->{pc} = {name => 'power converters', total => 0, skip => 0};
+    return if ($self->check_exclude(section => 'pc'));
     
     my $oid_cpqHePwrConvPresent = '.1.3.6.1.4.1.232.6.2.13.3.1.3';
     my $oid_cpqHePwrConvIndex = '.1.3.6.1.4.1.232.6.2.13.3.1.2';
@@ -77,10 +77,12 @@ sub check {
     my @get_oids = ();
     my @oids_end = ();
     foreach my $key ($self->{snmp}->oid_lex_sort(keys %$result)) {
-        next if ($present_map{$result->{$key}} ne 'present');
         # Chassis + index
-        $key =~ /(\d+\.\d+)$/;
-        my $oid_end = $1;
+        $key =~ /(\d+)\.(\d+)$/;
+        my $oid_end = $1 . '.' . $2;
+
+        next if ($present_map{$result->{$key}} ne 'present' &&
+                 $self->absent_problem(section => 'pc', instance => $1 . '.' . $2));
         
         push @oids_end, $oid_end;
         push @get_oids, $oid_cpqHePwrConvCondition . "." . $oid_end, $oid_cpqHePwrConvRedundant . "." . $oid_end,
@@ -93,7 +95,9 @@ sub check {
         my $pc_redundant = $result->{$oid_cpqHePwrConvRedundant . '.' . $_};
         my $pc_redundantgroup = defined($result->{$oid_cpqHePwrConvRedundantGroupId . '.' . $_}) ? $result->{$oid_cpqHePwrConvRedundantGroupId . '.' . $_} : 'undefined';
 
+        next if ($self->check_exclude(section => 'pc', instance => $pc_chassis . '.' . $pc_index));
         $self->{components}->{pc}->{total}++;
+
         $self->{output}->output_add(long_msg => sprintf("powerconverter %d status is %s [chassis: %s, redundance: %s, redundant group: %s].",
                                     $pc_index, ${$conditions{$pc_condition}}[0],
                                     $pc_chassis, $redundant_map{$pc_redundant}, $pc_redundantgroup
diff --git a/hardware/server/hpproliant/mode/components/psu.pm b/hardware/server/hpproliant/mode/components/psu.pm
index 53c57dc64..d60e46398 100644
--- a/hardware/server/hpproliant/mode/components/psu.pm
+++ b/hardware/server/hpproliant/mode/components/psu.pm
@@ -81,8 +81,8 @@ sub check {
 
     # In MIB 'CPQHLTH-MIB.mib'
     $self->{output}->output_add(long_msg => "Checking power supplies");
-    $self->{components}->{psu} = {name => 'power supplies', total => 0};
-    return if ($self->check_exclude('psu'));
+    $self->{components}->{psu} = {name => 'power supplies', total => 0, skip => 0};
+    return if ($self->check_exclude(section => 'psu'));
     
     my $oid_cpqHeFltTolPowerSupplyPresent = '.1.3.6.1.4.1.232.6.2.9.3.1.3';
     my $oid_cpqHeFltTolPowerSupplyChassis = '.1.3.6.1.4.1.232.6.2.9.3.1.1';
@@ -100,10 +100,12 @@ sub check {
     my @get_oids = ();
     my @oids_end = ();
     foreach my $key ($self->{snmp}->oid_lex_sort(keys %$result)) {
-        next if ($present_map{$result->{$key}} ne 'present');
         # Chassis + Bay
-        $key =~ /(\d+\.\d+)$/;
-        my $oid_end = $1;
+        $key =~ /(\d+)\.(\d+)$/;
+        my $oid_end = $1 . '.' . $2;
+        
+        next if ($present_map{$result->{$key}} ne 'present' &&
+                 $self->absent_problem(section => 'psu', instance => $1 . '.' . $2));
         
         push @oids_end, $oid_end;
         push @get_oids,
@@ -123,7 +125,9 @@ sub check {
         my $psu_capacitymaximum = $result->{$oid_cpqHeFltTolPowerSupplyCapacityMaximum . '.' . $_};
         my $psu_voltage = $result->{$oid_cpqHeFltTolPowerSupplyMainVoltage . '.' . $_};
 
+        next if ($self->check_exclude(section => 'psu', instance => $psu_chassis . '.' . $psu_bay));
         $self->{components}->{psu}->{total}++;
+
         $self->{output}->output_add(long_msg => sprintf("powersupply %d status is %s [chassis: %s, redundance: %s, redundant partner: %s] (status %s).",
                                     $psu_bay, ${$conditions{$psu_condition}}[0],
                                     $psu_chassis, $redundant_map{$psu_redundant}, $psu_redundantpartner,
diff --git a/hardware/server/hpproliant/mode/components/sas.pm b/hardware/server/hpproliant/mode/components/sas.pm
index 4f19f90f0..d38f3b71f 100644
--- a/hardware/server/hpproliant/mode/components/sas.pm
+++ b/hardware/server/hpproliant/mode/components/sas.pm
@@ -79,8 +79,8 @@ sub controller {
     my ($self) = @_;
     
     $self->{output}->output_add(long_msg => "Checking sas controllers");
-    $self->{components}->{sasctl} = {name => 'sas controllers', total => 0};
-    return if ($self->check_exclude('sasctl'));
+    $self->{components}->{sasctl} = {name => 'sas controllers', total => 0, skip => 0};
+    return if ($self->check_exclude(section => 'sasctl'));
     
     my $oid_cpqSasHbaIndex = '.1.3.6.1.4.1.232.5.5.1.1.1.1';
     my $oid_cpqSasHbaCondition = '.1.3.6.1.4.1.232.5.5.1.1.1.5';
@@ -101,8 +101,10 @@ sub controller {
         my $sas_slot = $result2->{$oid_cpqSasHbaSlot . '.' . $instance};
         my $sas_condition = $result2->{$oid_cpqSasHbaCondition . '.' . $instance};
         my $sas_status = $result2->{$oid_cpqSasHbaStatus . '.' . $instance};
-        
+
+        next if ($self->check_exclude(section => 'sasctl', instance => $instance));
         $self->{components}->{sasctl}->{total}++;
+
         $self->{output}->output_add(long_msg => sprintf("sas controller %s [slot: %s, status: %s] condition is %s.", 
                                     $instance, $sas_slot, $controllerstatus_map{$sas_status},
                                     ${$conditions{$sas_condition}}[0]));
@@ -118,8 +120,8 @@ sub logical_drive {
     my ($self) = @_;
     
     $self->{output}->output_add(long_msg => "Checking sas logical drives");
-    $self->{components}->{sasldrive} = {name => 'sas logical drives', total => 0};
-    return if ($self->check_exclude('sasldrive'));
+    $self->{components}->{sasldrive} = {name => 'sas logical drives', total => 0, skip => 0};
+    return if ($self->check_exclude(section => 'sasldrive'));
     
     my $oid_cpqSasLogDrvCondition = '.1.3.6.1.4.1.232.5.5.3.1.1.5';
     my $oid_cpqSasLogDrvStatusValue = '.1.3.6.1.4.1.232.5.5.3.1.1.4';
@@ -140,7 +142,9 @@ sub logical_drive {
         my $ldrive_status = $result2->{$oid_cpqSasLogDrvStatusValue . '.' . $instance};
         my $ldrive_condition = $result->{$key};
         
+        next if ($self->check_exclude(section => 'sasldrive', instance => $instance));
         $self->{components}->{sasldrive}->{total}++;
+
         $self->{output}->output_add(long_msg => sprintf("sas logical drive %s [status: %s] condition is %s.", 
                                     $controller_index . ':' . $drive_index,
                                     $ldrive_status_map{$ldrive_status},
@@ -163,8 +167,8 @@ sub physical_drive {
     my ($self) = @_;
     
     $self->{output}->output_add(long_msg => "Checking sas physical drives");
-    $self->{components}->{saspdrive} = {name => 'sas physical drives', total => 0};
-    return if ($self->check_exclude('saspdrive'));
+    $self->{components}->{saspdrive} = {name => 'sas physical drives', total => 0, skip => 0};
+    return if ($self->check_exclude(section => 'saspdrive'));
     
     my $oid_cpqSasPhyDrvCondition = '.1.3.6.1.4.1.232.5.5.2.1.1.6';
     my $oid_cpqSasPhyDrvStatus = '.1.3.6.1.4.1.232.5.5.2.1.1.5';
@@ -184,8 +188,10 @@ sub physical_drive {
 
         my $pdrive_status = $result2->{$oid_cpqSasPhyDrvStatus . '.' . $instance};
         my $pdrive_condition = $result->{$key};
-        
+
+        next if ($self->check_exclude(section => 'saspdrive', instance => $instance));
         $self->{components}->{saspdrive}->{total}++;
+
         $self->{output}->output_add(long_msg => sprintf("sas physical drive %s [status: %s] condition is %s.", 
                                     $controller_index . ':' . $drive_index,
                                     $pdrive_status_map{$pdrive_status},
diff --git a/hardware/server/hpproliant/mode/components/scsi.pm b/hardware/server/hpproliant/mode/components/scsi.pm
index 0de3be227..febb750f7 100644
--- a/hardware/server/hpproliant/mode/components/scsi.pm
+++ b/hardware/server/hpproliant/mode/components/scsi.pm
@@ -85,8 +85,8 @@ sub controller {
     my ($self) = @_;
     
     $self->{output}->output_add(long_msg => "Checking scsi controllers");
-    $self->{components}->{scsictl} = {name => 'scsi controllers', total => 0};
-    return if ($self->check_exclude('scsictl'));
+    $self->{components}->{scsictl} = {name => 'scsi controllers', total => 0, skip => 0};
+    return if ($self->check_exclude(section => 'scsictl'));
     
     my $oid_cpqScsiCntlrCondition = '.1.3.6.1.4.1.232.5.2.2.1.1.12';
     my $oid_cpqScsiCntlrSlot = '.1.3.6.1.4.1.232.5.2.2.1.1.6';
@@ -109,7 +109,9 @@ sub controller {
         my $scsi_condition = $result->{$key};
         my $scsi_status = $result2->{$oid_cpqScsiCntlrStatus . '.' . $instance};
         
+        next if ($self->check_exclude(section => 'scsictl', instance => $instance));
         $self->{components}->{scsictl}->{total}++;
+
         $self->{output}->output_add(long_msg => sprintf("scsi controller %s [slot: %s, status: %s] condition is %s.", 
                                     $controller_index . ':' . $bus_index, $scsi_slot, $controllerstatus_map{$scsi_status},
                                     ${$conditions{$scsi_condition}}[0]));
@@ -125,8 +127,8 @@ sub logical_drive {
     my ($self) = @_;
     
     $self->{output}->output_add(long_msg => "Checking scsi logical drives");
-    $self->{components}->{scsildrive} = {name => 'scsi logical drives', total => 0};
-    return if ($self->check_exclude('scsildrive'));
+    $self->{components}->{scsildrive} = {name => 'scsi logical drives', total => 0, skip => 0};
+    return if ($self->check_exclude(section => 'scsildrive'));
     
     my $oid_cpqScsiLogDrvCondition = '.1.3.6.1.4.1.232.5.2.3.1.1.8';
     my $oid_cpqScsiLogDrvStatus = '.1.3.6.1.4.1.232.5.2.3.1.1.5';
@@ -147,8 +149,10 @@ sub logical_drive {
 
         my $ldrive_status = $result2->{$oid_cpqScsiLogDrvStatus . '.' . $instance};
         my $ldrive_condition = $result->{$key};
-        
+
+        next if ($self->check_exclude(section => 'scsildrive', instance => $instance));
         $self->{components}->{scsildrive}->{total}++;
+
         $self->{output}->output_add(long_msg => sprintf("scsi logical drive %s [status: %s] condition is %s.", 
                                     $controller_index . ':' . $bus_index . ':' . $drive_index,
                                     $ldrive_status_map{$ldrive_status},
@@ -171,8 +175,8 @@ sub physical_drive {
     my ($self) = @_;
     
     $self->{output}->output_add(long_msg => "Checking scsi physical drives");
-    $self->{components}->{scsipdrive} = {name => 'scsi physical drives', total => 0};
-    return if ($self->check_exclude('scsipdrive'));
+    $self->{components}->{scsipdrive} = {name => 'scsi physical drives', total => 0, skip => 0};
+    return if ($self->check_exclude(section => 'scsipdrive'));
     
     my $oid_cpqScsiPhyDrvCondition = '.1.3.6.1.4.1.232.5.2.4.1.1.26';
     my $oid_cpqScsiPhyDrvStatus = '.1.3.6.1.4.1.232.5.2.4.1.1.9';
@@ -193,8 +197,10 @@ sub physical_drive {
 
         my $pdrive_status = $result2->{$oid_cpqScsiPhyDrvStatus . '.' . $instance};
         my $pdrive_condition = $result->{$key};
-        
+
+        next if ($self->check_exclude(section => 'scsipdrive', instance => $instance));
         $self->{components}->{scsipdrive}->{total}++;
+
         $self->{output}->output_add(long_msg => sprintf("scsi physical drive %s [status: %s] condition is %s.", 
                                     $controller_index . ':' . $bus_index . ':' . $drive_index,
                                     $pdrive_status_map{$pdrive_status},
diff --git a/hardware/server/hpproliant/mode/components/temperature.pm b/hardware/server/hpproliant/mode/components/temperature.pm
index 42ddfb676..fd224454f 100644
--- a/hardware/server/hpproliant/mode/components/temperature.pm
+++ b/hardware/server/hpproliant/mode/components/temperature.pm
@@ -66,8 +66,8 @@ sub check {
     # In MIB 'CPQSTDEQ-MIB.mib'
     
     $self->{output}->output_add(long_msg => "Checking temperatures");
-    $self->{components}->{temperature} = {name => 'temperatures', total => 0};
-    return if ($self->check_exclude('temperature'));
+    $self->{components}->{temperature} = {name => 'temperatures', total => 0, skip => 0};
+    return if ($self->check_exclude(section => 'temperature'));
     
     my $oid_cpqHeTemperatureEntry = '.1.3.6.1.4.1.232.6.2.6.8.1';
     my $oid_cpqHeTemperatureCondition = '.1.3.6.1.4.1.232.6.2.6.8.1.6';
@@ -92,7 +92,9 @@ sub check {
         my $temp_threshold = $result->{$oid_cpqHeTemperatureThreshold . '.' . $instance};
         my $temp_locale = $result->{$oid_cpqHeTemperatureLocale . '.' . $instance};
         
+        next if ($self->check_exclude(section => 'temperature', instance => $temp_chassis . '.' . $temp_index));
         $self->{components}->{temperature}->{total}++;
+
         $self->{output}->output_add(long_msg => sprintf("%s %s temperature is %dC (%d max) (status is %s).", 
                                     $temp_index, $location_map{$temp_locale}, $temp_current,
                                     $temp_threshold,
diff --git a/hardware/server/hpproliant/mode/hardware.pm b/hardware/server/hpproliant/mode/hardware.pm
index 49bbd461a..1aa9104d3 100644
--- a/hardware/server/hpproliant/mode/hardware.pm
+++ b/hardware/server/hpproliant/mode/hardware.pm
@@ -61,19 +61,31 @@ sub new {
     $options{options}->add_options(arguments =>
                                 { 
                                   "exclude:s"        => { name => 'exclude' },
+                                  "absent-problem:s" => { name => 'absent' },
                                   "component:s"      => { name => 'component', default => 'all' },
+                                  "no-component:s"   => { name => 'no_component' },
                                 });
 
     $self->{product_name} = undef;
     $self->{serial} = undef;
     $self->{romversion} = undef;
     $self->{components} = {};
+    $self->{no_components} = undef;
+    
     return $self;
 }
 
 sub check_options {
     my ($self, %options) = @_;
     $self->SUPER::init(%options);
+    
+    if (defined($self->{option_results}->{no_component})) {
+        if ($self->{option_results}->{no_component} ne '') {
+            $self->{no_components} = $self->{option_results}->{no_component};
+        } else {
+            $self->{no_components} = 'critical';
+        }
+    }
 }
 
 sub global {
@@ -111,9 +123,9 @@ sub global {
     my $display_by_component_append = '';
     foreach my $comp (sort(keys %{$self->{components}})) {
         # Skipping short msg when no components
-        next if ($self->{components}->{$comp}->{total} == 0);
-        $total_components += $self->{components}->{$comp}->{total};
-        $display_by_component .= $display_by_component_append . $self->{components}->{$comp}->{total} . ' ' . $self->{components}->{$comp}->{name};
+        next if ($self->{components}->{$comp}->{total} == 0 && $self->{components}->{$comp}->{skip} == 0);
+        $total_components += $self->{components}->{$comp}->{total} + $self->{components}->{$comp}->{skip};
+        $display_by_component .= $display_by_component_append . $self->{components}->{$comp}->{total} . '/' . $self->{components}->{$comp}->{skip} . ' ' . $self->{components}->{$comp}->{name};
         $display_by_component_append = ', ';
     }
     
@@ -123,6 +135,11 @@ sub global {
                                                     $display_by_component,
                                                     $self->{product_name}, $self->{serial}, $self->{romversion})
                                 );
+                                
+    if (defined($self->{option_results}->{no_component}) && $total_components == 0) {
+        $self->{output}->output_add(severity => $self->{no_components},
+                                    short_msg => 'No components are checked.');
+    }
 }
 
 sub component {
@@ -170,9 +187,9 @@ sub component {
     my $display_by_component_append = '';
     foreach my $comp (sort(keys %{$self->{components}})) {
         # Skipping short msg when no components
-        next if ($self->{components}->{$comp}->{total} == 0);
-        $total_components += $self->{components}->{$comp}->{total};
-        $display_by_component .= $display_by_component_append . $self->{components}->{$comp}->{total} . ' ' . $self->{components}->{$comp}->{name};
+        next if ($self->{components}->{$comp}->{total} == 0 && $self->{components}->{$comp}->{skip} == 0);
+        $total_components += $self->{components}->{$comp}->{total} + $self->{components}->{$comp}->{skip};
+        $display_by_component .= $display_by_component_append . $self->{components}->{$comp}->{total} . '/' . $self->{components}->{$comp}->{skip} . ' ' . $self->{components}->{$comp}->{name};
         $display_by_component_append = ', ';
     }
     
@@ -181,6 +198,11 @@ sub component {
                                                      $total_components,
                                                      $display_by_component)
                                 );
+
+    if (defined($self->{option_results}->{no_component}) && $total_components == 0) {
+        $self->{output}->output_add(severity => $self->{no_components},
+                                    short_msg => 'No components are checked.');
+    }
 }
 
 sub run {
@@ -214,15 +236,36 @@ sub get_system_information {
 }
 
 sub check_exclude {
-    my ($self, $section) = @_;
+    my ($self, %options) = @_;
 
-    if (defined($self->{option_results}->{exclude}) && $self->{option_results}->{exclude} =~ /(^|\s|,)$section(\s|,|$)/) {
-        $self->{output}->output_add(long_msg => sprintf("Skipping $section section."));
+    if (defined($options{instance})) {
+        if (defined($self->{option_results}->{exclude}) && $self->{option_results}->{exclude} =~ /(^|\s|,)${options{section}}[^,]*#\Q$options{instance}\E#/) {
+            $self->{components}->{$options{section}}->{skip}++;
+            $self->{output}->output_add(long_msg => sprintf("Skipping $options{section} section $options{instance} instance."));
+            return 1;
+        }
+    } elsif (defined($self->{option_results}->{exclude}) && $self->{option_results}->{exclude} =~ /(^|\s|,)$options{section}(\s|,|$)/) {
+        $self->{output}->output_add(long_msg => sprintf("Skipping $options{section} section."));
         return 1;
     }
     return 0;
 }
 
+sub absent_problem {
+    my ($self, %options) = @_;
+    
+    if (defined($self->{option_results}->{absent}) && 
+        $self->{option_results}->{absent} =~ /(^|\s|,)($options{section}(\s*,|$)|${options{section}}[^,]*#\Q$options{instance}\E#)/) {
+        $self->{output}->output_add(severity => 'CRITICAL',
+                                    short_msg => sprintf("Component '%s' instance '%s' is not present", 
+                                                         $options{section}, $options{instance}));
+    }
+
+    $self->{output}->output_add(long_msg => sprintf("Skipping $options{section} section $options{instance} instance (not present)"));
+    $self->{components}->{$options{section}}->{skip}++;
+    return 1;
+}
+
 1;
 
 __END__
@@ -240,9 +283,19 @@ Can be: 'cpu', 'psu', 'pc', 'fan', 'network', 'temperature', 'storage'.
 
 =item B<--exclude>
 
-Exclude some parts (comma seperated list) (Example: --exclude=psu,pc).
+Exclude some parts (comma seperated list) (Example: --exclude=fans,modules)
+Can also exclude specific instance: --exclude=fans#1.2#,lnic#1#,psus
+
+=item B<--absent-problem>
+
+Return an error if an entity is not 'present' (default is skipping) (comma seperated list)
+Can be specific or global: --absent-problem=fans#1.2#,psus
+
+=item B<--no-component>
+
+Return an error if no compenents are checked.
+If total (with skipped) is 0. (Default: 'critical' returns).
 
 =back
 
-=cut
-    
\ No newline at end of file
+=cut
\ No newline at end of file
diff --git a/hardware/server/sun/mgmt_cards/mode/environmentsf2xx.pm b/hardware/server/sun/mgmt_cards/mode/environmentsf2xx.pm
index d17ed692b..4a40d5d9a 100644
--- a/hardware/server/sun/mgmt_cards/mode/environmentsf2xx.pm
+++ b/hardware/server/sun/mgmt_cards/mode/environmentsf2xx.pm
@@ -40,7 +40,7 @@ use base qw(centreon::plugins::mode);
 use strict;
 use warnings;
 use centreon::plugins::misc;
-use hardware::server::sun::mgmtcards::lib::telnet;
+use hardware::server::sun::mgmt_cards::lib::telnet;
 
 sub new {
     my ($class, %options) = @_;
@@ -80,11 +80,12 @@ sub check_options {
 sub run {
     my ($self, %options) = @_;
 
-    my $telnet_handle = hardware::server::sun::mgmtcards::lib::telnet::connect(
+    my $telnet_handle = hardware::server::sun::mgmt_cards::lib::telnet::connect(
                             username => $self->{option_results}->{username},
                             password => $self->{option_results}->{password},
                             hostname => $self->{option_results}->{hostname},
                             port => $self->{option_results}->{port},
+                            timeout => $self->{option_results}->{timeout},
                             output => $self->{output});
     my @lines = $telnet_handle->cmd("showenvironment");
 
diff --git a/hardware/server/sun/mgmt_cards/mode/environmentv4xx.pm b/hardware/server/sun/mgmt_cards/mode/environmentv4xx.pm
index 97c7b6a83..a291646cb 100644
--- a/hardware/server/sun/mgmt_cards/mode/environmentv4xx.pm
+++ b/hardware/server/sun/mgmt_cards/mode/environmentv4xx.pm
@@ -40,7 +40,7 @@ use base qw(centreon::plugins::mode);
 use strict;
 use warnings;
 use centreon::plugins::misc;
-use hardware::server::sun::mgmtcards::lib::telnet;
+use hardware::server::sun::mgmt_cards::lib::telnet;
 
 sub new {
     my ($class, %options) = @_;
@@ -80,11 +80,12 @@ sub check_options {
 sub run {
     my ($self, %options) = @_;
 
-    my $telnet_handle = hardware::server::sun::mgmtcards::lib::telnet::connect(
+    my $telnet_handle = hardware::server::sun::mgmt_cards::lib::telnet::connect(
                             username => $self->{option_results}->{username},
                             password => $self->{option_results}->{password},
                             hostname => $self->{option_results}->{hostname},
                             port => $self->{option_results}->{port},
+                            timeout => $self->{option_results}->{timeout},
                             output => $self->{output});
     my @lines = $telnet_handle->cmd("showenvironment");
 
diff --git a/hardware/server/sun/mgmt_cards/mode/environmentv8xx.pm b/hardware/server/sun/mgmt_cards/mode/environmentv8xx.pm
index fefdf6ad5..bc64c1784 100644
--- a/hardware/server/sun/mgmt_cards/mode/environmentv8xx.pm
+++ b/hardware/server/sun/mgmt_cards/mode/environmentv8xx.pm
@@ -40,7 +40,7 @@ use base qw(centreon::plugins::mode);
 use strict;
 use warnings;
 use centreon::plugins::misc;
-use hardware::server::sun::mgmtcards::lib::telnet;
+use hardware::server::sun::mgmt_cards::lib::telnet;
 
 sub new {
     my ($class, %options) = @_;
@@ -80,11 +80,12 @@ sub check_options {
 sub run {
     my ($self, %options) = @_;
 
-    my $telnet_handle = hardware::server::sun::mgmtcards::lib::telnet::connect(
+    my $telnet_handle = hardware::server::sun::mgmt_cards::lib::telnet::connect(
                             username => $self->{option_results}->{username},
                             password => $self->{option_results}->{password},
                             hostname => $self->{option_results}->{hostname},
                             port => $self->{option_results}->{port},
+                            timeout => $self->{option_results}->{timeout},
                             output => $self->{output});
     my @lines = $telnet_handle->cmd("showenvironment");
 
diff --git a/hardware/server/sun/mgmt_cards/mode/showboards.pm b/hardware/server/sun/mgmt_cards/mode/showboards.pm
index 72a8ab9e1..3ae24ecad 100644
--- a/hardware/server/sun/mgmt_cards/mode/showboards.pm
+++ b/hardware/server/sun/mgmt_cards/mode/showboards.pm
@@ -39,7 +39,7 @@ use base qw(centreon::plugins::mode);
 
 use strict;
 use warnings;
-use hardware::server::sun::mgmtcards::lib::telnet;
+use hardware::server::sun::mgmt_cards::lib::telnet;
 use centreon::plugins::statefile;
 
 sub new {
@@ -56,6 +56,8 @@ sub new {
                                   "password:s"       => { name => 'password' },
                                   "timeout:s"        => { name => 'timeout', default => 30 },
                                   "memory"           => { name => 'memory' },
+                                  "command-plink:s"  => { name => 'command_plink', default => 'plink' },
+                                  "ssh"              => { name => 'ssh' },
                                 });
     $self->{statefile_cache} = centreon::plugins::statefile->new(%options);
     return $self;
@@ -81,6 +83,10 @@ sub check_options {
     if (defined($self->{option_results}->{memory})) {
         $self->{statefile_cache}->check_options(%options);
     }
+    
+    if (!defined($self->{option_results}->{ssh})) {
+        require hardware::server::sun::mgmt_cards::lib::telnet;
+    }
 }
 
 sub telnet_shell_plateform {
@@ -99,17 +105,65 @@ sub telnet_shell_plateform {
     $telnet_handle->print("0");
 }
 
+sub ssh_command {
+    my ($self, %options) = @_;
+    my $username = '';
+    
+    if (defined($self->{option_results}->{username}) && $self->{option_results}->{username} ne '') {
+        $username = $self->{option_results}->{username} . '\n';
+    }
+    
+    my $cmd_in = "0" . $username . $self->{option_results}->{password} . '\nshowboards\ndisconnect\n';
+    my $cmd = "echo -e '$cmd_in' | " . $self->{option_results}->{command_plink} . " -batch " . $self->{option_results}->{hostname} . " 2>&1";
+    my ($lerror, $stdout, $exit_code) = centreon::plugins::misc::backtick(
+                                                 command => $cmd,
+                                                 timeout => $self->{option_results}->{timeout},
+                                                 wait_exit => 1
+                                                 );
+    $stdout =~ s/\r//g;
+    if ($lerror <= -1000) {
+        $self->{output}->output_add(severity => 'UNKNOWN', 
+                                    short_msg => $stdout);
+        $self->{output}->display();
+        $self->{output}->exit();
+    }
+    if ($exit_code != 0) {
+        $stdout =~ s/\n/ - /g;
+        $self->{output}->output_add(severity => 'UNKNOWN', 
+                                    short_msg => "Command error: $stdout");
+        $self->{output}->display();
+        $self->{output}->exit();
+    }
+
+    if ($stdout !~ /Slot/mi) {
+        $self->{output}->output_add(long_msg => $stdout);
+        $self->{output}->output_add(severity => 'UNKNOWN', 
+                                    short_msg => "Command 'showboards' problems (see additional info).");
+        $self->{output}->display();
+        $self->{output}->exit();
+    }
+    
+    return $stdout;
+}
+
 sub run {
     my ($self, %options) = @_;
-
-    my $telnet_handle = hardware::server::sun::mgmtcards::lib::telnet::connect(
-                            username => $self->{option_results}->{username},
-                            password => $self->{option_results}->{password},
-                            hostname => $self->{option_results}->{hostname},
-                            port => $self->{option_results}->{port},
-                            output => $self->{output},
-                            closure => \&telnet_shell_plateform);
-    my @lines = $telnet_handle->cmd("showboards");
+    my ($output, @lines);
+    
+    if (defined($self->{option_results}->{ssh})) {
+        $output = $self->ssh_command();
+        @lines = split /\n/, $output;
+    } else {
+        my $telnet_handle = hardware::server::sun::mgmt_cards::lib::telnet::connect(
+                                username => $self->{option_results}->{username},
+                                password => $self->{option_results}->{password},
+                                hostname => $self->{option_results}->{hostname},
+                                port => $self->{option_results}->{port},
+                                timeout => $self->{option_results}->{timeout},
+                                output => $self->{output},
+                                closure => \&telnet_shell_plateform);
+        @lines = $telnet_handle->cmd("showboards");
+    }
     
     if (defined($self->{option_results}->{memory})) {
         $self->{statefile_cache}->read(statefile => 'cache_sun_mgmtcards_' . $self->{option_results}->{hostname}  . '_' .  $self->{mode});
@@ -195,6 +249,14 @@ Returns new errors (retention file is used by the following option).
 
 Timeout in seconds for the command (Default: 30).
 
+=item B<--command-plink>
+
+Plink command (default: plink). Use to set a path.
+
+=item B<--ssh>
+
+Use ssh (with plink) instead of telnet.
+
 =back
 
 =cut
diff --git a/hardware/server/sun/mgmt_cards/mode/showenvironment.pm b/hardware/server/sun/mgmt_cards/mode/showenvironment.pm
index c4a0fa9d9..40e1bc6a1 100644
--- a/hardware/server/sun/mgmt_cards/mode/showenvironment.pm
+++ b/hardware/server/sun/mgmt_cards/mode/showenvironment.pm
@@ -39,7 +39,6 @@ use base qw(centreon::plugins::mode);
 
 use strict;
 use warnings;
-use hardware::server::sun::mgmtcards::lib::telnet;
 
 sub new {
     my ($class, %options) = @_;
@@ -54,6 +53,8 @@ sub new {
                                   "username:s"       => { name => 'username' },
                                   "password:s"       => { name => 'password' },
                                   "timeout:s"        => { name => 'timeout', default => 30 },
+                                  "command-plink:s"  => { name => 'command_plink', default => 'plink' },
+                                  "ssh"              => { name => 'ssh' },
                                 });
     return $self;
 }
@@ -74,27 +75,73 @@ sub check_options {
        $self->{output}->add_option_msg(short_msg => "Need to specify a password.");
        $self->{output}->option_exit(); 
     }
+
+    if (!defined($self->{option_results}->{ssh})) {
+        require hardware::server::sun::mgmt_cards::lib::telnet;
+    }
+}
+
+sub ssh_command {
+    my ($self, %options) = @_;
+    
+    my $cmd_in = $self->{option_results}->{username} . '\n' . $self->{option_results}->{password} . '\nshowenvironment\nlogout\n';
+    my $cmd = "echo -e '$cmd_in' | " . $self->{option_results}->{command_plink} . " -batch " . $self->{option_results}->{hostname} . " 2>&1";
+    my ($lerror, $stdout, $exit_code) = centreon::plugins::misc::backtick(
+                                                 command => $cmd,
+                                                 timeout => $self->{option_results}->{timeout},
+                                                 wait_exit => 1
+                                                 );
+    $stdout =~ s/\r//g;
+    if ($lerror <= -1000) {
+        $self->{output}->output_add(severity => 'UNKNOWN', 
+                                    short_msg => $stdout);
+        $self->{output}->display();
+        $self->{output}->exit();
+    }
+    if ($exit_code != 0) {
+        $stdout =~ s/\n/ - /g;
+        $self->{output}->output_add(severity => 'UNKNOWN', 
+                                    short_msg => "Command error: $stdout");
+        $self->{output}->display();
+        $self->{output}->exit();
+    }
+
+    if ($stdout !~ /Environmental Status/mi) {
+        $self->{output}->output_add(long_msg => $stdout);
+        $self->{output}->output_add(severity => 'UNKNOWN', 
+                                    short_msg => "Command 'showenvironment' problems (see additional info).");
+        $self->{output}->display();
+        $self->{output}->exit();
+    }
+    
+    return $stdout;
 }
 
 sub run {
     my ($self, %options) = @_;
-
-    my $telnet_handle = hardware::server::sun::mgmtcards::lib::telnet::connect(
-                            username => $self->{option_results}->{username},
-                            password => $self->{option_results}->{password},
-                            hostname => $self->{option_results}->{hostname},
-                            port => $self->{option_results}->{port},
-                            output => $self->{output});
-    my @lines = $telnet_handle->cmd("showenvironment");
+    my $output;
+    
+    if (defined($self->{option_results}->{ssh})) {
+        $output = $self->ssh_command();
+    } else {
+        my $telnet_handle = hardware::server::sun::mgmt_cards::lib::telnet::connect(
+                                username => $self->{option_results}->{username},
+                                password => $self->{option_results}->{password},
+                                hostname => $self->{option_results}->{hostname},
+                                port => $self->{option_results}->{port},
+                                timeout => $self->{option_results}->{timeout},
+                                output => $self->{output});
+        my @lines = $telnet_handle->cmd("showenvironment");
+        $output = join("", @lines);
+    }
     
     $self->{output}->output_add(severity => 'OK', 
                                 short_msg => "No problems detected.");
     
-    my ($output) = join("", @lines);
     $output =~ s/\r//g;
     my $long_msg = $output;
     $long_msg =~ s/\|/~/mg;
-    output_add(long_msg => $long_msg); 
+    $self->{output}->output_add(long_msg => $long_msg); 
     
     if ($output =~ /^System Temperatures.*?\n.*?\n.*?\n.*?\n(.*?)\n\n/ims && defined($1)) {
         #Sensor         Status    Temp LowHard LowSoft LowWarn HighWarn HighSoft HighHard
@@ -253,6 +300,14 @@ telnet password.
 
 Timeout in seconds for the command (Default: 30).
 
+=item B<--command-plink>
+
+Plink command (default: plink). Use to set a path.
+
+=item B<--ssh>
+
+Use ssh (with plink) instead of telnet.
+
 =back
 
 =cut
diff --git a/hardware/server/sun/mgmt_cards/mode/showfaults.pm b/hardware/server/sun/mgmt_cards/mode/showfaults.pm
index 2ef8c7faa..4c3af011f 100644
--- a/hardware/server/sun/mgmt_cards/mode/showfaults.pm
+++ b/hardware/server/sun/mgmt_cards/mode/showfaults.pm
@@ -81,7 +81,7 @@ sub run {
     ######
     # Command execution
     ######
-    my $cmd = "echo 'showfaults' | " . $self->{option_results}->{command_plink} . " -T -l '" . $self->{option_results}->{username} . "' -batch -pw '" . $self->{option_results}->{password} . "' " . $self->{option_results}->{password} . " 2>&1";
+    my $cmd = "echo -e '" . $self->{option_results}->{username} . "\n" . $self->{option_results}->{password} . "\nshowfaults\nlogout\n' | " . $self->{option_results}->{command_plink} . ' -T -batch ' . $self->{option_results}->{hostname} . " 2>&1";
     my ($lerror, $stdout, $exit_code) = centreon::plugins::misc::backtick(
                                                  command => $cmd,
                                                  timeout => $self->{option_results}->{timeout},
@@ -106,13 +106,17 @@ sub run {
     # Command treatment
     ######
     my ($otp1, $otp2) = split(/showfaults\n/, $stdout);
-    $self->{output}->output_add(long_msg => $otp2);
-    if ($otp2 !~ /ID.*?FRU.*?Fault/mi) {
+    my $long_msg = $otp2;
+    $long_msg =~ s/\|/~/mg;
+    if (!defined($otp2) || $otp2 !~ /(No failures|ID.*?FRU.*?Fault)/mi) {
+        $self->{output}->output_add(long_msg => $stdout);
         $self->{output}->output_add(severity => 'UNKNOWN', 
                                     short_msg => "Command 'showfaults' problems (see additional info).");
-        return ;
+        $self->{output}->display();
+        $self->{output}->exit();
     }
     
+    $self->{output}->output_add(long_msg => $long_msg);
     $self->{output}->output_add(severity => 'OK', 
                                 short_msg => "No Problems on system.");
     # Check showfaults
@@ -134,7 +138,7 @@ __END__
 
 =head1 MODE
 
-Check Sun 'T1xxx', 'T2xxx' ans 'T5xxx' Hardware (through ALOM4v).
+Check Sun 'T1xxx', 'T2xxx' Hardware (through ALOM4v).
 
 =over 8
 
diff --git a/hardware/server/sun/mgmt_cards/mode/showfaulty.pm b/hardware/server/sun/mgmt_cards/mode/showfaulty.pm
index 5a62f0e8f..1ee1be9db 100644
--- a/hardware/server/sun/mgmt_cards/mode/showfaulty.pm
+++ b/hardware/server/sun/mgmt_cards/mode/showfaulty.pm
@@ -117,14 +117,16 @@ sub run {
     my ($otp1, $otp2) = split(/\Q$cmd_in\E\n/, $stdout);
     my $long_msg = $otp2;
     $long_msg =~ s/\|/~/mg;
-    $self->{output}->output_add(long_msg => $long_msg);
-    if ($otp2 !~ /Target.*?Property.*?Value/mi) {
+    
+    if (!defined($otp2) || $otp2 !~ /Target.*?Property.*?Value/mi) {
+        $self->{output}->output_add(long_msg => $stdout);
         $self->{output}->output_add(severity => 'UNKNOWN', 
                                     short_msg => "Command '$cmd_in' problems (see additional info).");
         $self->{output}->display();
         $self->{output}->exit();
     }
     
+    $self->{output}->output_add(long_msg => $long_msg);
     if (defined($self->{option_results}->{memory})) {
         $self->{statefile_cache}->read(statefile => 'cache_sun_mgmtcards_' . $self->{option_results}->{hostname}  . '_' .  $self->{mode});
         $self->{output}->output_add(severity => 'OK', 
diff --git a/hardware/server/sun/mgmt_cards/mode/showstatus.pm b/hardware/server/sun/mgmt_cards/mode/showstatus.pm
new file mode 100644
index 000000000..2de649301
--- /dev/null
+++ b/hardware/server/sun/mgmt_cards/mode/showstatus.pm
@@ -0,0 +1,173 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package hardware::server::sun::mgmt_cards::mode::showstatus;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+use centreon::plugins::misc;
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+                                { 
+                                  "hostname:s"       => { name => 'hostname' },
+                                  "username:s"       => { name => 'username' },
+                                  "password:s"       => { name => 'password' },
+                                  "timeout:s"        => { name => 'timeout', default => 30 },
+                                  "command-plink:s"  => { name => 'command_plink', default => 'plink' },
+                                });
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+
+    if (!defined($self->{option_results}->{hostname})) {
+       $self->{output}->add_option_msg(short_msg => "Need to specify a hostname.");
+       $self->{output}->option_exit(); 
+    }
+    if (!defined($self->{option_results}->{username})) {
+       $self->{output}->add_option_msg(short_msg => "Need to specify a username.");
+       $self->{output}->option_exit(); 
+    }
+    if (!defined($self->{option_results}->{password})) {
+       $self->{output}->add_option_msg(short_msg => "Need to specify a password.");
+       $self->{output}->option_exit(); 
+    }
+}
+
+sub run {
+    my ($self, %options) = @_;
+
+    ######
+    # Command execution
+    ######
+    
+    my ($lerror, $stdout, $exit_code) = centreon::plugins::misc::backtick(
+                                                 command => $self->{option_results}->{command_plink},
+                                                 timeout => $self->{option_results}->{timeout},
+                                                 arguments => ['-batch', '-l', $self->{option_results}->{username}, 
+                                                               '-pw', $self->{option_results}->{password},
+                                                               $self->{option_results}->{hostname}, 'showstatus'],
+                                                 wait_exit => 1,
+                                                 redirect_stderr => 1
+                                                 );
+    $stdout =~ s/\r//g;
+    if ($lerror <= -1000) {
+        $self->{output}->output_add(severity => 'UNKNOWN', 
+                                    short_msg => $stdout);
+        $self->{output}->display();
+        $self->{output}->exit();
+    }
+    if ($exit_code != 0) {
+        $stdout =~ s/\n/ - /g;
+        $self->{output}->output_add(severity => 'UNKNOWN', 
+                                    short_msg => "Command error: $stdout");
+        $self->{output}->display();
+        $self->{output}->exit();
+    }
+  
+    ######
+    # Command treatment
+    ######
+    my $long_msg = $stdout;
+    $long_msg =~ s/\|/~/mg;
+    
+    if (!defined($stdout)) {
+        $self->{output}->output_add(long_msg => $stdout);
+        $self->{output}->output_add(severity => 'UNKNOWN', 
+                                    short_msg => "Command '$stdout' problems (see additional info).");
+        $self->{output}->display();
+        $self->{output}->exit();
+    }
+    
+    $self->{output}->output_add(long_msg => $long_msg);
+    $self->{output}->output_add(severity => 'OK', 
+                                short_msg => "No problems on system.");
+
+    # OK:
+    #No failures found in System Initialization.
+    
+    if ($stdout !~ /No failures/i) {
+        $self->{output}->output_add(severity => 'CRITICAL', 
+                                            short_msg => "Some errors on system (see additional info).");
+    }
+
+ 
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check Sun Mxxxx (M3000, M4000,...) Hardware (through XSCF).
+
+=over 8
+
+=item B<--hostname>
+
+Hostname to query.
+
+=item B<--username>
+
+ssh username.
+
+=item B<--password>
+
+ssh password.
+
+=item B<--command-plink>
+
+Plink command (default: plink). Use to set a path.
+
+=item B<--timeout>
+
+Timeout in seconds for the command (Default: 30).
+
+=back
+
+=cut
diff --git a/hardware/server/sun/mgmt_cards/plugin.pm b/hardware/server/sun/mgmt_cards/plugin.pm
index 9c68aca21..d4e966d96 100644
--- a/hardware/server/sun/mgmt_cards/plugin.pm
+++ b/hardware/server/sun/mgmt_cards/plugin.pm
@@ -49,11 +49,12 @@ sub new {
     %{$self->{modes}} = (
                          'show-faulty'      => 'hardware::server::sun::mgmt_cards::mode::showfaulty',
                          'showfaults'       => 'hardware::server::sun::mgmt_cards::mode::showfaults',
+                         'showstatus'       => 'hardware::server::sun::mgmt_cards::mode::showstatus',
                          'showboards'       => 'hardware::server::sun::mgmt_cards::mode::showboards',
-                         'showenvironment'      => 'hardware::server::sun::mgmt_cards::mode::showenvironment',
-                         'environment-v8xx'     => 'hardware::server::sun::mgmt_cards::mode::environmentv8xx',
-                         'environment-v4xx'     => 'hardware::server::sun::mgmt_cards::mode::environmentv4xx',
-                         'environment-sf2xx'    => 'hardware::server::sun::mgmt_cards::mode::environmentsf2xx',
+                         'showenvironment'  => 'hardware::server::sun::mgmt_cards::mode::showenvironment',
+                         'environment-v8xx'  => 'hardware::server::sun::mgmt_cards::mode::environmentv8xx',
+                         'environment-v4xx'  => 'hardware::server::sun::mgmt_cards::mode::environmentv4xx',
+                         'environment-sf2xx'  => 'hardware::server::sun::mgmt_cards::mode::environmentsf2xx',
                          );
 
     return $self;
@@ -67,9 +68,10 @@ __END__
 
 Check a variety of Sun Hardware through management cards:
 - mode 'show-faulty': ILOM (T3-x, T4-x, T5xxx) (in ssh with 'plink' command) ;
-- mode 'showfaults': ALOM4v (in T1xxx, T2xxx, T5xxx) (in ssh with 'plink' command) ;
-- mode 'showboards': ScApp (SFxxxx - sf6900, sf6800, sf3800,...) (in telnet with Net::Telnet) ;
-- mode 'showenvironment': ALOM (v240, v440, v245,...) (in telnet with Net::Telnet) ;
+- mode 'showfaults': ALOM4v (in T1xxx, T2xxx) (in ssh with 'plink' command) ;
+- mode 'showstatus': XSCF (Mxxxx - M3000, M4000, M5000,...) (in ssh with 'plink' command) ;
+- mode 'showboards': ScApp (SFxxxx - sf6900, sf6800, sf3800,...) (in telnet with Net::Telnet or in ssh with 'plink' command) ;
+- mode 'showenvironment': ALOM (v240, v440, v245,...) (in telnet with Net::Telnet or in ssh with 'plink' command) ;
 - mode 'environment-v8xx': RSC cards (v890, v880) (in telnet with Net::Telnet) ;
 - mode 'environment-v4xx': RSC cards (v480, v490) (in telnet with Net::Telnet) ;
 - mode 'environment-sf2xx': RSC cards (sf280) (in telnet with Net::Telnet).
diff --git a/hardware/server/sun/sfxxk/mode/boards.pm b/hardware/server/sun/sfxxk/mode/boards.pm
index f38e0275a..7fbd884a3 100644
--- a/hardware/server/sun/sfxxk/mode/boards.pm
+++ b/hardware/server/sun/sfxxk/mode/boards.pm
@@ -82,11 +82,17 @@ sub run {
                                                command => $self->{option_results}->{command_pasv},
                                                command_path => $self->{option_results}->{command_path_pasv},
                                                command_options => $self->{option_results}->{command_options_pasv});
-    if ($stdout !~ /MAIN/i) {
+    if ($stdout =~ /SPARE/i) {
         $self->{output}->output_add(severity => 'OK', 
                                     short_msg => "System Controller is in spare mode.");
         $self->{output}->display();
         $self->{output}->exit();
+    } elsif ($stdout !~ /MAIN/i) {
+        $self->{output}->output_add(long_msg => $stdout);
+        $self->{output}->output_add(severity => 'UNKNOWN', 
+                                    short_msg => "Command problems (see additional info).");
+        $self->{output}->display();
+        $self->{output}->exit();
     }
 
     $stdout = centreon::plugins::misc::execute(output => $self->{output},
@@ -144,7 +150,7 @@ Hostname to query (need --remote).
 
 =item B<--ssh-option>
 
-Specify multiple options like the user (example: --ssh-option='-l=centreon-engine" --ssh-option='-p=52").
+Specify multiple options like the user (example: --ssh-option='-l=centreon-engine' --ssh-option='-p=52').
 
 =item B<--ssh-path>
 
diff --git a/hardware/server/sun/sfxxk/mode/environment.pm b/hardware/server/sun/sfxxk/mode/environment.pm
index 93828d4de..f74d094fa 100644
--- a/hardware/server/sun/sfxxk/mode/environment.pm
+++ b/hardware/server/sun/sfxxk/mode/environment.pm
@@ -82,11 +82,17 @@ sub run {
                                                command => $self->{option_results}->{command_pasv},
                                                command_path => $self->{option_results}->{command_path_pasv},
                                                command_options => $self->{option_results}->{command_options_pasv});
-    if ($stdout !~ /MAIN/i) {
+    if ($stdout =~ /SPARE/i) {
         $self->{output}->output_add(severity => 'OK', 
                                     short_msg => "System Controller is in spare mode.");
         $self->{output}->display();
         $self->{output}->exit();
+    } elsif ($stdout !~ /MAIN/i) {
+        $self->{output}->output_add(long_msg => $stdout);
+        $self->{output}->output_add(severity => 'UNKNOWN', 
+                                    short_msg => "Command problems (see additional info).");
+        $self->{output}->display();
+        $self->{output}->exit();
     }
 
     $stdout = centreon::plugins::misc::execute(output => $self->{output},
@@ -227,7 +233,7 @@ Hostname to query (need --remote).
 
 =item B<--ssh-option>
 
-Specify multiple options like the user (example: --ssh-option='-l=centreon-engine" --ssh-option='-p=52").
+Specify multiple options like the user (example: --ssh-option='-l=centreon-engine' --ssh-option='-p=52').
 
 =item B<--ssh-path>
 
diff --git a/hardware/server/sun/sfxxk/mode/failover.pm b/hardware/server/sun/sfxxk/mode/failover.pm
index 7b6f6f4d1..f939182cf 100644
--- a/hardware/server/sun/sfxxk/mode/failover.pm
+++ b/hardware/server/sun/sfxxk/mode/failover.pm
@@ -82,11 +82,17 @@ sub run {
                                                command => $self->{option_results}->{command_pasv},
                                                command_path => $self->{option_results}->{command_path_pasv},
                                                command_options => $self->{option_results}->{command_options_pasv});
-    if ($stdout !~ /MAIN/i) {
+    if ($stdout =~ /SPARE/i) {
         $self->{output}->output_add(severity => 'OK', 
                                     short_msg => "System Controller is in spare mode.");
         $self->{output}->display();
         $self->{output}->exit();
+    } elsif ($stdout !~ /MAIN/i) {
+        $self->{output}->output_add(long_msg => $stdout);
+        $self->{output}->output_add(severity => 'UNKNOWN', 
+                                    short_msg => "Command problems (see additional info).");
+        $self->{output}->display();
+        $self->{output}->exit();
     }
 
     $stdout = centreon::plugins::misc::execute(output => $self->{output},
@@ -133,7 +139,7 @@ Hostname to query (need --remote).
 
 =item B<--ssh-option>
 
-Specify multiple options like the user (example: --ssh-option='-l=centreon-engine" --ssh-option='-p=52").
+Specify multiple options like the user (example: --ssh-option='-l=centreon-engine' --ssh-option='-p=52').
 
 =item B<--ssh-path>
 
diff --git a/hardware/ups/standard/rfc1628/mode/alarms.pm b/hardware/ups/standard/rfc1628/mode/alarms.pm
new file mode 100644
index 000000000..c6ebdda7c
--- /dev/null
+++ b/hardware/ups/standard/rfc1628/mode/alarms.pm
@@ -0,0 +1,97 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package hardware::ups::standard::rfc1628::mode::alarms;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+                                { 
+                                });
+
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+}
+
+sub run {
+    my ($self, %options) = @_;
+    # $options{snmp} = snmp object
+    $self->{snmp} = $options{snmp};
+    
+    my $oid_upsAlarmsPresent = '.1.3.6.1.2.1.33.1.6.1.0';    
+    my $result = $self->{snmp}->get_leef(oids => [ $oid_upsAlarmsPresent ], nothing_quit => 1);
+
+    $self->{output}->output_add(severity => 'ok',
+                                short_msg => 'No alarms');
+    if ($result->{$oid_upsAlarmsPresent} > 0) {
+        $self->{output}->output_add(severity => 'critical',
+                                    short_msg => sprintf('%d Alarms (check your equipment to have more informations)', $result->{$oid_upsAlarmsPresent}));
+    }
+    $self->{output}->perfdata_add(label => 'alarms',
+                                  value => $result->{$oid_upsAlarmsPresent},
+                                  min => 0);
+
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check if Alarms present.
+Need an example to do the display from 'upsAlarmTable'. If you have ;)
+https://forge.centreon.com/issues/5377
+
+=over 8
+
+=back
+
+=cut
diff --git a/hardware/ups/standard/rfc1628/mode/batterystatus.pm b/hardware/ups/standard/rfc1628/mode/batterystatus.pm
new file mode 100644
index 000000000..d2b0fb34a
--- /dev/null
+++ b/hardware/ups/standard/rfc1628/mode/batterystatus.pm
@@ -0,0 +1,156 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package hardware::ups::standard::rfc1628::mode::batterystatus;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+
+my %battery_status = (
+    1 => ['unknown', 'UNKNOWN'], 
+    2 => ['normal', 'OK'], 
+    3 => ['low', 'WARNING'], 
+    4 => ['depleted', 'CRITICAL'],
+);
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+                                { 
+                                  "warning:s"               => { name => 'warning', },
+                                  "critical:s"              => { name => 'critical', },
+                                });
+
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+
+    if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{option_results}->{warning})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'.");
+       $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'.");
+       $self->{output}->option_exit();
+    }
+}
+
+sub run {
+    my ($self, %options) = @_;
+    # $options{snmp} = snmp object
+    $self->{snmp} = $options{snmp};
+    
+    my $oid_upsBattery = '.1.3.6.1.2.1.33.1.2';
+    my $oid_upsBatteryStatus = '.1.3.6.1.2.1.33.1.2.1.0';
+    my $oid_upsEstimatedMinutesRemaining = '.1.3.6.1.2.1.33.1.2.3.0';
+    my $oid_upsEstimatedChargeRemaining = '.1.3.6.1.2.1.33.1.2.4.0';
+    my $oid_upsBatteryVoltage = '.1.3.6.1.2.1.33.1.2.5.0'; # in dV
+    my $oid_upsBatteryCurrent = '.1.3.6.1.2.1.33.1.2.6.0'; # in dA
+    my $oid_upsBatteryTemperature = '.1.3.6.1.2.1.33.1.2.7.0'; # in degrees Centigrade
+    
+    my $result = $self->{snmp}->get_table(oid => $oid_upsBattery, nothing_quit => 1);
+
+    my $current = defined($result->{$oid_upsBatteryCurrent}) ? $result->{$oid_upsBatteryCurrent} * 0.1 : 0;
+    my $voltage = defined($result->{$oid_upsBatteryVoltage}) ? $result->{$oid_upsBatteryVoltage} * 0.1 : 0;
+    my $temp = defined($result->{$oid_upsBatteryTemperature}) ? $result->{$oid_upsBatteryTemperature} : 0;
+    my $min_remain = defined($result->{$oid_upsEstimatedMinutesRemaining}) ? $result->{$oid_upsEstimatedMinutesRemaining} : 'unknown';
+    my $charge_remain = defined($result->{$oid_upsEstimatedChargeRemaining}) ? $result->{$oid_upsEstimatedChargeRemaining} : 'unknown';
+    my $status = defined($result->{$oid_upsBatteryStatus}) ? $result->{$oid_upsBatteryStatus} : 1; # we put unknown ???
+  
+    $self->{output}->output_add(severity => ${$battery_status{$status}}[1],
+                                short_msg => sprintf("Battery status is %s", ${$battery_status{$status}}[0]));
+    my $exit_code = 'ok';
+    if ($charge_remain ne 'unknown') {
+        $exit_code = $self->{perfdata}->threshold_check(value => $charge_remain, 
+                                                        threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
+        $self->{output}->perfdata_add(label => 'load', unit => '%',
+                                      value => $charge_remain,
+                                      warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
+                                      critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'),
+                                      min => 0, max => 100);
+    }
+    $self->{output}->output_add(severity => $exit_code,
+                                short_msg => sprintf("Charge remaining: %s%% (%s minutes remaining)", $charge_remain, $min_remain));
+    
+    if ($current != 0) {
+        $self->{output}->perfdata_add(label => 'current', unit => 'A',
+                                      value => $current,
+                                      );
+    }
+    if ($voltage != 0) {
+        $self->{output}->perfdata_add(label => 'voltage', unit => 'V',
+                                      value => $voltage,
+                                      );
+    }
+    if ($temp != 0) {
+        $self->{output}->perfdata_add(label => 'temp', unit => 'C',
+                                      value => $temp,
+                                      );
+    }
+                                  
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check Battery Status and battery charge remaining.
+
+=over 8
+
+=item B<--warning>
+
+Threshold warning in percent of charge remaining.
+
+=item B<--critical>
+
+Threshold critical in percent of charge remaining.
+
+=back
+
+=cut
diff --git a/hardware/ups/standard/rfc1628/mode/inputlines.pm b/hardware/ups/standard/rfc1628/mode/inputlines.pm
new file mode 100644
index 000000000..d33f7a7e7
--- /dev/null
+++ b/hardware/ups/standard/rfc1628/mode/inputlines.pm
@@ -0,0 +1,218 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package hardware::ups::standard::rfc1628::mode::inputlines;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+
+my %oids = (
+    '.1.3.6.1.2.1.33.1.3.3.1.2' => { counter => 'frequence' }, # in dH upsInputFrequency
+    '.1.3.6.1.2.1.33.1.3.3.1.3' => { counter => 'voltage' }, # in Volt upsInputVoltage
+    '.1.3.6.1.2.1.33.1.3.3.1.4' => { counter => 'current' }, # in dA upsInputCurrent
+    '.1.3.6.1.2.1.33.1.3.3.1.5' => { counter => 'power' }, # in Watt upsInputTruePower
+);
+
+my $maps_counters = {
+    frequence   => { thresholds => {
+                                    warning_frequence  =>  { label => 'warning-frequence', exit_value => 'warning' },
+                                    critical_frequence =>  { label => 'critical-frequence', exit_value => 'critical' },
+                                   },
+                     output_msg => 'Frequence : %.2f Hz',
+                     factor => 0.1, unit => 'Hz',
+                    },
+    voltage => { thresholds => {
+                                warning_voltage  =>  { label => 'warning-voltage', exit_value => 'warning' },
+                                critical_voltage =>  { label => 'critical-voltage', exit_value => 'critical' },
+                                },
+                 output_msg => 'Voltage : %.2f V',
+                 factor => 1, unit => 'V',
+                },
+    current => { thresholds => {
+                                warning_current    =>  { label => 'warning-current', exit_value => 'warning' },
+                                critical_current   =>  { label => 'critical-current', exit_value => 'critical' },
+                                },
+                 output_msg => 'Current : %.2f A',
+                 factor => 0.1, unit => 'A',
+               },
+    power   => { thresholds => {
+                                warning_power  =>  { label => 'warning-power', exit_value => 'warning' },
+                                critical_power  =>  { label => 'critical-power', exit_value => 'critical' },
+                               },
+                 output_msg => 'Power : %.2f W',
+                 factor => 1, unit => 'W',
+                },
+};
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+                                { 
+                                });
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            $options{options}->add_options(arguments => {
+                                                         $maps_counters->{$_}->{thresholds}->{$name}->{label} . ':s'    => { name => $name },
+                                                        });
+        }
+    }
+
+    $self->{counters_value} = {};
+    $self->{instances_done} = {};
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            if (($self->{perfdata}->threshold_validate(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}, value => $self->{option_results}->{$name})) == 0) {
+                $self->{output}->add_option_msg(short_msg => "Wrong " . $maps_counters->{$_}->{thresholds}->{$name}->{label} . " threshold '" . $self->{option_results}->{$name} . "'.");
+                $self->{output}->option_exit();
+            }
+        }
+    }
+}
+
+sub build_values {
+    my ($self, %options) = @_;
+    my $counters_value = {};
+    my $instance = undef;
+    
+    foreach my $oid (keys %oids) {
+        if ($options{current} =~ /^$oid\.(.*)/) {
+            $instance = $1;
+            last;
+        }
+    }
+    
+    # Skip already done
+    if (!defined($instance) || defined($self->{instances_done}->{$instance})) {
+        return 0;
+    }
+    
+    $self->{instances_done}->{$instance} = 1;
+    $self->{counters_value}->{$instance} = {};
+    foreach my $oid (keys %oids) {
+        $self->{counters_value}->{$instance}->{$oids{$oid}->{counter}} = defined($options{result}->{$oid . '.' . $instance}) ? $options{result}->{$oid . '.' . $instance} : 0;
+    }
+}
+
+sub run {
+    my ($self, %options) = @_;
+    # $options{snmp} = snmp object
+    $self->{snmp} = $options{snmp};
+    
+    my $oid_upsInputEntry = '.1.3.6.1.2.1.33.1.3.3.1';
+    my $result = $self->{snmp}->get_table(oid => $oid_upsInputEntry, nothing_quit => 1);
+    foreach my $key ($self->{snmp}->oid_lex_sort(keys %$result)) {
+        $self->build_values(current => $key, result => $result);
+    }
+
+    my $num = scalar(keys %{$self->{instances_done}});
+    foreach my $instance (keys %{$self->{instances_done}}) {
+        my $instance_output = $instance;
+        $instance_output =~ s/\./#/g;
+        
+        my @exits;
+        foreach (keys %{$maps_counters}) {
+            foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+                if (defined($self->{counters_value}->{$instance}->{$_}) && $self->{counters_value}->{$instance}->{$_} != 0) {
+                    push @exits, $self->{perfdata}->threshold_check(value => $self->{counters_value}->{$instance}->{$_}, threshold => [ { label => $maps_counters->{$_}->{thresholds}->{$name}->{label}, 'exit_litteral' => $maps_counters->{$_}->{thresholds}->{$name}->{exit_value} }]);
+                }
+            }
+        }
+
+        my $exit = $self->{output}->get_most_critical(status => [ @exits ]);
+        my $extra_label = '';
+        $extra_label = '_' . $instance_output if ($num > 1);
+
+        my $str_output = "Input Line '$instance_output' ";
+        my $str_append = '';
+        foreach (keys %{$maps_counters}) {
+            next if (!defined($self->{counters_value}->{$instance}->{$_}) || $self->{counters_value}->{$instance}->{$_} == 0);
+            
+            $str_output .= $str_append . sprintf($maps_counters->{$_}->{output_msg}, $self->{counters_value}->{$instance}->{$_} * $maps_counters->{$_}->{factor});
+            $str_append = ', ';
+            my ($warning, $critical);
+            foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+                $warning = $self->{perfdata}->get_perfdata_for_output(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}) if ($maps_counters->{$_}->{thresholds}->{$name}->{exit_value} eq 'warning');
+                $critical = $self->{perfdata}->get_perfdata_for_output(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}) if ($maps_counters->{$_}->{thresholds}->{$name}->{exit_value} eq 'critical');
+            }
+
+            $self->{output}->perfdata_add(label => $_ . $extra_label, unit => $maps_counters->{$_}->{unit},
+                                          value => sprintf("%.2f", $self->{counters_value}->{$instance}->{$_} * $maps_counters->{$_}->{factor}),
+                                          warning => $warning,
+                                          critical => $critical);
+        }
+        $self->{output}->output_add(severity => $exit,
+                                    short_msg => $str_output);
+    }
+                                  
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check Input lines metrics (frequence, voltage, current and true power).
+
+=over 8
+
+=item B<--warning-*>
+
+Threshold warning.
+Can be: 'frequence', 'voltage', 'current', 'power'.
+
+=item B<--critical-*>
+
+Threshold critical.
+Can be: 'frequence', 'voltage', 'current', 'power'.
+
+=back
+
+=cut
diff --git a/hardware/ups/standard/rfc1628/mode/outputlines.pm b/hardware/ups/standard/rfc1628/mode/outputlines.pm
new file mode 100644
index 000000000..bc867b949
--- /dev/null
+++ b/hardware/ups/standard/rfc1628/mode/outputlines.pm
@@ -0,0 +1,270 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package hardware::ups::standard::rfc1628::mode::outputlines;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+
+my %oids = (
+    '.1.3.6.1.2.1.33.1.4.4.1.5' => { counter => 'load', no_present => -1 }, # upsOutputPercentLoad
+    '.1.3.6.1.2.1.33.1.4.4.1.2' => { counter => 'voltage', no_present => 0 }, # in Volt upsOutputVoltage
+    '.1.3.6.1.2.1.33.1.4.4.1.3' => { counter => 'current', no_present => 0 }, # in dA upsOutputCurrent
+    '.1.3.6.1.2.1.33.1.4.4.1.4' => { counter => 'power', no_present => 0 }, # in Watt upsOutputPower
+);
+
+my $maps_counters = {
+    load   => { thresholds => {
+                                warning_frequence  =>  { label => 'warning-load', exit_value => 'warning' },
+                                critical_frequence =>  { label => 'critical-load', exit_value => 'critical' },
+                              },
+                output_msg => 'Load : %.2f %%',
+                factor => 1, unit => '%',
+               },
+    voltage => { thresholds => {
+                                warning_voltage  =>  { label => 'warning-voltage', exit_value => 'warning' },
+                                critical_voltage =>  { label => 'critical-voltage', exit_value => 'critical' },
+                                },
+                 output_msg => 'Voltage : %.2f V',
+                 factor => 1, unit => 'V',
+                },
+    current => { thresholds => {
+                                warning_current    =>  { label => 'warning-current', exit_value => 'warning' },
+                                critical_current   =>  { label => 'critical-current', exit_value => 'critical' },
+                                },
+                 output_msg => 'Current : %.2f A',
+                 factor => 0.1, unit => 'A',
+               },
+    power   => { thresholds => {
+                                warning_power  =>  { label => 'warning-power', exit_value => 'warning' },
+                                critical_power  =>  { label => 'critical-power', exit_value => 'critical' },
+                               },
+                 output_msg => 'Power : %.2f W',
+                 factor => 1, unit => 'W',
+                },
+};
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+                                {
+                                "warning-stdev-3phases:s"            => { name => 'warning_stdev' },
+                                "critical-stdev-3phases:s"           => { name => 'critical_stdev' },
+                                });
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            $options{options}->add_options(arguments => {
+                                                         $maps_counters->{$_}->{thresholds}->{$name}->{label} . ':s'    => { name => $name },
+                                                        });
+        }
+    }
+
+    $self->{counters_value} = {};
+    $self->{instances_done} = {};
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+
+    if (($self->{perfdata}->threshold_validate(label => 'warning-stdev-3phases', value => $self->{option_results}->{warning_stdev})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong warning-stdev-3phases threshold '" . $self->{option_results}->{warning_stdev} . "'.");
+        $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical-stdev-3phases', value => $self->{option_results}->{critical_stdev})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong critical-stdev-3phases threshold '" . $self->{option_results}->{critical_stdev} . "'.");
+        $self->{output}->option_exit();
+    }
+    
+    foreach (keys %{$maps_counters}) {
+        foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+            if (($self->{perfdata}->threshold_validate(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}, value => $self->{option_results}->{$name})) == 0) {
+                $self->{output}->add_option_msg(short_msg => "Wrong " . $maps_counters->{$_}->{thresholds}->{$name}->{label} . " threshold '" . $self->{option_results}->{$name} . "'.");
+                $self->{output}->option_exit();
+            }
+        }
+    }
+}
+
+sub build_values {
+    my ($self, %options) = @_;
+    my $counters_value = {};
+    my $instance = undef;
+    
+    foreach my $oid (keys %oids) {
+        if ($options{current} =~ /^$oid\.(.*)/) {
+            $instance = $1;
+            last;
+        }
+    }
+    
+    # Skip already done
+    if (!defined($instance) || defined($self->{instances_done}->{$instance})) {
+        return 0;
+    }
+    
+    $self->{instances_done}->{$instance} = 1;
+    $self->{counters_value}->{$instance} = {};
+    foreach my $oid (keys %oids) {
+        $self->{counters_value}->{$instance}->{$oids{$oid}->{counter}} = defined($options{result}->{$oid . '.' . $instance}) ? $options{result}->{$oid . '.' . $instance} : $oids{$oid}->{no_present};
+    }
+}
+
+sub stdev {
+    my ($self, %options) = @_;
+    
+    # Calculate stdev
+    my $total = 0;
+    my $num_present = 0;
+    foreach my $instance (keys %{$self->{instances_done}}) {
+        next if ($self->{counters_value}->{$instance}->{load} == -1); # Not present
+        $total += $self->{counters_value}->{$instance}->{load};
+        $num_present++;
+    }
+    my $mean = $total / $num_present;
+    $total = 0;
+    foreach my $instance (keys %{$self->{instances_done}}) {
+        next if ($self->{counters_value}->{$instance}->{load} == -1); # Not present
+        $total = ($mean - $self->{counters_value}->{$instance}->{load}) ** 2; 
+    }
+    my $stdev = sqrt($total / $num_present);
+    
+    my $exit = $self->{perfdata}->threshold_check(value => $stdev, threshold => [ { label => 'critical-stdev-3phases', 'exit_litteral' => 'critical' }, { label => 'warning-stdev-3phases', exit_litteral => 'warning' } ]);
+    $self->{output}->output_add(severity => $exit,
+                                short_msg => sprintf("Load Standard Deviation : %.2f", $stdev));
+    
+    $self->{output}->perfdata_add(label => 'stdev',
+                                  value => sprintf("%.2f", $stdev),
+                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-stdev-3phases'),
+                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical-stdev-3phases'));
+}
+
+sub run {
+    my ($self, %options) = @_;
+    # $options{snmp} = snmp object
+    $self->{snmp} = $options{snmp};
+    
+    my $oid_upsOutputEntry = '.1.3.6.1.2.1.33.1.4.4.1';
+    my $result = $self->{snmp}->get_table(oid => $oid_upsOutputEntry, nothing_quit => 1);
+    foreach my $key ($self->{snmp}->oid_lex_sort(keys %$result)) {
+        $self->build_values(current => $key, result => $result);
+    }
+
+    my $num = scalar(keys %{$self->{instances_done}});
+    foreach my $instance (keys %{$self->{instances_done}}) {
+        my $instance_output = $instance;
+        $instance_output =~ s/\./#/g;
+        
+        my @exits;
+        foreach (keys %{$maps_counters}) {
+            foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+                if (defined($self->{counters_value}->{$instance}->{$_}) && $self->{counters_value}->{$instance}->{$_} != 0) {
+                    push @exits, $self->{perfdata}->threshold_check(value => $self->{counters_value}->{$instance}->{$_}, threshold => [ { label => $maps_counters->{$_}->{thresholds}->{$name}->{label}, 'exit_litteral' => $maps_counters->{$_}->{thresholds}->{$name}->{exit_value} }]);
+                }
+            }
+        }
+
+        my $exit = $self->{output}->get_most_critical(status => [ @exits ]);
+        my $extra_label = '';
+        $extra_label = '_' . $instance_output if ($num > 1);
+
+        my $str_output = "Output Line '$instance_output' ";
+        my $str_append = '';
+        foreach (keys %{$maps_counters}) {
+            next if (!defined($self->{counters_value}->{$instance}->{$_}) || $self->{counters_value}->{$instance}->{$_} <= 0);
+            
+            $str_output .= $str_append . sprintf($maps_counters->{$_}->{output_msg}, $self->{counters_value}->{$instance}->{$_} * $maps_counters->{$_}->{factor});
+            $str_append = ', ';
+            my ($warning, $critical);
+            foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
+                $warning = $self->{perfdata}->get_perfdata_for_output(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}) if ($maps_counters->{$_}->{thresholds}->{$name}->{exit_value} eq 'warning');
+                $critical = $self->{perfdata}->get_perfdata_for_output(label => $maps_counters->{$_}->{thresholds}->{$name}->{label}) if ($maps_counters->{$_}->{thresholds}->{$name}->{exit_value} eq 'critical');
+            }
+
+            $self->{output}->perfdata_add(label => $_ . $extra_label, unit => $maps_counters->{$_}->{unit},
+                                          value => sprintf("%.2f", $self->{counters_value}->{$instance}->{$_} * $maps_counters->{$_}->{factor}),
+                                          warning => $warning,
+                                          critical => $critical);
+        }
+        $self->{output}->output_add(severity => $exit,
+                                    short_msg => $str_output);
+    }
+    
+    if ($num > 1) {
+        $self->stdev();
+    }
+                                  
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check Output lines metrics (load, voltage, current and true power).
+
+=over 8
+
+=item B<--warning-*>
+
+Threshold warning.
+Can be: 'load', 'voltage', 'current', 'power'.
+
+=item B<--critical-*>
+
+Threshold critical.
+Can be: 'load', 'voltage', 'current', 'power'.
+
+=item B<--warning-stdev-3phases>
+
+Threshold warning for standard deviation of 3 phases.
+
+=item B<--critical-stdev-3phases>
+
+Threshold critical for standard deviation of 3 phases.
+
+=back
+
+=cut
diff --git a/hardware/ups/standard/rfc1628/mode/outputsource.pm b/hardware/ups/standard/rfc1628/mode/outputsource.pm
new file mode 100644
index 000000000..486460fd2
--- /dev/null
+++ b/hardware/ups/standard/rfc1628/mode/outputsource.pm
@@ -0,0 +1,100 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package hardware::ups::standard::rfc1628::mode::outputsource;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+
+my %outputsource_status = (
+    1 => ['other', 'UNKNOWN'], 
+    2 => ['none', 'CRITICAL'], 
+    3 => ['normal', 'OK'], 
+    4 => ['bypass', 'WARNING'],
+    5 => ['battery', 'WARNING'],
+    6 => ['booster', 'WARNING'],
+    7 => ['reducer', 'WARNING'],
+);
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+                                { 
+                                });
+
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+}
+
+sub run {
+    my ($self, %options) = @_;
+    # $options{snmp} = snmp object
+    $self->{snmp} = $options{snmp};
+    
+    my $oid_upsOutputSource = '.1.3.6.1.2.1.33.1.4.1.0';
+    
+    my $result = $self->{snmp}->get_leef(oids => [$oid_upsOutputSource], nothing_quit => 1);
+    my $status = $result->{'.1.3.6.1.2.1.33.1.4.1.0'};
+  
+    $self->{output}->output_add(severity => ${$outputsource_status{$status}}[1],
+                                short_msg => sprintf("Output source status is %s", ${$outputsource_status{$status}}[0]));
+
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check output source status.
+
+=over 8
+
+=back
+
+=cut
diff --git a/hardware/ups/standard/rfc1628/plugin.pm b/hardware/ups/standard/rfc1628/plugin.pm
index 747969846..40d371090 100644
--- a/hardware/ups/standard/rfc1628/plugin.pm
+++ b/hardware/ups/standard/rfc1628/plugin.pm
@@ -47,7 +47,11 @@ sub new {
 
     $self->{version} = '0.1';
     %{$self->{modes}} = (
-                         'battery-status'            => 'hardware::ups::standard::rfc1628::mode::batterystatus',
+                         'battery-status'   => 'hardware::ups::standard::rfc1628::mode::batterystatus',
+                         'input-lines'      => 'hardware::ups::standard::rfc1628::mode::inputlines',
+                         'output-lines'     => 'hardware::ups::standard::rfc1628::mode::outputlines',
+                         'output-source'    => 'hardware::ups::standard::rfc1628::mode::outputsource',
+                         'alarms'           => 'hardware::ups::standard::rfc1628::mode::alarms',
                          );
 
     return $self;
diff --git a/network/aruba/7200/plugin.pm b/network/aruba/7200/plugin.pm
new file mode 100644
index 000000000..a485d5fb1
--- /dev/null
+++ b/network/aruba/7200/plugin.pm
@@ -0,0 +1,70 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package network::aruba::7200::plugin;
+
+use strict;
+use warnings;
+use base qw(centreon::plugins::script_snmp);
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    # $options->{options} = options object
+
+    $self->{version} = '1.0';
+    %{$self->{modes}} = (
+                         'cpu'              => 'network::aruba::common::mode::cpu',
+                         'hardware'         => 'network::aruba::common::mode::hardware',
+                         'list-interfaces'  => 'snmp_standard::mode::listinterfaces',
+                         'packet-errors'    => 'snmp_standard::mode::packeterrors',
+                         'traffic'          => 'snmp_standard::mode::traffic',
+                         'memory'           => 'network::aruba::common::mode::memory',
+                         'storage'          => 'network::aruba::common::mode::storage',
+                         );
+
+    return $self;
+}
+
+1;
+
+__END__
+
+=head1 PLUGIN DESCRIPTION
+
+Check Aruba 7200 series in SNMP.
+
+=cut
diff --git a/network/aruba/common/mode/components/fan.pm b/network/aruba/common/mode/components/fan.pm
new file mode 100644
index 000000000..e3dabce0b
--- /dev/null
+++ b/network/aruba/common/mode/components/fan.pm
@@ -0,0 +1,78 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package network::aruba::common::mode::components::fan;
+
+use strict;
+use warnings;
+
+my %map_status = (
+    1 => 'active',
+    2 => 'inactive'
+);
+
+sub check {
+    my ($self) = @_;
+
+    $self->{components}->{fans} = {name => 'fans', total => 0};
+    $self->{output}->output_add(long_msg => "Checking fans");
+    return if ($self->check_exclude(section => 'fans'));
+    
+    my $oid_wlsxSysExtFanEntry = '.1.3.6.1.4.1.14823.2.2.1.2.1.17.1';
+    my $oid_sysExtFanStatus = '.1.3.6.1.4.1.14823.2.2.1.2.1.17.1.2';
+    
+    my $result = $self->{snmp}->get_table(oid => $oid_wlsxSysExtFanEntry);
+    return if (scalar(keys %$result) <= 0);
+
+    foreach my $key ($self->{snmp}->oid_lex_sort(keys %$result)) {
+        next if ($key !~ /^$oid_sysExtFanStatus\.(\d+)$/);
+        my $instance = $1;
+    
+        next if ($self->check_exclude(section => 'fans', instance => $instance));
+    
+        my $status = $result->{$oid_sysExtFanStatus . '.' . $instance};
+
+        $self->{components}->{fans}->{total}++;
+        $self->{output}->output_add(long_msg => sprintf("Fan '%s' status is %s.", 
+                                                        $instance, $map_status{$status}));
+        if ($status != 1) {
+            $self->{output}->output_add(severity =>  'CRITICAL',
+                                        short_msg => sprintf("Fan '%s' status is %s", 
+                                                             $instance, $map_status{$status}));
+        }
+    }
+}
+
+1;
\ No newline at end of file
diff --git a/network/aruba/common/mode/components/module.pm b/network/aruba/common/mode/components/module.pm
new file mode 100644
index 000000000..b5138d097
--- /dev/null
+++ b/network/aruba/common/mode/components/module.pm
@@ -0,0 +1,100 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package network::aruba::common::mode::components::module;
+
+use strict;
+use warnings;
+
+my %map_card_type = (
+    1 => 'lc1',
+	2 => 'lc2',
+    3 => 'sc1',
+    4 => 'sc2',
+    5 => 'sw2400',
+    6 => 'sw800',
+    7 => 'sw200',
+    8 => 'm3mk1',
+    9 => 'sw3200',
+    10 => 'sw3400',
+    11 => 'sw3600',
+    12 => 'sw650',
+    13 => 'sw651',
+    14 => 'reserved1',
+    15 => 'reserved2',
+    16 => 'sw620',
+    17 => 'sw3500'
+);
+
+my %map_status = (
+    1 => 'active',
+    2 => 'inactive'
+);
+
+sub check {
+    my ($self) = @_;
+
+    $self->{components}->{modules} = {name => 'modules', total => 0};
+    $self->{output}->output_add(long_msg => "Checking modules");
+    return if ($self->check_exclude(section => 'modules'));
+    
+    my $oid_wlsxSysExtCardEntry = '.1.3.6.1.4.1.14823.2.2.1.2.1.16.1';
+    my $oid_sysExtCardType = '.1.3.6.1.4.1.14823.2.2.1.2.1.16.1.2';
+    my $oid_sysExtCardStatus = '.1.3.6.1.4.1.14823.2.2.1.2.1.16.1.12';
+    
+    my $result = $self->{snmp}->get_table(oid => $oid_wlsxSysExtCardEntry);
+    return if (scalar(keys %$result) <= 0);
+
+    foreach my $key ($self->{snmp}->oid_lex_sort(keys %$result)) {
+        next if ($key !~ /^$oid_sysExtCardStatus\.(\d+)$/);
+        my $instance = $1;
+    
+        next if ($self->check_exclude(section => 'modules', instance => $instance));
+    
+        my $type = $result->{$oid_sysExtCardType . '.' . $instance};
+        my $status = $result->{$oid_sysExtCardStatus . '.' . $instance};
+
+        $self->{components}->{modules}->{total}++;
+        $self->{output}->output_add(long_msg => sprintf("Module '%s' status is %s [instance: %s].", 
+                                    $map_card_type{$type}, $map_status{$status}, $instance));
+        if ($status != 1) {
+            $self->{output}->output_add(severity =>  'CRITICAL',
+                                        short_msg => sprintf("Module '%s' status is %s", 
+                                                             $map_card_type{$type}, $map_status{$status}));
+        }
+    }
+}
+
+1;
\ No newline at end of file
diff --git a/network/aruba/common/mode/components/psu.pm b/network/aruba/common/mode/components/psu.pm
new file mode 100644
index 000000000..ffee3ec13
--- /dev/null
+++ b/network/aruba/common/mode/components/psu.pm
@@ -0,0 +1,78 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package network::aruba::common::mode::components::psu;
+
+use strict;
+use warnings;
+
+my %map_status = (
+    1 => 'active',
+    2 => 'inactive'
+);
+
+sub check {
+    my ($self) = @_;
+
+    $self->{components}->{psus} = {name => 'psus', total => 0};
+    $self->{output}->output_add(long_msg => "Checking power supplies");
+    return if ($self->check_exclude(section => 'psus'));
+    
+    my $oid_wlsxSysExtPowerSupplyEntry = '.1.3.6.1.4.1.14823.2.2.1.2.1.18.1';
+    my $oid_sysExtPowerSupplyStatus = '.1.3.6.1.4.1.14823.2.2.1.2.1.18.1.2';
+    
+    my $result = $self->{snmp}->get_table(oid => $oid_wlsxSysExtPowerSupplyEntry);
+    return if (scalar(keys %$result) <= 0);
+
+    foreach my $key ($self->{snmp}->oid_lex_sort(keys %$result)) {
+        next if ($key !~ /^$oid_sysExtPowerSupplyStatus\.(\d+)$/);
+        my $instance = $1;
+    
+        next if ($self->check_exclude(section => 'psus', instance => $instance));
+    
+        my $status = $result->{$oid_sysExtPowerSupplyStatus . '.' . $instance};
+     
+        $self->{components}->{psus}->{total}++;
+        $self->{output}->output_add(long_msg => sprintf("Power Supply '%s' status is %s.", 
+                                                        $instance, $map_status{$status}));
+        if ($status != 1) {
+            $self->{output}->output_add(severity =>  'CRITICAL',
+                                        short_msg => sprintf("Power Supply '%s' status is %s", 
+                                                             $instance, $map_status{$status}));
+        }
+    }
+}
+
+1;
\ No newline at end of file
diff --git a/network/aruba/common/mode/cpu.pm b/network/aruba/common/mode/cpu.pm
new file mode 100644
index 000000000..f17f5275c
--- /dev/null
+++ b/network/aruba/common/mode/cpu.pm
@@ -0,0 +1,135 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package network::aruba::common::mode::cpu;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+                                {
+                                  "warning:s"               => { name => 'warning', },
+                                  "critical:s"              => { name => 'critical', },
+                                });
+
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+
+    if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{option_results}->{warning})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'.");
+       $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'.");
+       $self->{output}->option_exit();
+    }
+}
+
+sub run {
+    my ($self, %options) = @_;
+    # $options{snmp} = snmp object
+    $self->{snmp} = $options{snmp};
+
+    my $oid_wlsxSysExtProcessorEntry = '.1.3.6.1.4.1.14823.2.2.1.2.1.13.1';
+    my $oid_sysExtProcessorDescr = '.1.3.6.1.4.1.14823.2.2.1.2.1.13.1.2';
+    my $oid_sysExtProcessorLoad = '.1.3.6.1.4.1.14823.2.2.1.2.1.13.1.3';
+    my $result = $self->{snmp}->get_table(oid => $oid_wlsxSysExtProcessorEntry, nothing_quit => 1);
+    
+    $self->{output}->output_add(severity => 'OK',
+                                short_msg => 'All CPUs are ok.');
+    
+    foreach my $oid (keys %$result) {
+        next if ($oid !~ /^$oid_sysExtProcessorLoad/);
+        $oid =~ /\.([0-9]+)$/;
+        my $instance = $1;
+        my $load = $result->{$oid};
+        my $descr = $result->{$oid_sysExtProcessorDescr . '.' . $instance};
+        
+        my $exit = $self->{perfdata}->threshold_check(value => $load, 
+                               threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
+        
+        $self->{output}->output_add(long_msg => sprintf("CPU '%s': %.2f%% (1min)", $descr,
+                                                        $load));
+        if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
+             $self->{output}->output_add(severity => $exit,
+                                         short_msg => sprintf("CPU '%s': %.2f%% (1min)", $descr,
+                                                              $load));
+        }
+        
+        $self->{output}->perfdata_add(label => "cpu_" . $instance, unit => '%',
+                                      value => $load,
+                                      warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
+                                      critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'),
+                                      min => 0, max => 100);
+    }
+    
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check cpu usage (over the last minute) (aruba-systemext).
+
+=over 8
+
+=item B<--warning>
+
+Threshold warning in percent.
+
+=item B<--critical>
+
+Threshold critical in percent.
+
+=back
+
+=cut
+    
\ No newline at end of file
diff --git a/network/aruba/common/mode/hardware.pm b/network/aruba/common/mode/hardware.pm
new file mode 100644
index 000000000..41db0befb
--- /dev/null
+++ b/network/aruba/common/mode/hardware.pm
@@ -0,0 +1,153 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package network::aruba::common::mode::hardware;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+
+use network::aruba::common::mode::components::fan;
+use network::aruba::common::mode::components::module;
+use network::aruba::common::mode::components::psu;
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+                                { 
+                                  "exclude:s"        => { name => 'exclude' },
+                                  "component:s"      => { name => 'component', default => 'all' },
+                                });
+    $self->{components} = {};
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+}
+
+sub global {
+    my ($self, %options) = @_;
+
+    network::aruba::common::mode::components::fan::check($self);
+    network::aruba::common::mode::components::module::check($self);
+    network::aruba::common::mode::components::psu::check($self);
+}
+
+sub run {
+    my ($self, %options) = @_;
+    # $options{snmp} = snmp object
+    $self->{snmp} = $options{snmp};
+    
+    if ($self->{option_results}->{component} eq 'all') {
+        $self->global();
+    } elsif ($self->{option_results}->{component} eq 'fan') {
+        network::aruba::common::mode::components::fan::check($self);
+    } elsif ($self->{option_results}->{component} eq 'module') {
+        network::aruba::common::mode::components::module::check($self);
+    } elsif ($self->{option_results}->{component} eq 'psu') {
+        network::aruba::common::mode::components::psu::check($self);
+    } else {
+        $self->{output}->add_option_msg(short_msg => "Wrong option. Cannot find component '" . $self->{option_results}->{component} . "'.");
+        $self->{output}->option_exit();
+    }
+    
+    my $total_components = 0;
+    my $display_by_component = '';
+    my $display_by_component_append = '';
+    foreach my $comp (sort(keys %{$self->{components}})) {
+        # Skipping short msg when no components
+        next if ($self->{components}->{$comp}->{total} == 0);
+        $total_components += $self->{components}->{$comp}->{total};
+        $display_by_component .= $display_by_component_append . $self->{components}->{$comp}->{total} . ' ' . $self->{components}->{$comp}->{name};
+        $display_by_component_append = ', ';
+    }
+    
+    $self->{output}->output_add(severity => 'OK',
+                                short_msg => sprintf("All %s components [%s] are ok.", 
+                                                     $total_components,
+                                                     $display_by_component
+                                                    )
+                                );
+    
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+sub check_exclude {
+    my ($self, %options) = @_;
+
+    if (defined($options{instance})) {
+        if (defined($self->{option_results}->{exclude}) && $self->{option_results}->{exclude} =~ /(^|\s|,)${options{section}}[^,]*#$options{instance}#/) {
+            $self->{output}->output_add(long_msg => sprintf("Skipping $options{section} section $options{instance} instance."));
+            return 1;
+        }
+    } elsif (defined($self->{option_results}->{exclude}) && $self->{option_results}->{exclude} =~ /(^|\s|,)$options{section}(\s|,|$)/) {
+        $self->{output}->output_add(long_msg => sprintf("Skipping $options{section} section."));
+        return 1;
+    }
+    return 0;
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check hardware (modules, fans, power supplies).
+
+=over 8
+
+=item B<--component>
+
+Which component to check (Default: 'all').
+Can be: 'fan', 'psu', 'module'.
+
+=item B<--exclude>
+
+Exclude some parts (comma seperated list) (Example: --exclude=fans,modules)
+Can also exclude specific instance: --exclude=fans#1#2#,modules#1#,psus
+
+=back
+
+=cut
+    
\ No newline at end of file
diff --git a/network/aruba/common/mode/memory.pm b/network/aruba/common/mode/memory.pm
new file mode 100644
index 000000000..1a52f7c22
--- /dev/null
+++ b/network/aruba/common/mode/memory.pm
@@ -0,0 +1,159 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package network::aruba::common::mode::memory;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+                                {
+                                  "warning:s"               => { name => 'warning' },
+                                  "critical:s"              => { name => 'critical' },
+                                });
+
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+    
+    if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{option_results}->{warning})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'.");
+       $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'.");
+       $self->{output}->option_exit();
+    }
+}
+
+sub run {
+    my ($self, %options) = @_;
+    # $options{snmp} = snmp object
+    $self->{snmp} = $options{snmp};
+
+    my $oid_wlsxSysExtMemoryEntry = '.1.3.6.1.4.1.14823.2.2.1.2.1.15.1';
+    my $oid_sysExtMemoryUsed = '.1.3.6.1.4.1.14823.2.2.1.2.1.15.1.3'; # in KB
+    my $oid_sysExtMemoryFree = '.1.3.6.1.4.1.14823.2.2.1.2.1.15.1.4'; # in KB
+    my $result = $self->{snmp}->get_table(oid => $oid_wlsxSysExtMemoryEntry, nothing_quit => 1);
+    my $mode = 0;
+    
+    if (scalar(keys %$result) > 3) {
+        # Not Only Control Processor memory
+        $mode = 1;
+        $self->{output}->output_add(severity => 'OK',
+                                    short_msg => 'All pool memories are ok.');
+    }
+    
+    foreach my $oid (keys %$result) {
+        next if ($oid !~ /^$oid_sysExtMemoryFree/);
+        $oid =~ /\.([0-9]+)$/;
+        
+        my $memory_name = ($mode == 1) ? $1 : 'Control Processor';
+        my $memory_used = $result->{$oid_sysExtMemoryUsed . '.' . $1} * 1024;
+        my $memory_free =$result->{$oid_sysExtMemoryFree . '.' . $1} * 1024;
+        
+        my $total_size = $memory_used + $memory_free;
+        my $prct_used = $memory_used * 100 / $total_size;
+        my $prct_free = 100 - $prct_used;
+        
+        my $exit = $self->{perfdata}->threshold_check(value => $prct_used, threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
+        my ($total_value, $total_unit) = $self->{perfdata}->change_bytes(value => $total_size);
+        my ($used_value, $used_unit) = $self->{perfdata}->change_bytes(value => $memory_used);
+        my ($free_value, $free_unit) = $self->{perfdata}->change_bytes(value => $memory_free);
+        
+        $self->{output}->output_add(long_msg => sprintf("Memory '%s' Total: %s Used: %s (%.2f%%) Free: %s (%.2f%%)", $memory_name,
+                                            $total_value . " " . $total_unit,
+                                            $used_value . " " . $used_unit, $prct_used,
+                                            $free_value . " " . $free_unit, $prct_free));
+        if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1) || $mode == 0) {
+             $self->{output}->output_add(severity => $exit,
+                                        short_msg => sprintf("Memory '%s' Total: %s Used: %s (%.2f%%) Free: %s (%.2f%%)", $memory_name,
+                                            $total_value . " " . $total_unit,
+                                            $used_value . " " . $used_unit, $prct_used,
+                                            $free_value . " " . $free_unit, $prct_free));
+        }
+        
+        if ($mode == 1) {
+            $self->{output}->perfdata_add(label => "used_" . $memory_name,
+                                          value => $memory_used,
+                                          warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning', total => $total_size),
+                                          critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical', total => $total_size),
+                                          min => 0, max => $total_size);
+        } else {
+            $self->{output}->perfdata_add(label => "used",
+                                          value => $memory_used,
+                                          warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning', total => $total_size),
+                                          critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical', total => $total_size),
+                                          min => 0, max => $total_size);
+        }
+    }
+    
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check memory usage (aruba-systemext).
+
+=over 8
+
+=item B<--warning>
+
+Threshold warning in percent.
+
+=item B<--critical>
+
+Threshold critical in percent.
+
+=back
+
+=cut
+    
\ No newline at end of file
diff --git a/network/aruba/common/mode/storage.pm b/network/aruba/common/mode/storage.pm
new file mode 100644
index 000000000..2900a93c6
--- /dev/null
+++ b/network/aruba/common/mode/storage.pm
@@ -0,0 +1,183 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package network::aruba::common::mode::storage;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+
+my %map_storage_type = (
+    1 => 'ram',
+    2 => 'flashMemory'
+);
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+                                { 
+                                  "warning:s"       => { name => 'warning' },
+                                  "critical:s"      => { name => 'critical' },
+                                  "filter-name:s"   => { name => 'filter_name' },
+                                  "filter-type:s"   => { name => 'filter_type' },
+                                });
+                                
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+    
+    if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{option_results}->{warning})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'.");
+        $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'.");
+        $self->{output}->option_exit();
+    }
+}
+
+sub run {
+    my ($self, %options) = @_;
+    # $options{snmp} = snmp object
+    $self->{snmp} = $options{snmp};
+    
+    my $oid_wlsxSysExtStorageEntry = '.1.3.6.1.4.1.14823.2.2.1.2.1.14.1';
+    my $oid_sysExtStorageType = '.1.3.6.1.4.1.14823.2.2.1.2.1.14.1.2';
+    my $oid_sysExtStorageName = '.1.3.6.1.4.1.14823.2.2.1.2.1.14.1.5';
+    my $oid_sysExtStorageSize = '.1.3.6.1.4.1.14823.2.2.1.2.1.14.1.3'; # MB
+    my $oid_sysExtStorageUsed = '.1.3.6.1.4.1.14823.2.2.1.2.1.14.1.4'; # MB
+    
+    my $storage_num = 0;
+    my $result = $self->{snmp}->get_table(oid => $oid_wlsxSysExtStorageEntry, nothing_quit => 1);
+
+    $self->{output}->output_add(severity => 'OK',
+                                short_msg => 'All storages are ok.');
+    
+    foreach my $oid (keys %$result) {
+        next if ($oid !~ /^$oid_sysExtStorageSize/);
+        $oid =~ /\.([0-9]+)$/;
+        
+        my $name = $result->{$oid_sysExtStorageName . '.' . $1};
+        my $type = $result->{$oid_sysExtStorageType . '.' . $1};;
+        my $total_used = $result->{$oid_sysExtStorageUsed . '.' . $1} * 1024 * 1024;
+        my $total_size = $result->{$oid_sysExtStorageSize . '.' . $1} * 1024 * 1024;
+        
+        if (defined($self->{option_results}->{filter_name}) && $self->{option_results}->{filter_name} ne '' &&
+            $name !~ /$self->{option_results}->{filter_name}/) {
+            $self->{output}->output_add(long_msg => sprintf("Skipping storage '%s'.", $name));
+            next;
+        }
+        if (defined($self->{option_results}->{filter_type}) && $self->{option_results}->{filter_type} ne '' &&
+            $map_storage_type{$type} !~ /$self->{option_results}->{filter_type}/i) {
+            $self->{output}->output_add(long_msg => sprintf("Skipping storage '%s'.", $name));
+            next;
+        }
+        
+        $storage_num++;
+        my $total_free = $total_size - $total_used;
+        my $prct_used = $total_used * 100 / $total_size;
+        my $prct_free = 100 - $prct_used;
+        
+        my $exit = $self->{perfdata}->threshold_check(value => $prct_used, threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
+        my ($total_size_value, $total_size_unit) = $self->{perfdata}->change_bytes(value => $total_size);
+        my ($total_used_value, $total_used_unit) = $self->{perfdata}->change_bytes(value => $total_used);
+        my ($total_free_value, $total_free_unit) = $self->{perfdata}->change_bytes(value => $total_free);
+        
+        $self->{output}->output_add(long_msg => sprintf("Storage '%s' Total: %s Used: %s (%.2f%%) Free: %s (%.2f%%)", $name,
+                                                        $total_size_value . " " . $total_size_unit,
+                                                        $total_used_value . " " . $total_used_unit, $prct_used,
+                                                        $total_free_value . " " . $total_free_unit, $prct_free));
+        if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
+            $self->{output}->output_add(severity => $exit,
+                                        short_msg => sprintf("Storage '%s' Total: %s Used: %s (%.2f%%) Free: %s (%.2f%%)", $name,
+                                                             $total_size_value . " " . $total_size_unit,
+                                                             $total_used_value . " " . $total_used_unit, $prct_used,
+                                                             $total_free_value . " " . $total_free_unit, $prct_free));
+        }    
+
+        $self->{output}->perfdata_add(label => 'used_' . $name, unit => 'B',
+                                      value => $total_used,
+                                      warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning', total => $total_size, cast_int => 1),
+                                      critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical', total => $total_size, cast_int => 1),
+                                      min => 0, max => $total_size);
+    }
+    
+    if ($storage_num == 0) {
+        $self->{output}->add_option_msg(short_msg => "No storage information found (maybe your filters)");
+        $self->{output}->option_exit();
+    }
+    
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check storage device usage (aruba-systemext).
+
+=over 8
+
+=item B<--warning>
+
+Threshold warning in percent.
+
+=item B<--critical>
+
+Threshold critical in percent.
+
+=item B<--filter-name>
+
+Filter storage device name (regexp can be used).
+
+=item B<--filter-type>
+
+Filter storage device type (regexp can be used).
+Can use: 'ram', 'flashMemory'
+
+=back
+
+=cut
diff --git a/network/bluecoat/mode/clientrequests.pm b/network/bluecoat/mode/clientrequests.pm
index 061038749..beafd3d6d 100644
--- a/network/bluecoat/mode/clientrequests.pm
+++ b/network/bluecoat/mode/clientrequests.pm
@@ -122,6 +122,7 @@ sub run {
     if (!defined($old_timestamp) || !defined($old_client_http_misses)) {
         $self->{output}->output_add(severity => 'OK',
                                     short_msg => "Buffer creation...");
+        $self->{output}->display();
         $self->{output}->exit();
     }
         
diff --git a/network/bluecoat/mode/clienttraffic.pm b/network/bluecoat/mode/clienttraffic.pm
index 78823d48c..13d68e52f 100644
--- a/network/bluecoat/mode/clienttraffic.pm
+++ b/network/bluecoat/mode/clienttraffic.pm
@@ -114,6 +114,7 @@ sub run {
     if (!defined($old_timestamp) || !defined($old_client_in_bytes)) {
         $self->{output}->output_add(severity => 'OK',
                                     short_msg => "Buffer creation...");
+        $self->{output}->display();
         $self->{output}->exit();
     }
         
diff --git a/network/cisco/asa/mode/failover.pm b/network/cisco/asa/mode/failover.pm
index bf7217733..a4a0a2a76 100644
--- a/network/cisco/asa/mode/failover.pm
+++ b/network/cisco/asa/mode/failover.pm
@@ -119,7 +119,7 @@ __END__
 
 =head1 MODE
 
-Check current/average connections on Cisco ASA (CISCO-UNIFIED-FIREWALL-MIB).
+Check failover status on Cisco ASA (CISCO-UNIFIED-FIREWALL-MIB).
 
 =over 8
 
diff --git a/network/cisco/common/mode/memory.pm b/network/cisco/common/mode/memory.pm
index ed344f9ee..23b9fab5f 100644
--- a/network/cisco/common/mode/memory.pm
+++ b/network/cisco/common/mode/memory.pm
@@ -50,6 +50,7 @@ sub new {
                                 {
                                   "warning:s"               => { name => 'warning' },
                                   "critical:s"              => { name => 'critical' },
+                                  "filter-pool:s"           => { name => 'filter_pool' },
                                 });
 
     return $self;
@@ -86,6 +87,13 @@ sub run {
     foreach my $oid (keys %$result) {
         next if ($oid !~ /^$oid_ciscoMemoryPoolName/);
         $oid =~ /\.([0-9]+)$/;
+        
+        if (defined($self->{option_results}->{filter_pool}) && $self->{option_results}->{filter_pool} ne '' &&
+            $result->{$oid} !~ /$self->{option_results}->{filter_pool}/) {
+            $self->{output}->output_add(long_msg => "Skipping pool '" . $result->{$oid} . "'.");
+            next;
+        }
+        
         my $instance = $1;
         my $memory_name = $result->{$oid};
         my $memory_used = $result->{$oid_ciscoMemoryPoolUsed . '.' . $instance};
@@ -141,6 +149,10 @@ Threshold warning in percent.
 
 Threshold critical in percent.
 
+=item B<--filter-pool>
+
+Filter pool to check (can use regexp).
+
 =back
 
 =cut
diff --git a/network/citrix/netscaler/8000/plugin.pm b/network/citrix/netscaler/8000/plugin.pm
new file mode 100644
index 000000000..33474e23e
--- /dev/null
+++ b/network/citrix/netscaler/8000/plugin.pm
@@ -0,0 +1,65 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package network::citrix::netscaler::8000::plugin;
+
+use strict;
+use warnings;
+use base qw(centreon::plugins::script_snmp);
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    # $options->{options} = options object
+
+    $self->{version} = '0.5';
+    %{$self->{modes}} = (
+			'cpu' => 'network::citrix::netscaler::common::mode::cpu',
+			'memory' => 'network::citrix::netscaler::common::mode::memory'
+                         );
+
+    return $self;
+}
+
+1;
+
+__END__
+
+=head1 PLUGIN DESCRIPTION
+
+Check Citrix NetScaler 8000x Family in SNMP.
+
+=cut
diff --git a/network/citrix/netscaler/common/mode/cpu.pm b/network/citrix/netscaler/common/mode/cpu.pm
new file mode 100644
index 000000000..2d91fc30d
--- /dev/null
+++ b/network/citrix/netscaler/common/mode/cpu.pm
@@ -0,0 +1,119 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package network::citix::netscaler::common::mode::cpu;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+                                {
+                                  "warning:s"               => { name => 'warning', default => '' },
+                                  "critical:s"              => { name => 'critical', default => '' },
+                                });
+
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+    
+    if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{warning})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{warning} . "'.");
+       $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{critical})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{critical} . "'.");
+       $self->{output}->option_exit();
+    }
+}
+
+sub run {
+    my ($self, %options) = @_;
+    # $options{snmp} = snmp object
+    $self->{snmp} = $options{snmp};
+
+    my $oid_resCpuUsage = '.1.3.6.1.4.1.5951.4.1.1.41.1';
+    my $result = $self->{snmp}->get_leef(oid => $oid_resCpuUsage, nothing_quit => 1);
+    
+    my $exit = $self->{perfdata}->threshold_check(value => $result->{$oid_resCpuUsage},
+                                                  threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
+        
+    $self->{output}->output_add(severity => $exit,
+                                short_msg => sprintf("CPU Usage: %.2f%%", $result->{$oid_resCpuUsage}));
+    $self->{output}->perfdata_add(label => "cpu", unit => '%',
+                                  value => $result->{$oid_resCpuUsage},
+                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
+                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'),
+                                  min => 0, max => 100);
+
+    $self->{output}->display();
+    $self->{output}->exit();
+
+
+
+}
+    
+1;
+
+__END__
+
+=head1 MODE
+
+Check cpu usage (NS-MIB-smiv2).
+
+=over 8
+
+=item B<--warning>
+
+Threshold warning in percent.
+
+=item B<--critical>
+
+Threshold critical in percent.
+
+=back
+
+=cut
+    
diff --git a/network/citrix/netscaler/common/mode/memory.pm b/network/citrix/netscaler/common/mode/memory.pm
new file mode 100644
index 000000000..b31018cfe
--- /dev/null
+++ b/network/citrix/netscaler/common/mode/memory.pm
@@ -0,0 +1,119 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package network::citrix::netscaler::common::mode::memory;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+                                {
+                                  "warning:s"               => { name => 'warning', default => '' },
+                                  "critical:s"              => { name => 'critical', default => '' },
+                                });
+
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+    
+    if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{warning})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{warning} . "'.");
+       $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{critical})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{critical} . "'.");
+       $self->{output}->option_exit();
+    }
+}
+
+sub run {
+    my ($self, %options) = @_;
+    # $options{snmp} = snmp object
+    $self->{snmp} = $options{snmp};
+
+    my $oid_resMemUsage = '.1.3.6.1.4.1.5951.4.1.1.41.2';
+    my $result = $self->{snmp}->get_leef(oid => $oid_resMemUsage, nothing_quit => 1);
+    
+    my $exit = $self->{perfdata}->threshold_check(value => $result->{$oid_resMemUsage},
+                                                  threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
+        
+    $self->{output}->output_add(severity => $exit,
+                                short_msg => sprintf("Memory Usage: %.2f%%", $result->{$oid_resMemUsage}));
+    $self->{output}->perfdata_add(label => "memory", unit => '%',
+                                  value => $result->{$oid_resMemUsage},
+                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
+                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'),
+                                  min => 0, max => 100);
+
+    $self->{output}->display();
+    $self->{output}->exit();
+
+
+
+}
+    
+1;
+
+__END__
+
+=head1 MODE
+
+Check memory usage (NS-MIB-smiv2).
+
+=over 8
+
+=item B<--warning>
+
+Threshold warning in percent.
+
+=item B<--critical>
+
+Threshold critical in percent.
+
+=back
+
+=cut
+    
diff --git a/network/fortinet/fortigate/110C/plugin.pm b/network/fortinet/fortigate/110C/plugin.pm
index dfaa88f67..621ec15e7 100644
--- a/network/fortinet/fortigate/110C/plugin.pm
+++ b/network/fortinet/fortigate/110C/plugin.pm
@@ -33,7 +33,7 @@
 #
 ####################################################################################
 
-package network::fortinet::fortigate::200B::plugin;
+package network::fortinet::fortigate::110C::plugin;
 
 use strict;
 use warnings;
diff --git a/network/fortinet/fortigate/300B/plugin.pm b/network/fortinet/fortigate/300B/plugin.pm
index dfaa88f67..eac3fcbf6 100644
--- a/network/fortinet/fortigate/300B/plugin.pm
+++ b/network/fortinet/fortigate/300B/plugin.pm
@@ -33,7 +33,7 @@
 #
 ####################################################################################
 
-package network::fortinet::fortigate::200B::plugin;
+package network::fortinet::fortigate::300B::plugin;
 
 use strict;
 use warnings;
diff --git a/network/fortinet/fortigate/40B/plugin.pm b/network/fortinet/fortigate/40B/plugin.pm
index dfaa88f67..859995db2 100644
--- a/network/fortinet/fortigate/40B/plugin.pm
+++ b/network/fortinet/fortigate/40B/plugin.pm
@@ -33,7 +33,7 @@
 #
 ####################################################################################
 
-package network::fortinet::fortigate::200B::plugin;
+package network::fortinet::fortigate::40B::plugin;
 
 use strict;
 use warnings;
diff --git a/network/fortinet/fortigate/40C/plugin.pm b/network/fortinet/fortigate/40C/plugin.pm
index dfaa88f67..33c27526a 100644
--- a/network/fortinet/fortigate/40C/plugin.pm
+++ b/network/fortinet/fortigate/40C/plugin.pm
@@ -33,7 +33,7 @@
 #
 ####################################################################################
 
-package network::fortinet::fortigate::200B::plugin;
+package network::fortinet::fortigate::40C::plugin;
 
 use strict;
 use warnings;
diff --git a/network/fortinet/fortigate/common/mode/listvirtualdomains.pm b/network/fortinet/fortigate/common/mode/listvirtualdomains.pm
index 4bb73880c..432e29137 100644
--- a/network/fortinet/fortigate/common/mode/listvirtualdomains.pm
+++ b/network/fortinet/fortigate/common/mode/listvirtualdomains.pm
@@ -77,12 +77,16 @@ sub manage_selection {
             next;
         }
         
-        if (!defined($self->{option_results}->{use_regexp}) && $self->{result_names}->{$oid} eq $self->{option_results}->{name}) {
-            push @{$self->{virtualdomain_id_selected}}, $instance; 
+        if (!defined($self->{option_results}->{use_regexp}) && $self->{result_names}->{$oid} ne $self->{option_results}->{name}) {
+            $self->{output}->output_add(long_msg => "Skipping virtualdomain '" . $self->{result_names}->{$oid} . "': no matching filter name");
+            next;
         }
-        if (defined($self->{option_results}->{use_regexp}) && $self->{result_names}->{$oid} =~ /$self->{option_results}->{name}/) {
-            push @{$self->{virtualdomain_id_selected}}, $instance;
+        if (defined($self->{option_results}->{use_regexp}) && $self->{result_names}->{$oid} !~ /$self->{option_results}->{name}/) {
+            $self->{output}->output_add(long_msg => "Skipping virtualdomain '" . $self->{result_names}->{$oid} . "': no matching filter name (regexp)");
+            next;
         }
+        
+        push @{$self->{virtualdomain_id_selected}}, $instance; 
     }
 }
 
@@ -92,18 +96,15 @@ sub run {
     $self->{snmp} = $options{snmp};
 
     $self->manage_selection();
-    my $virtualdomains_display = '';
-    my $virtualdomains_display_append = '';
     foreach my $instance (sort @{$self->{virtualdomain_id_selected}}) { 
         my $name = $self->{result_names}->{$oid_fgVdEntName . '.' . $instance};
 
-        $virtualdomains_display .= $virtualdomains_display_append . "name = $name";
-        $virtualdomains_display_append = ', ';
+        $self->{output}->output_add(long_msg => "'" . $name . "'");
     }
     
     $self->{output}->output_add(severity => 'OK',
-                                short_msg => 'List virtualdomains: ' . $virtualdomains_display);
-    $self->{output}->display(nolabel => 1);
+                                short_msg => 'List virtualdomains:');
+    $self->{output}->display(nolabel => 1, force_ignore_perfdata => 1, force_long_output => 1);
     $self->{output}->exit();
 }
 
diff --git a/network/juniper/common/screenos/mode/components/fan.pm b/network/juniper/common/screenos/mode/components/fan.pm
new file mode 100644
index 000000000..75f8782b4
--- /dev/null
+++ b/network/juniper/common/screenos/mode/components/fan.pm
@@ -0,0 +1,78 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Stephane Duret 
+#
+####################################################################################
+
+package network::juniper::common::screenos::mode::components::fan;
+
+use strict;
+use warnings;
+
+my %map_status = (
+    1 => 'active',
+    2 => 'inactive'
+);
+
+sub check {
+    my ($self) = @_;
+
+    $self->{components}->{fans} = {name => 'fans', total => 0, skip => 0};
+    $self->{output}->output_add(long_msg => "Checking fans");
+    return if ($self->check_exclude(section => 'fans'));
+    
+    my $oid_nsFanEntry = '.1.3.6.1.4.1.3224.21.2.1';
+    my $oid_nsFanStatus = '.1.3.6.1.4.1.3224.21.2.1.2';
+    
+    my $result = $self->{snmp}->get_table(oid => $oid_nsFanEntry);
+    return if (scalar(keys %$result) <= 0);
+
+    foreach my $key ($self->{snmp}->oid_lex_sort(keys %$result)) {
+        next if ($key !~ /^$oid_nsFanStatus\.(\d+)$/);
+        my $instance = $1;
+    
+        next if ($self->check_exclude(section => 'fans', instance => $instance));
+    
+        my $status = $result->{$oid_nsFanStatus . '.' . $instance};
+
+        $self->{components}->{fans}->{total}++;
+        $self->{output}->output_add(long_msg => sprintf("Fan '%s' status is %s.", 
+                                                        $instance, $map_status{$status}));
+        if ($status != 1) {
+            $self->{output}->output_add(severity =>  'CRITICAL',
+                                        short_msg => sprintf("Fan '%s' status is %s", 
+                                                             $instance, $map_status{$status}));
+        }
+    }
+}
+
+1;
diff --git a/network/juniper/common/screenos/mode/components/module.pm b/network/juniper/common/screenos/mode/components/module.pm
new file mode 100644
index 000000000..97ef5a02a
--- /dev/null
+++ b/network/juniper/common/screenos/mode/components/module.pm
@@ -0,0 +1,80 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Stephane Duret 
+#
+####################################################################################
+
+package network::juniper::common::screenos::mode::components::module;
+
+use strict;
+use warnings;
+
+my %map_status = (
+    1 => 'active',
+    2 => 'inactive'
+);
+
+sub check {
+    my ($self) = @_;
+
+    $self->{components}->{modules} = {name => 'modules', total => 0, skip => 0};
+    $self->{output}->output_add(long_msg => "Checking modules");
+    return if ($self->check_exclude(section => 'modules'));
+    
+    my $oid_nsSlotEntry = '.1.3.6.1.4.1.3224.21.5.1';
+    my $oid_nsSlotType = '.1.3.6.1.4.1.3224.21.5.1.2';
+    my $oid_nsSlotStatus = '.1.3.6.1.4.1.3224.21.5.1.3';
+    
+    my $result = $self->{snmp}->get_table(oid => $oid_nsSlotEntry);
+    return if (scalar(keys %$result) <= 0);
+
+    foreach my $key ($self->{snmp}->oid_lex_sort(keys %$result)) {
+        next if ($key !~ /^$oid_nsSlotStatus\.(\d+)$/);
+        my $instance = $1;
+    
+        next if ($self->check_exclude(section => 'modules', instance => $instance));
+        $self->{components}->{modules}->{total}++;
+    
+        my $type = $result->{$oid_nsSlotType . '.' . $instance};
+        my $status = $result->{$oid_nsSlotStatus . '.' . $instance};
+        
+        $self->{output}->output_add(long_msg => sprintf("Module '%s' status is %s [instance: %s].", 
+                                    $type, $map_status{$status}, $instance));
+        if ($status != 1) {
+            $self->{output}->output_add(severity =>  'CRITICAL',
+                                        short_msg => sprintf("Module '%s' status is %s", 
+                                                             $type, $map_status{$status}));
+        }
+    }
+}
+
+1;
diff --git a/network/juniper/common/screenos/mode/components/psu.pm b/network/juniper/common/screenos/mode/components/psu.pm
new file mode 100644
index 000000000..766215e0d
--- /dev/null
+++ b/network/juniper/common/screenos/mode/components/psu.pm
@@ -0,0 +1,78 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Stephane Duret 
+#
+####################################################################################
+
+package network::juniper::common::screenos::mode::components::psu;
+
+use strict;
+use warnings;
+
+my %map_status = (
+    1 => 'active',
+    2 => 'inactive'
+);
+
+sub check {
+    my ($self) = @_;
+
+    $self->{components}->{psus} = {name => 'psus', total => 0, skip => 0};
+    $self->{output}->output_add(long_msg => "Checking power supplies");
+    return if ($self->check_exclude(section => 'psus'));
+    
+    my $oid_nsPowerEntry= '.1.3.6.1.4.1.3224.21.1.1';
+    my $oid_nsPowerStatus = '.1.3.6.1.4.1.3224.21.1.1.2';
+    
+    my $result = $self->{snmp}->get_table(oid => $oid_nsPowerEntry);
+    return if (scalar(keys %$result) <= 0);
+
+    foreach my $key ($self->{snmp}->oid_lex_sort(keys %$result)) {
+        next if ($key !~ /^$oid_nsPowerStatus\.(\d+)$/);
+        my $instance = $1;
+    
+        next if ($self->check_exclude(section => 'psus', instance => $instance));
+    
+        my $status = $result->{$oid_nsPowerStatus . '.' . $instance};
+     
+        $self->{components}->{psus}->{total}++;
+        $self->{output}->output_add(long_msg => sprintf("Power Supply '%s' status is %s.", 
+                                                        $instance, $map_status{$status}));
+        if ($status != 1) {
+            $self->{output}->output_add(severity =>  'CRITICAL',
+                                        short_msg => sprintf("Power Supply '%s' status is %s", 
+                                                             $instance, $map_status{$status}));
+        }
+    }
+}
+
+1;
diff --git a/network/juniper/common/screenos/mode/components/temperature.pm b/network/juniper/common/screenos/mode/components/temperature.pm
new file mode 100644
index 000000000..48e61e2b3
--- /dev/null
+++ b/network/juniper/common/screenos/mode/components/temperature.pm
@@ -0,0 +1,83 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package network::juniper::common::screenos::mode::components::temperature;
+
+use strict;
+use warnings;
+
+sub check {
+    my ($self) = @_;
+    
+    $self->{output}->output_add(long_msg => "Checking temperatures");
+    $self->{components}->{temperatures} = {name => 'temperatures', total => 0, skip => 0};
+    return if ($self->check_exclude('temperatures'));
+
+    my $oid_nsTemperatureEntry = '.1.3.6.1.4.1.3224.21.4.1';
+    my $oid_nsTemperatureCur = '.1.3.6.1.4.1.3224.21.4.1.3';
+    my $oid_nsTemperatureDesc = '.1.3.6.1.4.1.3224.21.4.1.4';
+   
+    my $result = $self->{snmp}->get_table(oid => $oid_nsTemperatureEntry);
+    return if (scalar(keys %$result) <= 0); 
+
+    foreach my $key ($self->{snmp}->oid_lex_sort(keys %$result)) {
+        next if ($key !~ /^$oid_nsTemperatureCur\.(\d+)$/);
+        my $instance = $1;
+
+        next if ($self->check_exclude(section => 'temperatures', instance => $instance));
+	
+        my $temperature_name = $result->{$oid_nsTemperatureDesc . '.' . $instance};
+
+        my $exit_code = $self->{perfdata}->threshold_check(value => $result->{$oid_nsTemperatureCur . '.' . $instance},
+                                                           threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
+
+    	$self->{components}->{temperatures}->{total}++;
+
+    	$self->{output}->output_add(severity => $exit_code,long_msg => sprintf($temperature_name . " is %.2f C", $result->{$oid_nsTemperatureCur . '.' . $instance}));
+
+        if ($exit_code ne 'ok') {
+            $self->{output}->output_add(severity => $exit_code,short_msg => sprintf($temperature_name . " is %.2f C", $result->{$oid_nsTemperatureCur . '.' . $instance}));
+        }
+
+        $temperature_name =~ s/\ /_/g;
+    	$self->{output}->perfdata_add(label => $temperature_name, unit => 'C',
+                                      value => sprintf("%.2f", $result->{$oid_nsTemperatureCur . '.' . $instance}),
+                                      warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
+                                      critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'));    
+    }
+}
+
+
+1;
diff --git a/network/juniper/common/screenos/mode/cpu.pm b/network/juniper/common/screenos/mode/cpu.pm
new file mode 100644
index 000000000..88f1b663b
--- /dev/null
+++ b/network/juniper/common/screenos/mode/cpu.pm
@@ -0,0 +1,159 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Stephane Duret 
+#
+####################################################################################
+
+package network::juniper::common::screenos::mode::cpu;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+                                {
+                                  "warning:s"               => { name => 'warning', default => '' },
+                                  "critical:s"              => { name => 'critical', default => '' },
+                                });
+
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+    
+    ($self->{warn1s}, $self->{warn4s}, $self->{warn64s}) = split /,/, $self->{option_results}->{warning};
+    ($self->{crit1s}, $self->{crit4s}, $self->{crit64s}) = split /,/, $self->{option_results}->{critical};
+    
+    if (($self->{perfdata}->threshold_validate(label => 'warn1min', value => $self->{warn1s})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong warning (1min) threshold '" . $self->{warn1s} . "'.");
+       $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'warn5min', value => $self->{warn4s})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong warning (5min) threshold '" . $self->{warn4s} . "'.");
+       $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'warn15min', value => $self->{warn64s})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong warning (15min) threshold '" . $self->{warn64s} . "'.");
+       $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'crit1min', value => $self->{crit1s})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong critical (1min) threshold '" . $self->{crit1s} . "'.");
+       $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'crit5min', value => $self->{crit4s})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong critical (5min) threshold '" . $self->{crit4s} . "'.");
+       $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'crit15min', value => $self->{crit64s})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong critical (15min) threshold '" . $self->{crit64s} . "'.");
+       $self->{output}->option_exit();
+    }
+}
+
+sub run {
+    my ($self, %options) = @_;
+    # $options{snmp} = snmp object
+    $self->{snmp} = $options{snmp};
+
+    my $oid_nsResCpuLast1Min = '.1.3.6.1.4.1.3224.16.1.2.0';
+    my $oid_nsResCpuLast5Min = '.1.3.6.1.4.1.3224.16.1.3.0';
+    my $oid_nsResCpuLast15Min = '.1.3.6.1.4.1.3224.16.1.4.0';
+    my $result = $self->{snmp}->get_leef(oids => [$oid_nsResCpuLast1Min, $oid_nsResCpuLast5Min,
+                                                  $oid_nsResCpuLast15Min], nothing_quit => 1);
+    
+    my $cpu1min = $result->{$oid_nsResCpuLast1Min};
+    my $cpu5min = $result->{$oid_nsResCpuLast5Min};
+    my $cpu15min = $result->{$oid_nsResCpuLast15Min};
+    
+    my $exit1 = $self->{perfdata}->threshold_check(value => $cpu1min, 
+                           threshold => [ { label => 'crit1min', 'exit_litteral' => 'critical' }, { label => 'warn1min', exit_litteral => 'warning' } ]);
+    my $exit2 = $self->{perfdata}->threshold_check(value => $cpu5min, 
+                           threshold => [ { label => 'crit5min', 'exit_litteral' => 'critical' }, { label => 'warn5min', exit_litteral => 'warning' } ]);
+    my $exit3 = $self->{perfdata}->threshold_check(value => $cpu15min, 
+                           threshold => [ { label => 'crit15min', 'exit_litteral' => 'critical' }, { label => 'warn15min', exit_litteral => 'warning' } ]);
+    my $exit = $self->{output}->get_most_critical(status => [ $exit1, $exit2, $exit3 ]);
+    
+    $self->{output}->output_add(severity => $exit,
+                                short_msg => sprintf("CPU Usage: %.2f%% (1min), %.2f%% (5min), %.2f%% (15min)",
+                                      $cpu1min, $cpu5min, $cpu15min));
+    
+    $self->{output}->perfdata_add(label => "cpu_1min",
+                                  value => $cpu1min,
+                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warn1min'),
+                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'crit1min'),
+                                  min => 0, max => 100);
+    $self->{output}->perfdata_add(label => "cpu_5min",
+                                  value => $cpu5min,
+                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warn5min'),
+                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'crit5min'),
+                                  min => 0, max => 100);
+    $self->{output}->perfdata_add(label => "cpu_15min",
+                                  value => $cpu15min,
+                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warn15min'),
+                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'crit15min'),
+                                  min => 0, max => 100);
+    
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check Juniper cpu usage (NETSCREEN-RESOURCE-MIB).
+
+=over 8
+
+=item B<--warning>
+
+Threshold warning in percent (1min,5min,15min).
+
+=item B<--critical>
+
+Threshold critical in percent (1min,5min,15min).
+
+=back
+
+=cut
+    
diff --git a/network/juniper/common/screenos/mode/hardware.pm b/network/juniper/common/screenos/mode/hardware.pm
new file mode 100644
index 000000000..afe36a89e
--- /dev/null
+++ b/network/juniper/common/screenos/mode/hardware.pm
@@ -0,0 +1,215 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Stephane Duret 
+#
+####################################################################################
+
+package network::juniper::common::screenos::mode::hardware;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+
+use network::juniper::common::screenos::mode::components::fan;
+use network::juniper::common::screenos::mode::components::module;
+use network::juniper::common::screenos::mode::components::psu;
+use network::juniper::common::screenos::mode::components::temperature;
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+                                {
+                                  "exclude:s"        => { name => 'exclude' },
+                                  "absent-problem:s" => { name => 'absent' },
+                                  "component:s"      => { name => 'component', default => 'all' },
+                                  "no-component:s"   => { name => 'no_component' },
+                                  "warning:s"        => { name => 'warning', },
+                                  "critical:s"       => { name => 'critical', },
+                                });
+    $self->{components} = {};
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+
+    if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{option_results}->{warning})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'.");
+        $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'.");
+        $self->{output}->option_exit();
+    }
+    if (defined($self->{option_results}->{no_component})) {
+        if ($self->{option_results}->{no_component} ne '') {
+            $self->{no_components} = $self->{option_results}->{no_component};
+        } else {
+            $self->{no_components} = 'critical';
+        }
+    }
+}
+
+sub global {
+    my ($self, %options) = @_;
+
+    network::juniper::common::screenos::mode::components::temperature::check($self);
+    network::juniper::common::screenos::mode::components::fan::check($self);
+    network::juniper::common::screenos::mode::components::module::check($self);
+    network::juniper::common::screenos::mode::components::psu::check($self);
+}
+
+sub run {
+    my ($self, %options) = @_;
+    # $options{snmp} = snmp object
+    $self->{snmp} = $options{snmp};
+    
+    if ($self->{option_results}->{component} eq 'all') {
+        $self->global();
+    } elsif ($self->{option_results}->{component} eq 'fan') {
+        network::juniper::common::screenos::mode::components::fan::check($self);
+    } elsif ($self->{option_results}->{component} eq 'module') {
+        network::juniper::common::screenos::mode::components::module::check($self);
+    } elsif ($self->{option_results}->{component} eq 'psu') {
+        network::juniper::common::screenos::mode::components::psu::check($self);
+    } elsif ($self->{option_results}->{component} eq 'temperature') {
+        network::juniper::common::screenos::mode::components::temperature::check($self);
+    } else {
+        $self->{output}->add_option_msg(short_msg => "Wrong option. Cannot find component '" . $self->{option_results}->{component} . "'.");
+        $self->{output}->option_exit();
+    }
+
+    my $total_components = 0;
+    my $display_by_component = '';
+    my $display_by_component_append = '';
+    foreach my $comp (sort(keys %{$self->{components}})) {
+        # Skipping short msg when no components
+        next if ($self->{components}->{$comp}->{total} == 0 && $self->{components}->{$comp}->{skip} == 0);
+        $total_components += $self->{components}->{$comp}->{total} + $self->{components}->{$comp}->{skip};
+        $display_by_component .= $display_by_component_append . $self->{components}->{$comp}->{total} . '/' . $self->{components}->{$comp}->{skip} . ' ' . $self->{components}->{$comp}->{name};
+        $display_by_component_append = ', ';
+    }
+    
+    $self->{output}->output_add(severity => 'OK',
+                                short_msg => sprintf("All %s components [%s] are ok.", 
+                                                     $total_components,
+                                                     $display_by_component
+                                                    )
+                                );
+    
+    if (defined($self->{option_results}->{no_component}) && $total_components == 0) {
+        $self->{output}->output_add(severity => $self->{no_components},
+                                    short_msg => 'No components are checked.');
+    }
+    
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+sub check_exclude {
+    my ($self, %options) = @_;
+
+    if (defined($options{instance})) {
+        if (defined($self->{option_results}->{exclude}) && $self->{option_results}->{exclude} =~ /(^|\s|,)${options{section}}[^,]*#\Q$options{instance}\E#/) {
+            $self->{components}->{$options{section}}->{skip}++;
+            $self->{output}->output_add(long_msg => sprintf("Skipping $options{section} section $options{instance} instance."));
+            return 1;
+        }
+    } elsif (defined($self->{option_results}->{exclude}) && $self->{option_results}->{exclude} =~ /(^|\s|,)$options{section}(\s|,|$)/) {
+        $self->{output}->output_add(long_msg => sprintf("Skipping $options{section} section."));
+        return 1;
+    }
+    return 0;
+}
+
+sub absent_problem {
+    my ($self, %options) = @_;
+    
+    if (defined($self->{option_results}->{absent}) && 
+        $self->{option_results}->{absent} =~ /(^|\s|,)($options{section}(\s*,|$)|${options{section}}[^,]*#\Q$options{instance}\E#)/) {
+        $self->{output}->output_add(severity => 'CRITICAL',
+                                    short_msg => sprintf("Component '%s' instance '%s' is not present", 
+                                                         $options{section}, $options{instance}));
+    }
+
+    $self->{output}->output_add(long_msg => sprintf("Skipping $options{section} section $options{instance} instance (not present)"));
+    $self->{components}->{$options{section}}->{skip}++;
+    return 1;
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check hardware (fans, power supplies).
+
+=over 8
+
+=item B<--component>
+
+Which component to check (Default: 'all').
+Can be: 'fan', 'psu', 'module'.
+
+=item B<--exclude>
+
+Exclude some parts (comma seperated list) (Example: --exclude=fans,modules)
+Can also exclude specific instance: --exclude=fans#1#2#,modules#1#,psus
+
+=item B<--absent-problem>
+
+N/A for following equipment. Not needed.
+
+=item B<--no-component>
+
+Return an error if no compenents are checked.
+If total (with skipped) is 0. (Default: 'critical' returns).
+
+=item B<--warning>
+
+Threshold warning in degree celsius.
+
+=item B<--critical>
+
+Threshold critical in degree celsius.
+
+=back
+
+=cut
+ 
diff --git a/network/juniper/common/screenos/mode/memory.pm b/network/juniper/common/screenos/mode/memory.pm
new file mode 100644
index 000000000..af617da27
--- /dev/null
+++ b/network/juniper/common/screenos/mode/memory.pm
@@ -0,0 +1,139 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Stephane Duret 
+#
+####################################################################################
+
+package network::juniper::common::screenos::mode::memory;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+                                {
+                                  "warning:s"               => { name => 'warning' },
+                                  "critical:s"              => { name => 'critical' },
+                                });
+
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+    
+    if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{option_results}->{warning})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'.");
+       $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'.");
+       $self->{output}->option_exit();
+    }
+}
+
+sub run {
+    my ($self, %options) = @_;
+    # $options{snmp} = snmp object
+    $self->{snmp} = $options{snmp};
+
+    my $oid_nsResMemAllocate= '.1.3.6.1.4.1.3224.16.2.1.0';
+    my $oid_nsResMemLeft = '.1.3.6.1.4.1.3224.16.2.2.0';
+    my $oid_nsResMemFrag = '.1.3.6.1.4.1.3224.16.2.3.0';
+    my $result = $self->{snmp}->get_leef(oids => [$oid_nsResMemAllocate, $oid_nsResMemLeft, $oid_nsResMemFrag], nothing_quit => 1);
+
+    my $memory_used  = $result->{$oid_nsResMemAllocate};
+    my $memory_free = $result->{$oid_nsResMemLeft};
+    my $memory_frag = $result->{$oid_nsResMemFrag};
+    my $total_size = $memory_used + $memory_free + $memory_frag;
+    
+    my $prct_used = $memory_used * 100 / $total_size;
+    my $prct_free = $memory_free * 100 / $total_size;
+    my $prct_frag = $memory_frag * 100 / $total_size;
+    
+    my $exit = $self->{perfdata}->threshold_check(value => $prct_used, threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
+    my ($total_value, $total_unit) = $self->{perfdata}->change_bytes(value => $total_size);
+    my ($used_value, $used_unit) = $self->{perfdata}->change_bytes(value => $memory_used);
+    my ($free_value, $free_unit) = $self->{perfdata}->change_bytes(value => $memory_free);
+    my ($frag_value, $frag_unit) = $self->{perfdata}->change_bytes(value => $memory_frag);
+    
+    $self->{output}->output_add(severity => $exit,
+                                short_msg => sprintf("Memory Usage Total: %s Used: %s (%.2f%%) Free: %s (%.2f%%) Fragmented: %s (%.2f%%)",
+                                        $total_value . " " . $total_unit,
+                                        $used_value . " " . $used_unit, $prct_used,
+                                        $free_value . " " . $free_unit, $prct_free,
+					$frag_value . " " . $frag_unit, $prct_frag));
+    
+    $self->{output}->perfdata_add(label => "used",
+                                  value => $memory_used,
+                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning', total => $total_size),
+                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical', total => $total_size),
+                                  min => 0, max => $total_size);
+
+    $self->{output}->perfdata_add(label => "fragmented",
+                                  value => $memory_frag,
+                                  min => 0, max => $total_size);
+
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check Juniper memory usage (NETSCREEN-RESOURCE-MIB).
+
+=over 8
+
+=item B<--warning>
+
+Threshold warning in percent.
+
+=item B<--critical>
+
+Threshold critical in percent.
+
+=back
+
+=cut
+    
diff --git a/network/juniper/common/screenos/mode/sessions.pm b/network/juniper/common/screenos/mode/sessions.pm
new file mode 100644
index 000000000..51df4c94c
--- /dev/null
+++ b/network/juniper/common/screenos/mode/sessions.pm
@@ -0,0 +1,129 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Stephane Duret 
+#
+####################################################################################
+
+package network::juniper::common::screenos::mode::sessions;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+                                { 
+                                  "warning:s"               => { name => 'warning', },
+                                  "critical:s"              => { name => 'critical', },
+                                });
+
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+
+    if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{option_results}->{warning})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'.");
+        $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'.");
+        $self->{output}->option_exit();
+    }
+}
+
+sub run {
+    my ($self, %options) = @_;
+    # $options{snmp} = snmp object
+    $self->{snmp} = $options{snmp};
+    
+    my $oid_nsResSessAllocate = '.1.3.6.1.4.1.3224.16.3.2.0';
+    my $oid_nsResSessMaxium = '.1.3.6.1.4.1.3224.16.3.3.0';
+    
+    my $result = $self->{snmp}->get_leef(oids => [$oid_nsResSessAllocate, $oid_nsResSessMaxium], nothing_quit => 1);
+    
+    my $spu_done = 0;
+    my $cp_total = $result->{$oid_nsResSessMaxium};
+    my $cp_used = $result->{$oid_nsResSessAllocate};
+        
+    my $prct_used = $cp_used * 100 / $cp_total;
+    
+    $spu_done = 1;
+    my $exit_code = $self->{perfdata}->threshold_check(value => $prct_used, 
+                            threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
+    $self->{output}->output_add(severity => $exit_code,
+                                short_msg => sprintf("%.2f%% of the sessions limit reached (%d of max. %d)", 
+                                    $prct_used, $cp_used, $cp_total));
+    $self->{output}->perfdata_add(label => 'sessions',
+                                  value => $cp_used,
+                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning', total => $cp_total, cast_int => 1),
+                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical', total => $cp_total, cast_int => 1),
+                                  min => 0, max => $cp_total);
+
+    if ($spu_done == 0) {
+        $self->{output}->add_option_msg(short_msg => "Cannot check sessions usage (no total values).");
+        $self->{output}->option_exit();
+    }
+    
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check Juniper sessions usage (NETSCREEN-RESOURCE-MIB).
+
+=over 8
+
+=item B<--warning>
+
+Threshold warning in percent.
+
+=item B<--critical>
+
+Threshold critical in percent.
+
+=back
+
+=cut
diff --git a/network/juniper/ssg/plugin.pm b/network/juniper/ssg/plugin.pm
new file mode 100644
index 000000000..7b0955c04
--- /dev/null
+++ b/network/juniper/ssg/plugin.pm
@@ -0,0 +1,69 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Stephane Duret 
+#
+####################################################################################
+
+package network::juniper::ssg::plugin;
+
+use strict;
+use warnings;
+use base qw(centreon::plugins::script_snmp);
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    # $options->{options} = options object
+
+    $self->{version} = '1.0';
+    %{$self->{modes}} = (
+			 'cpu'			=> 'network::juniper::common::screenos::mode::cpu',
+			 'memory'		=> 'network::juniper::common::screenos::mode::memory',
+			 'sessions'		=> 'network::juniper::common::screenos::mode::sessions',
+			 'hardware'		=> 'network::juniper::common::screenos::mode::hardware',
+                         'traffic'              => 'snmp_standard::mode::traffic',
+                         'list-interfaces'      => 'snmp_standard::mode::listinterfaces',
+                         );
+
+    return $self;
+}
+
+1;
+
+__END__
+
+=head1 PLUGIN DESCRIPTION
+
+Check Juniper SSG in SNMP.
+
+=cut
diff --git a/network/securactive/mode/listbca.pm b/network/securactive/mode/listbca.pm
index e3995703b..6897f4d95 100644
--- a/network/securactive/mode/listbca.pm
+++ b/network/securactive/mode/listbca.pm
@@ -79,11 +79,15 @@ sub manage_selection {
         
         $self->{result_names}->{$oid} = $self->{output}->to_utf8($self->{result_names}->{$oid});
         if (!defined($self->{option_results}->{use_regexp}) && $self->{result_names}->{$oid} eq $self->{option_results}->{name}) {
-            push @{$self->{bca_id_selected}}, $instance; 
+            push @{$self->{bca_id_selected}}, $instance;
+            next;
         }
         if (defined($self->{option_results}->{use_regexp}) && $self->{result_names}->{$oid} =~ /$self->{option_results}->{name}/) {
             push @{$self->{bca_id_selected}}, $instance;
+            next;
         }
+        
+        $self->{output}->output_add(long_msg => "Skipping bca '" . $self->{result_names}->{$oid} . "': no matching filter name");
     }
 }
 
@@ -93,18 +97,15 @@ sub run {
     $self->{snmp} = $options{snmp};
 
     $self->manage_selection();
-    my $bca_display = '';
-    my $bca_display_append = '';
     foreach my $instance (sort @{$self->{bca_id_selected}}) { 
         my $name = $self->{result_names}->{$oid_spvBCAName . '.' . $instance};
 
-        $bca_display .= $bca_display_append . "name = $name ";
-        $bca_display_append = ', ';
+        $self->{output}->output_add(long_msg => "'" . $name . "'");
     }
     
     $self->{output}->output_add(severity => 'OK',
-                                short_msg => 'List bca: ' . $bca_display);
-    $self->{output}->display(nolabel => 1);
+                                short_msg => 'List bca:');
+    $self->{output}->display(nolabel => 1, force_ignore_perfdata => 1, force_long_output => 1);
     $self->{output}->exit();
 }
 
diff --git a/network/securactive/mode/listbcn.pm b/network/securactive/mode/listbcn.pm
index 25631e010..5556dcab5 100644
--- a/network/securactive/mode/listbcn.pm
+++ b/network/securactive/mode/listbcn.pm
@@ -104,19 +104,16 @@ sub run {
     $self->{snmp} = $options{snmp};
 
     $self->manage_selection();
-    my $bcn_display = '';
-    my $bcn_display_append = '';
     foreach my $instance (sort @{$self->{bcn_id_selected}}) { 
         my $name = $self->{result_names}->{$oid_spvBCNName . '.' . $instance};
         $name = $self->get_display_value(value => $name);
         
-        $bcn_display .= $bcn_display_append . "name = $name ";
-        $bcn_display_append = ', ';
+        $self->{output}->output_add(long_msg => "'" . $name . "'");
     }
     
     $self->{output}->output_add(severity => 'OK',
-                                short_msg => 'List bcn: ' . $bcn_display);
-    $self->{output}->display(nolabel => 1);
+                                short_msg => 'List bcn:');
+    $self->{output}->display(nolabel => 1, force_ignore_perfdata => 1, force_long_output => 1);
     $self->{output}->exit();
 }
 
diff --git a/os/aix/local/mode/errpt.pm b/os/aix/local/mode/errpt.pm
new file mode 100644
index 000000000..e3d8af0fd
--- /dev/null
+++ b/os/aix/local/mode/errpt.pm
@@ -0,0 +1,243 @@
+################################################################################
+# Copyright 2005-2014 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package os::aix::local::mode::errpt;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+use centreon::plugins::misc;
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+                                {
+                                  "hostname:s"        => { name => 'hostname' },
+                                  "remote"            => { name => 'remote' },
+                                  "ssh-option:s@"     => { name => 'ssh_option' },
+                                  "ssh-path:s"        => { name => 'ssh_path' },
+                                  "ssh-command:s"     => { name => 'ssh_command', default => 'ssh' },
+                                  "timeout:s"         => { name => 'timeout', default => 30 },
+                                  "sudo"              => { name => 'sudo' },
+                                  "command:s"         => { name => 'command', default => 'errpt' },
+                                  "command-path:s"    => { name => 'command_path' },
+                                  "command-options:s" => { name => 'command_options', default => '' },
+                                  "error-type:s"      => { name => 'error_type' },
+                                  "error-class:s"     => { name => 'error_class' },
+                                  "retention:s"       => { name => 'retention' },
+                                  "timezone:s"        => { name => 'timezone' },
+                                  "description"       => { name => 'description' },
+                                });
+    $self->{result} = {};
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+}
+
+sub manage_selection {
+    my ($self, %options) = @_;
+    my $extra_options = '';
+
+    if (defined($self->{option_results}->{error_type})){
+        $extra_options .= ' -T '.$self->{option_results}->{error_type};
+    }
+    if (defined($self->{option_results}->{error_class})){
+        $extra_options .= ' -d '.$self->{option_results}->{error_class};
+    }
+    if (defined($self->{option_results}->{retention})){
+        my $retention = time() - $self->{option_results}->{retention};
+        if (defined($self->{option_results}->{timezone})){
+            $ENV{TZ} = $self->{option_results}->{timezone};
+        }
+        my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($retention);
+        $year = $year - 100;
+        if (length($sec)==1){
+            $sec = '0'.$sec;
+        }
+        if (length($min)==1){
+            $min = '0'.$min;
+        }
+        if (length($hour)==1){
+            $hour = '0'.$hour;
+        }
+        if (length($mday)==1){
+            $mday = '0'.$mday;
+        }
+        $mon = $mon + 1;
+        if (length($mon)==1){
+            $mon = '0'.$mon;
+        }
+        $retention = $mon.$mday.$hour.$min.$year;
+        $extra_options .= ' -s '.$retention;
+    }
+    
+    $extra_options .= $self->{option_results}->{command_options};
+
+    my $stdout = centreon::plugins::misc::execute(output => $self->{output},
+                                                  options => $self->{option_results},
+                                                  sudo => $self->{option_results}->{sudo},
+                                                  command => $self->{option_results}->{command},
+                                                  command_path => $self->{option_results}->{command_path},
+                                                  command_options => $extra_options);
+    my @lines = split /\n/, $stdout;
+    # Header not needed
+    shift @lines;
+    foreach my $line (@lines) {
+        next if ($line !~ /^(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(.*)/);
+        
+        my ($identifier, $timestamp, $resource_name, $description) = ($1, $2, $5, $6);
+        $self->{result}->{$timestamp.'~'.$identifier.'~'.$resource_name} = {description => $description};
+    }
+    
+    if (scalar(keys %{$self->{result}}) <= 0) {
+        if (defined($self->{option_results}->{retention})) {
+            $self->{output}->output_add(long_msg => sprintf("No error found with these options since %s seconds.", $self->{option_results}->{retention}));
+            $self->{output}->output_add(short_msg => sprintf("No error found since %s seconds.", $self->{option_results}->{retention}));
+        } else {
+            $self->{output}->output_add(long_msg => "No error found with these options.");
+            $self->{output}->output_add(short_msg => "No error found.");
+        }
+        $self->{output}->display();
+        $self->{output}->exit();
+    }
+}
+
+sub run {
+    my ($self, %options) = @_;
+    
+    $self->manage_selection();
+    $self->{output}->output_add(severity => 'OK',
+                                short_msg => 'No error found.');
+
+    foreach my $errpt_error (sort(keys %{$self->{result}})) {
+	    my @split_error = split ('~',$errpt_error);
+	    my $timestamp = $split_error[0];
+        my $identifier = $split_error[1];
+        my $resource_name = $split_error[2];
+	    my $description = $self->{result}->{$errpt_error}->{description};
+        my $exit;
+        if (defined($self->{option_results}->{description})) {
+            $self->{output}->output_add(long_msg => sprintf("Error '%s' Date: %s ResourceName: %s Description: %s", $identifier,
+                                                $timestamp, $resource_name, $description));
+            $self->{output}->output_add(severity => 'critical',
+                                        short_msg => sprintf("Error '%s' Date: %s ResourceName: %s Description: %s", $identifier,
+                                                $timestamp, $resource_name, $description));
+        } else {
+            $self->{output}->output_add(long_msg => sprintf("Error '%s' Date: %s ResourceName: %s", $identifier,
+                                                $timestamp, $resource_name));
+            $self->{output}->output_add(severity => 'critical',
+                                        short_msg => sprintf("Error '%s' Date: %s ResourceName: %s", $identifier,
+                                                $timestamp, $resource_name));    
+        }
+    }
+
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check storage usages.
+
+=over 8
+
+=item B<--remote>
+
+Execute command remotely in 'ssh'.
+
+=item B<--hostname>
+
+Hostname to query (need --remote).
+
+=item B<--ssh-option>
+
+Specify multiple options like the user (example: --ssh-option='-l=centreon-engine' --ssh-option='-p=52').
+
+=item B<--ssh-path>
+
+Specify ssh command path (default: none)
+
+=item B<--ssh-command>
+
+Specify ssh command (default: 'ssh'). Useful to use 'plink'.
+
+=item B<--timeout>
+
+Timeout in seconds for the command (Default: 30).
+
+=item B<--sudo>
+
+Use 'sudo' to execute the command.
+
+=item B<--command>
+
+Command to get information (Default: 'errpt').
+Can be changed if you have output in a file.
+
+=item B<--command-path>
+
+Command path (Default: none).
+
+=item B<--error-type>
+
+Filter error type separated by a coma (INFO, PEND, PERF, PERM, TEMP, UNKN).
+
+=item B<--error-class>
+
+Filter error class ('H' for hardware, 'S' for software, '0' for errlogger, 'U' for undetermined).
+
+=item B<--retention>
+
+Retention time of errors in seconds.
+
+=item B<--retention>
+
+Print error description in output.
+
+=back
+
+=cut
diff --git a/os/aix/local/mode/liststorages.pm b/os/aix/local/mode/liststorages.pm
index cc269c9f3..4d4d02e77 100644
--- a/os/aix/local/mode/liststorages.pm
+++ b/os/aix/local/mode/liststorages.pm
@@ -87,10 +87,16 @@ sub manage_selection {
         next if ($line !~ /^(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(.*)/);
         my ($fs, $size, $used, $available, $percent, $mount) = ($1, $2, $3, $4, $5, $6);
         
-        next if (defined($self->{option_results}->{filter_fs}) && $self->{option_results}->{filter_fs} ne '' &&
-                 $fs !~ /$self->{option_results}->{filter_fs}/);
-        next if (defined($self->{option_results}->{filter_mount}) && $self->{option_results}->{filter_mount} ne '' &&
-                 $mount !~ /$self->{option_results}->{filter_mount}/);
+        if (defined($self->{option_results}->{filter_fs}) && $self->{option_results}->{filter_fs} ne '' &&
+            $fs !~ /$self->{option_results}->{filter_fs}/) {
+            $self->{output}->output_add(long_msg => "Skipping storage '" . $mount . "': no matching filter fs");
+            next;
+        }
+        if (defined($self->{option_results}->{filter_mount}) && $self->{option_results}->{filter_mount} ne '' &&
+            $mount !~ /$self->{option_results}->{filter_mount}/) {
+            $self->{output}->output_add(long_msg => "Skipping storage '" . $mount . "': no matching filter mount");
+            next;
+        }
         
         $self->{result}->{$mount} = {fs => $fs};
     }
@@ -100,16 +106,13 @@ sub run {
     my ($self, %options) = @_;
 	
     $self->manage_selection();
-    my $storages_display = '';
-    my $storages_display_append = '';
     foreach my $name (sort(keys %{$self->{result}})) {
-        $storages_display .= $storages_display_append . 'name = ' . $name . ' [fs = ' . $self->{result}->{$name}->{fs} . ']';
-        $storages_display_append = ', ';
+        $self->{output}->output_add(long_msg => "'" . $name . "' [fs = " . $self->{result}->{$name}->{fs} . ']');
     }
     
     $self->{output}->output_add(severity => 'OK',
-                                short_msg => 'List storages: ' . $storages_display);
-    $self->{output}->display(nolabel => 1);
+                                short_msg => 'List storages:');
+    $self->{output}->display(nolabel => 1, force_ignore_perfdata => 1, force_long_output => 1);
     $self->{output}->exit();
 }
 
diff --git a/os/aix/local/mode/lvsync.pm b/os/aix/local/mode/lvsync.pm
new file mode 100644
index 000000000..96e4d8f6b
--- /dev/null
+++ b/os/aix/local/mode/lvsync.pm
@@ -0,0 +1,225 @@
+################################################################################
+# Copyright 2005-2014 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package os::aix::local::mode::lvsync;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+use centreon::plugins::misc;
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+                                {
+                                  "hostname:s"        => { name => 'hostname' },
+                                  "remote"            => { name => 'remote' },
+                                  "ssh-option:s@"     => { name => 'ssh_option' },
+                                  "ssh-path:s"        => { name => 'ssh_path' },
+                                  "ssh-command:s"     => { name => 'ssh_command', default => 'ssh' },
+                                  "timeout:s"         => { name => 'timeout', default => 30 },
+                                  "sudo"              => { name => 'sudo' },
+                                  "command:s"         => { name => 'command', default => 'lsvg' },
+                                  "command-path:s"    => { name => 'command_path' },
+                                  "command-options:s" => { name => 'command_options', default => '-o | lsvg -i -l 2>&1' },
+                                  "filter-state:s"    => { name => 'filter_state', default => 'stale' },
+                                  "filter-type:s"     => { name => 'filter_type', },
+                                  "name:s"            => { name => 'name' },
+                                  "regexp"              => { name => 'use_regexp' },
+                                  "regexp-isensitive"   => { name => 'use_regexpi' },
+                                });
+    $self->{result} = {};
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+}
+
+sub manage_selection {
+    my ($self, %options) = @_;
+
+    my $stdout = centreon::plugins::misc::execute(output => $self->{output},
+                                                  options => $self->{option_results},
+                                                  sudo => $self->{option_results}->{sudo},
+                                                  command => $self->{option_results}->{command},
+                                                  command_path => $self->{option_results}->{command_path},
+                                                  command_options => $self->{option_results}->{command_options});
+    my @lines = split /\n/, $stdout;
+    # Header not needed
+    shift @lines;
+    if (scalar @lines != 0){
+        foreach my $line (@lines) {
+            next if ($line !~ /^(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(.*)/);
+            my ($lv, $type, $lp, $pp, $pv, $lvstate, $mount) = ($1, $2, $3, $4, $5, $6, $7);
+            
+            next if (defined($self->{option_results}->{filter_state}) && $self->{option_results}->{filter_state} ne '' &&
+                     $lvstate !~ /$self->{option_results}->{filter_state}/);
+            next if (defined($self->{option_results}->{filter_type}) && $self->{option_results}->{filter_type} ne '' &&
+                     $type !~ /$self->{option_results}->{filter_type}/);
+
+            next if (defined($self->{option_results}->{name}) && defined($self->{option_results}->{use_regexp}) && defined($self->{option_results}->{use_regexpi}) 
+                && $mount !~ /$self->{option_results}->{name}/i);
+            next if (defined($self->{option_results}->{name}) && defined($self->{option_results}->{use_regexp}) && !defined($self->{option_results}->{use_regexpi}) 
+                && $mount !~ /$self->{option_results}->{name}/);
+            next if (defined($self->{option_results}->{name}) && !defined($self->{option_results}->{use_regexp}) && !defined($self->{option_results}->{use_regexpi})
+                && $mount ne $self->{option_results}->{name});
+            
+            $self->{result}->{$mount} = {lv => $lv, type => $type, lp => $lp, pp => $pp, pv => $pv, lvstate => $lvstate};
+        }
+    }
+    
+}
+
+sub run {
+    my ($self, %options) = @_;
+    
+    $self->manage_selection();
+    
+    if (scalar(keys %{$self->{result}}) <= 0) {
+        $self->{output}->output_add(long_msg => 'All LV are ok.');
+        $self->{output}->output_add(severity => 'OK',
+                                    short_msg => 'All LV are ok.');
+    } else {
+        my $num_disk_check = 0;
+        foreach my $name (sort(keys %{$self->{result}})) {
+            $num_disk_check++;
+            my $lv = $self->{result}->{$name}->{lv};
+            my $type = $self->{result}->{$name}->{type};
+            my $lp = $self->{result}->{$name}->{lp};
+            my $pp = $self->{result}->{$name}->{pp};
+            my $pv = $self->{result}->{$name}->{pv};
+            my $lvstate = $self->{result}->{$name}->{lvstate};
+            my $mount = $name;
+            
+            $self->{output}->output_add(long_msg => sprintf("LV '%s' MountPoint: '%s' State: '%s' [LP: %s  PP: %s  PV: %s]", $lv,
+                                             $mount, $lvstate,
+                                             $lp, $pp, $pv));
+            $self->{output}->output_add(severity => 'critical',
+                                        short_msg => sprintf("LV '%s' MountPoint: '%s' State: '%s' [LP: %s  PP: %s  PV: %s]", $lv,
+                                            $mount, $lvstate,
+                                            $lp, $pp, $pv));
+        }
+    
+        if ($num_disk_check == 0) {
+            $self->{output}->add_option_msg(short_msg => "No lv checked.");
+            $self->{output}->option_exit();
+        }
+    }
+    
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check vg mirroring.
+
+=over 8
+
+=item B<--remote>
+
+Execute command remotely in 'ssh'.
+
+=item B<--hostname>
+
+Hostname to query (need --remote).
+
+=item B<--ssh-option>
+
+Specify multiple options like the user (example: --ssh-option='-l=centreon-engine' --ssh-option='-p=52').
+
+=item B<--ssh-path>
+
+Specify ssh command path (default: none)
+
+=item B<--ssh-command>
+
+Specify ssh command (default: 'ssh'). Useful to use 'plink'.
+
+=item B<--timeout>
+
+Timeout in seconds for the command (Default: 30).
+
+=item B<--sudo>
+
+Use 'sudo' to execute the command.
+
+=item B<--command>
+
+Command to get information (Default: 'lsvg').
+Can be changed if you have output in a file.
+
+=item B<--command-path>
+
+Command path (Default: none).
+
+=item B<--command-options>
+
+Command options (Default: '-o | lsvg -i -l 2>&1').
+
+=item B<--name>
+
+Set the storage mount point (empty means 'check all storages')
+
+=item B<--regexp>
+
+Allows to use regexp to filter storage mount point (with option --name).
+
+=item B<--regexp-isensitive>
+
+Allows to use regexp non case-sensitive (with --regexp).
+
+=item B<--filter-state>
+
+Filter filesystem state (Default: stale) (regexp can be used).
+
+=item B<--filter-type>
+
+Filter filesystem type (regexp can be used).
+
+=back
+
+=cut
diff --git a/os/aix/local/plugin.pm b/os/aix/local/plugin.pm
index 002c14f41..286ba32f6 100644
--- a/os/aix/local/plugin.pm
+++ b/os/aix/local/plugin.pm
@@ -47,23 +47,10 @@ sub new {
 
     $self->{version} = '0.1';
     %{$self->{modes}} = (
-                         'cpu'              => 'os::aix::local::mode::cpu',
-                         'cmd-return'       => 'os::aix::local::mode::cmdreturn',
-                         'diskio'           => 'os::aix::local::mode::diskio',
-                         'files-size'       => 'os::aix::local::mode::filessize',
-                         'files-date'       => 'os::aix::local::mode::filesdate',
-                         'inodes'           => 'os::aix::local::mode::inodes',
-                         'load'             => 'os::aix::local::mode::loadaverage',
-                         'list-interfaces'  => 'os::aix::local::mode::listinterfaces',
-                         'list-partitions'  => 'os::aix::local::mode::listpartitions',
+                         'errpt'            => 'os::aix::local::mode::errpt',
                          'list-storages'    => 'os::aix::local::mode::liststorages',
-                         'memory'           => 'os::aix::local::mode::memory',
-                         'packet-errors'    => 'os::aix::local::mode::packeterrors',
-                         'process'          => 'os::aix::local::mode::process',
                          'storage'          => 'os::aix::local::mode::storage',
-                         'swap'             => 'os::aix::local::mode::swap',
-                         'traffic'          => 'os::aix::local::mode::traffic',
-                         'uptime'           => 'os::aix::local::mode::uptime',
+                         'lvsync'         => 'os::aix::local::mode::lvsync',
                          );
 
     return $self;
@@ -75,6 +62,6 @@ __END__
 
 =head1 PLUGIN DESCRIPTION
 
-Check Linux through local commands (the plugin can use SSH).
+Check AIX through local commands (the plugin can use SSH).
 
 =cut
diff --git a/os/freebsd/snmp/plugin.pm b/os/freebsd/snmp/plugin.pm
index 337edd3e1..04bfb855b 100644
--- a/os/freebsd/snmp/plugin.pm
+++ b/os/freebsd/snmp/plugin.pm
@@ -47,17 +47,23 @@ sub new {
 
     $self->{version} = '0.1';
     %{$self->{modes}} = (
-                         'cpu' => 'snmp_standard::mode::cpu',
-                         'load' => 'snmp_standard::mode::loadaverage',
-                         'list-interfaces' => 'snmp_standard::mode::listinterfaces',
-                         'list-storages' => 'snmp_standard::mode::liststorages',
-                         'memory' => 'snmp_standard::mode::memory',
-                         'packet-errors' => 'snmp_standard::mode::packeterrors',
-                         'processcount' => 'snmp_standard::mode::processcount',
-                         'storage' => 'snmp_standard::mode::storage',
-                         'swap' => 'snmp_standard::mode::swap',
-                         'traffic' => 'snmp_standard::mode::traffic',
-                         'uptime' => 'snmp_standard::mode::uptime',
+                         'cpu'              => 'snmp_standard::mode::cpu',
+                         'cpu-detailed'     => 'snmp_standard::mode::cpudetailed',
+                         'diskio'           => 'snmp_standard::mode::diskio',
+                         'disk-usage'       => 'snmp_standard::mode::diskusage',
+                         'inodes'           => 'snmp_standard::mode::inodes',
+                         'load'             => 'snmp_standard::mode::loadaverage',
+                         'list-diskspath'   => 'snmp_standard::mode::listdiskspath',
+                         'list-interfaces'  => 'snmp_standard::mode::listinterfaces',
+                         'list-storages'    => 'snmp_standard::mode::liststorages',
+                         'memory'           => 'snmp_standard::mode::memory',
+                         'packet-errors'    => 'snmp_standard::mode::packeterrors',
+                         'processcount'     => 'snmp_standard::mode::processcount',
+                         'storage'          => 'snmp_standard::mode::storage',
+                         'swap'             => 'snmp_standard::mode::swap',
+                         'tcpcon'           => 'snmp_standard::mode::tcpcon',
+                         'traffic'          => 'snmp_standard::mode::traffic',
+                         'uptime'           => 'snmp_standard::mode::uptime',
                          );
 
     return $self;
diff --git a/os/linux/local/mode/connections.pm b/os/linux/local/mode/connections.pm
new file mode 100644
index 000000000..860863462
--- /dev/null
+++ b/os/linux/local/mode/connections.pm
@@ -0,0 +1,397 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package os::linux::local::mode::connections;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+use centreon::plugins::misc;
+
+my %map_states = (
+    CLOSED => 'closed',
+    LISTEN => 'listen',
+    SYN_SENT => 'synSent',
+    SYN_RECV => 'synReceived',
+    ESTABLISHED => 'established',
+    FIN_WAIT1 => 'finWait1',
+    FIN_WAIT2 => 'finWait2',
+    CLOSE_WAIT => 'closeWait',
+    LAST_ACK => 'lastAck',
+    CLOSING => 'closing',
+    TIME_WAIT => 'timeWait',
+    UNKNOWN => 'unknown',
+);
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+                                { 
+                                  "hostname:s"        => { name => 'hostname' },
+                                  "remote"            => { name => 'remote' },
+                                  "ssh-option:s@"     => { name => 'ssh_option' },
+                                  "ssh-path:s"        => { name => 'ssh_path' },
+                                  "ssh-command:s"     => { name => 'ssh_command', default => 'ssh' },
+                                  "timeout:s"         => { name => 'timeout', default => 30 },
+                                  "sudo"              => { name => 'sudo' },
+                                  "command:s"         => { name => 'command', default => 'netstat' },
+                                  "command-path:s"    => { name => 'command_path' },
+                                  "command-options:s" => { name => 'command_options', default => '-antu 2>&1' },
+                                  "warning:s"       => { name => 'warning', },
+                                  "critical:s"      => { name => 'critical', },
+                                  "service:s@"      => { name => 'service', },
+                                  "application:s@"  => { name => 'application', },
+                                });
+    @{$self->{connections}} = ();
+    $self->{services} = { total => { filter => '(?!(udp*))#.*?#.*?#.*?#.*?#(?!(listen))', builtin => 1, number => 0, msg => 'Total connections: %d' } };
+    $self->{applications} = {};
+    $self->{states} = { closed => 0, listen => 0, synSent => 0, synReceived => 0,
+                        established => 0, finWait1 => 0, finWait2 => 0, closeWait => 0,
+                        lastAck => 0, closing => 0, timeWait => 0 };
+    return $self;
+}
+
+sub build_connections {
+    my ($self, %options) = @_;
+    
+    my $stdout = centreon::plugins::misc::execute(output => $self->{output},
+                                                  options => $self->{option_results},
+                                                  sudo => $self->{option_results}->{sudo},
+                                                  command => $self->{option_results}->{command},
+                                                  command_path => $self->{option_results}->{command_path},
+                                                  command_options => $self->{option_results}->{command_options});
+    foreach my $line (split /\n/, $stdout) {
+        next if ($line !~ /^(tcp|udp)\s+\S+\s+\S+\s+(\S+)\s+(\S+)\s*(\S*)/);
+        my ($type, $src, $dst, $state) = ($1, $2, $3, $4);
+        $src =~ /(.*):(\d+|\*)$/;
+        my ($src_addr, $src_port) = ($1, $2);
+        $dst =~ /(.*):(\d+|\*)$/;
+        my ($dst_addr, $dst_port) = ($1, $2);
+        $type .= '6' if ($src_addr !~ /^\d+\.\d+\.\d+\.\d+$/);
+        
+        if ($type =~ /^udp/) {
+            if ($dst_port eq '*') {
+                $state = 'listen';
+            } else {
+                $state = 'established';
+            }
+        } else {
+            $state = $map_states{$state};
+            $self->{states}->{$state}++;
+        }
+        
+        push @{$self->{connections}}, $type . "#$src_addr#$src_port#$dst_addr#$dst_port#" . lc($state);
+    }
+}
+
+sub check_services {
+    my ($self, %options) = @_;
+    
+    foreach my $service (@{$self->{option_results}->{service}}) {
+        my ($tag, $ipv, $state, $port_src, $port_dst, $filter_ip_src, $filter_ip_dst, $warn, $crit) = split /,/, $service;
+        
+        if (!defined($tag) || $tag eq '') {
+            $self->{output}->add_option_msg(short_msg => "Tag for service '" . $service . "' must be defined.");
+            $self->{output}->option_exit();
+        }
+        if (defined($self->{services}->{$tag})) {
+            $self->{output}->add_option_msg(short_msg => "Tag '" . $tag . "' (service) already exists.");
+            $self->{output}->option_exit();
+        }
+        
+        $self->{services}->{$tag} = { filter => ((defined($ipv) && $ipv ne '') ? $ipv : '.*?') . '#' . 
+                                                ((defined($filter_ip_src) && $filter_ip_src ne '') ? $filter_ip_src : '.*?') . '#' . 
+                                                ((defined($port_src) && $port_src ne '') ? $port_src : '.*?') . '#' . 
+                                                ((defined($filter_ip_dst) && $filter_ip_dst ne '') ? $filter_ip_dst : '.*?') . '#' . 
+                                                ((defined($port_dst) && $port_dst ne '') ? $port_dst : '.*?') . '#' . 
+                                                ((defined($state) && $state ne '') ? lc($state) : '(?!(listen))')
+                                                , 
+                                      builtin => 0, number => 0 };
+        if (($self->{perfdata}->threshold_validate(label => 'warning-service-' . $tag, value => $warn)) == 0) {
+            $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $warn . "' for service '$tag'.");
+            $self->{output}->option_exit();
+        }
+        if (($self->{perfdata}->threshold_validate(label => 'critical-service-' . $tag, value => $crit)) == 0) {
+            $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $crit . "' for service '$tag'.");
+            $self->{output}->option_exit();
+        }
+    }
+}
+
+sub check_applications {
+    my ($self, %options) = @_;
+    
+    foreach my $app (@{$self->{option_results}->{application}}) {
+        my ($tag, $services, $warn, $crit) = split /,/, $app;
+        
+        if (!defined($tag) || $tag eq '') {
+            $self->{output}->add_option_msg(short_msg => "Tag for application '" . $app . "' must be defined.");
+            $self->{output}->option_exit();
+        }
+        if (defined($self->{applications}->{$tag})) {
+            $self->{output}->add_option_msg(short_msg => "Tag '" . $tag . "' (application) already exists.");
+            $self->{output}->option_exit();
+        }
+        
+        $self->{applications}->{$tag} = {
+                                            services => {},
+                                        };
+        foreach my $service (split /\|/, $services) {
+            if (!defined($self->{services}->{$service})) {
+                $self->{output}->add_option_msg(short_msg => "Service '" . $service . "' is not defined.");
+                $self->{output}->option_exit();
+            }
+            $self->{applications}->{$tag}->{services}->{$service} = 1;
+        }
+        
+        if (($self->{perfdata}->threshold_validate(label => 'warning-app-' . $tag, value => $warn)) == 0) {
+            $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $warn . "' for application '$tag'.");
+            $self->{output}->option_exit();
+        }
+        if (($self->{perfdata}->threshold_validate(label => 'critical-app-' . $tag, value => $crit)) == 0) {
+            $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $crit . "' for application '$tag'.");
+            $self->{output}->option_exit();
+        }
+    }
+}
+
+sub test_services {
+    my ($self, %options) = @_;
+    
+    foreach my $tag (keys %{$self->{services}}) {
+        foreach (@{$self->{connections}}) {
+            if (/$self->{services}->{$tag}->{filter}/) {
+                $self->{services}->{$tag}->{number}++;
+            }
+        }        
+        
+        my $exit_code = $self->{perfdata}->threshold_check(value => $self->{services}->{$tag}->{number}, 
+                               threshold => [ { label => 'critical-service-' . $tag, 'exit_litteral' => 'critical' }, { label => 'warning-service-' . $tag, exit_litteral => 'warning' } ]);
+        my ($perf_label, $msg) = ('service_' . $tag, "Service '$tag' connections: %d");
+        if ($self->{services}->{$tag}->{builtin} == 1) {
+            ($perf_label, $msg) = ($tag, $self->{services}->{$tag}->{msg});
+        }
+        
+        $self->{output}->output_add(severity => $exit_code,
+                                    short_msg => sprintf($msg, $self->{services}->{$tag}->{number}));
+        $self->{output}->perfdata_add(label => $perf_label,
+                                      value => $self->{services}->{$tag}->{number},
+                                      warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-service-' . $tag),
+                                      critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical-service-' . $tag),
+                                      min => 0);
+    }
+}
+
+sub test_applications {
+    my ($self, %options) = @_;
+
+    foreach my $tag (keys %{$self->{applications}}) {
+        my $number = 0;
+        
+        foreach (keys %{$self->{applications}->{$tag}->{services}}) {
+            $number += $self->{services}->{$_}->{number};
+        }
+        
+        my $exit_code = $self->{perfdata}->threshold_check(value => $number, 
+                               threshold => [ { label => 'critical-app-' . $tag, 'exit_litteral' => 'critical' }, { label => 'warning-app-' . $tag, exit_litteral => 'warning' } ]);
+        $self->{output}->output_add(severity => $exit_code,
+                                    short_msg => sprintf("Applicatin '%s' connections: %d", $tag, $number));
+        $self->{output}->perfdata_add(label => 'app_' . $tag,
+                                      value => $number,
+                                      warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-app-' . $tag),
+                                      critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical-app-' . $tag),
+                                      min => 0);
+    }
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+
+    if (($self->{perfdata}->threshold_validate(label => 'warning-service-total', value => $self->{option_results}->{warning})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'.");
+        $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical-service-total', value => $self->{option_results}->{critical})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'.");
+        $self->{output}->option_exit();
+    }
+    $self->check_services();
+    $self->check_applications();
+}
+
+sub run {
+    my ($self, %options) = @_;
+    # $options{snmp} = snmp object
+    $self->{snmp} = $options{snmp};
+    
+    $self->build_connections();
+    $self->test_services();
+    $self->test_applications();
+    
+    foreach (keys %{$self->{states}}) {
+        $self->{output}->perfdata_add(label => 'con_' . $_,
+                                      value => $self->{states}->{$_},
+                                      min => 0);
+    }
+
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check tcp/udp connections (udp connections are not in total. Use option '--service' to check it).
+'ipx', 'x25' connections are not checked (need output to do it. If you have, you can post it in forge :)
+
+=over 8
+
+=item B<--warning>
+
+Threshold warning for total connections.
+
+=item B<--critical>
+
+Threshold critical for total connections.
+
+=item B<--service>
+
+Check tcp connections following rules:
+tag,[type],[state],[port-src],[port-dst],[filter-ip-src],[filter-ip-dst],[threshold-warning],[threshold-critical]
+
+Example to test SSH connections on the server: --service="ssh,,,22,,,,10,20" 
+
+=over 16
+
+=item 
+
+Name to identify service (must be unique and couldn't be 'total').
+
+=item 
+
+regexp - can use 'ipv4', 'ipv6', 'udp', 'udp6'. Empty means all.
+
+=item 
+
+regexp - can use 'finWait1', 'established',... Empty means all (minus listen).
+For udp connections, there are 'established' and 'listen'.
+
+=item 
+
+regexp - can use to exclude or include some IPs.
+
+=item 
+
+nagios-perfdata - number of connections.
+
+=back
+
+=item B<--application>
+
+Check tcp connections of mutiple services:
+tag,[services],[threshold-warning],[threshold-critical]
+
+Example:
+--application="web,http|https,100,200"
+
+=over 16
+
+=item 
+
+Name to identify application (must be unique).
+
+=item 
+
+List of services (used the tag name. Separated by '|').
+
+=item 
+
+nagios-perfdata - number of connections.
+
+=back
+
+=item B<--remote>
+
+Execute command remotely in 'ssh'.
+
+=item B<--hostname>
+
+Hostname to query (need --remote).
+
+=item B<--ssh-option>
+
+Specify multiple options like the user (example: --ssh-option='-l=centreon-engine' --ssh-option='-p=52').
+
+=item B<--ssh-path>
+
+Specify ssh command path (default: none)
+
+=item B<--ssh-command>
+
+Specify ssh command (default: 'ssh'). Useful to use 'plink'.
+
+=item B<--timeout>
+
+Timeout in seconds for the command (Default: 30).
+
+=item B<--sudo>
+
+Use 'sudo' to execute the command.
+
+=item B<--command>
+
+Command to get information (Default: 'netstat').
+Can be changed if you have output in a file.
+
+=item B<--command-path>
+
+Command path (Default: none).
+
+=item B<--command-options>
+
+Command options (Default: '-antu 2>&1').
+
+=back
+
+=cut
diff --git a/os/linux/local/mode/cpu.pm b/os/linux/local/mode/cpu.pm
index 236971c96..38abd2dc2 100644
--- a/os/linux/local/mode/cpu.pm
+++ b/os/linux/local/mode/cpu.pm
@@ -102,8 +102,7 @@ sub run {
     my $datas = {};
     $datas->{last_timestamp} = time();
     
-    $self->{output}->output_add(severity => 'OK', 
-                                short_msg => "CPUs usages are ok.");
+    my ($cpu, $i) = (0, 0);
     foreach (split(/\n/, $stdout)) {
         next if (!/cpu(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)/);
         my $cpu_number = $1;
@@ -136,22 +135,28 @@ sub run {
         my $cpu_ratio_usetime = 100 * $idle_elapsed / $total_elapsed;
         $cpu_ratio_usetime = 100 - $cpu_ratio_usetime;        
         
-        my $exit_code = $self->{perfdata}->threshold_check(value => $cpu_ratio_usetime, 
-                                                           threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
-        
-        $self->{output}->output_add(long_msg => sprintf("CPU %d: %.2f%%", $cpu_number, $cpu_ratio_usetime));
-        if (!$self->{output}->is_status(litteral => 1, value => $exit_code, compare => 'ok')) {
-            $self->{output}->output_add(severity => $exit_code,
-                                        short_msg => sprintf("CPU %d: %.2f%%", $cpu_number, $cpu_ratio_usetime));
-        }
-        $self->{output}->perfdata_add(label => 'cpu_' . $cpu_number, unit => '%',
+        $cpu += $cpu_ratio_usetime;
+        $i++;
+        $self->{output}->output_add(long_msg => sprintf("CPU %d Usage is %.2f%%", $cpu_number, $cpu_ratio_usetime));
+        $self->{output}->perfdata_add(label => 'cpu' . $cpu_number, unit => '%',
                                       value => sprintf("%.2f", $cpu_ratio_usetime),
+                                      min => 0, max => 100);
+    }
+    
+    if ($i > 0) {
+        my $avg_cpu = $cpu / $i;
+        my $exit_code = $self->{perfdata}->threshold_check(value => $avg_cpu, 
+                                                           threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
+        $self->{output}->output_add(severity => $exit_code,
+                                    short_msg => sprintf("CPU(s) average usage is: %.2f%%", $avg_cpu));
+        $self->{output}->perfdata_add(label => 'total_cpu_avg', unit => '%',
+                                      value => sprintf("%.2f", $avg_cpu),
                                       warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
                                       critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'),
                                       min => 0, max => 100);
     }
 
-	$self->{statefile_cache}->write(data => $datas);
+    $self->{statefile_cache}->write(data => $datas);
     if (!defined($old_timestamp)) {
         $self->{output}->output_add(severity => 'OK',
                                     short_msg => "Buffer creation...");
diff --git a/os/linux/local/mode/cpudetailed.pm b/os/linux/local/mode/cpudetailed.pm
new file mode 100644
index 000000000..e0310bf8a
--- /dev/null
+++ b/os/linux/local/mode/cpudetailed.pm
@@ -0,0 +1,283 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package os::linux::local::mode::cpudetailed;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+use centreon::plugins::misc;
+use centreon::plugins::statefile;
+
+my $maps = [
+    { counter => 'user', output => 'User %.2f %%', position => 1 },
+    { counter => 'nice', output => 'Nice %.2f %%', position => 2 }, 
+    { counter => 'system', output => 'System %.2f %%', position => 3 },
+    { counter => 'idle', output => 'Idle %.2f %%', position => 4 },
+    { counter => 'wait', output => 'Wait %.2f %%', position => 5 },
+    { counter => 'interrupt', output => 'Interrupt %.2f %%', position => 6 },
+    { counter => 'softirq', output => 'Soft Irq %.2f %%', position => 7 },
+    { counter => 'steal', output => 'Steal %.2f %%', position => 8 },
+    { counter => 'guest', output => 'Guest %.2f %%', position => 9 },
+    { counter => 'guestnice', output => 'Guest Nice %.2f %%', position => 10 },
+];
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+                                { 
+                                  "hostname:s"        => { name => 'hostname' },
+                                  "remote"            => { name => 'remote' },
+                                  "ssh-option:s@"     => { name => 'ssh_option' },
+                                  "ssh-path:s"        => { name => 'ssh_path' },
+                                  "ssh-command:s"     => { name => 'ssh_command', default => 'ssh' },
+                                  "timeout:s"         => { name => 'timeout', default => 30 },
+                                  "sudo"              => { name => 'sudo' },
+                                  "command:s"         => { name => 'command', default => 'cat' },
+                                  "command-path:s"    => { name => 'command_path' },
+                                  "command-options:s" => { name => 'command_options', default => '/proc/stat 2>&1' },
+                                });
+    foreach (@{$maps}) {
+        $options{options}->add_options(arguments => {
+                                                    'warning-' . $_->{counter} . ':s'    => { name => 'warning_' . $_->{counter} },
+                                                    'critical-' . $_->{counter} . ':s'    => { name => 'critical_' . $_->{counter} },
+                                                    });
+    }
+    
+    $self->{statefile_cache} = centreon::plugins::statefile->new(%options);
+    $self->{hostname} = undef;
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+
+    foreach (@{$maps}) {
+        if (($self->{perfdata}->threshold_validate(label => 'warning-' . $_->{counter}, value => $self->{option_results}->{'warning_' . $_->{counter}})) == 0) {
+            $self->{output}->add_option_msg(short_msg => "Wrong warning-" . $_->{counter} . " threshold '" . $self->{option_results}->{'warning_' . $_->{counter}} . "'.");
+            $self->{output}->option_exit();
+        }
+        if (($self->{perfdata}->threshold_validate(label => 'critical-' . $_->{counter}, value => $self->{option_results}->{'critical_' . $_->{counter}})) == 0) {
+            $self->{output}->add_option_msg(short_msg => "Wrong critical-" . $_->{counter} . " threshold '" . $self->{option_results}->{'critical_' . $_->{counter}} . "'.");
+            $self->{output}->option_exit();
+        }
+    }
+    
+    $self->{statefile_cache}->check_options(%options);
+    $self->{hostname} = $self->{option_results}->{hostname};
+    if (!defined($self->{hostname})) {
+        $self->{hostname} = 'me';
+    }
+}
+
+sub run {
+    my ($self, %options) = @_;
+
+    my $stdout = centreon::plugins::misc::execute(output => $self->{output},
+                                                  options => $self->{option_results},
+                                                  sudo => $self->{option_results}->{sudo},
+                                                  command => $self->{option_results}->{command},
+                                                  command_path => $self->{option_results}->{command_path},
+                                                  command_options => $self->{option_results}->{command_options});
+    $self->{statefile_cache}->read(statefile => 'cache_linux_local_' . $self->{hostname}  . '_' .  $self->{mode});
+    # Manage values
+    my ($buffer_creation, $exit) = (0, 0);
+    my $save_datas = {};
+    my $new_datas = {};
+    my $old_datas = {};
+    
+    foreach my $line (split(/\n/, $stdout)) {
+        next if ($line !~ /cpu(\d+)\s+/);
+        my $cpu_number = $1;
+        my @values = split /\s+/, $line;
+        
+        foreach (@{$maps}) {
+            next if (!defined($values[$_->{position}]));
+            if (!defined($new_datas->{$cpu_number})) {
+                $new_datas->{$cpu_number} = { total => 0 };
+                $old_datas->{$cpu_number} = { total => 0 };
+            }
+            $new_datas->{$cpu_number}->{$_->{counter}} = $values[$_->{position}];
+            $save_datas->{'cpu' . $cpu_number . '_' . $_->{counter}} = $values[$_->{position}];
+            my $tmp_value = $self->{statefile_cache}->get(name => 'cpu' . $cpu_number . '_' . $_->{counter});
+            if (!defined($tmp_value)) {
+                $buffer_creation = 1;
+                next;
+            }
+            if ($new_datas->{$cpu_number}->{$_->{counter}} < $tmp_value) {
+                $buffer_creation = 1;
+                next;
+            }
+            
+            $exit = 1;
+            $old_datas->{$cpu_number}->{$_->{counter}} = $tmp_value;
+            $new_datas->{$cpu_number}->{total} += $new_datas->{$cpu_number}->{$_->{counter}};
+            $old_datas->{$cpu_number}->{total} += $old_datas->{$cpu_number}->{$_->{counter}};
+        }
+    }
+    
+    $self->{statefile_cache}->write(data => $save_datas);
+    if ($buffer_creation == 1) {
+        $self->{output}->output_add(severity => 'OK',
+                                    short_msg => "Buffer creation...");
+        if ($exit == 0) {
+            $self->{output}->display();
+            $self->{output}->exit();
+        }
+    }
+    
+    $self->{output}->output_add(severity => 'OK', 
+                                short_msg => "CPUs usages are ok.");
+    
+    foreach my $cpu_number (sort keys(%$new_datas)) {
+        # In buffer creation. New cpu
+        next if (scalar(keys %{$old_datas->{$cpu_number}}) <= 1);
+        
+        if ($new_datas->{$cpu_number}->{total} - $old_datas->{$cpu_number}->{total} == 0) {
+            $self->{output}->output_add(severity => 'OK',
+                                        short_msg => "Counter not moved. Have to wait.");
+            $self->{output}->display();
+            $self->{output}->exit();
+        }
+        
+        my @exits;
+        foreach (@{$maps}) {
+            next if (!defined($new_datas->{$cpu_number}->{$_->{counter}}));
+            my $value = (($new_datas->{$cpu_number}->{$_->{counter}} - $old_datas->{$cpu_number}->{$_->{counter}}) * 100) / 
+                         ($new_datas->{$cpu_number}->{total} - $old_datas->{$cpu_number}->{total});
+            push @exits, $self->{perfdata}->threshold_check(value => $value, threshold => [ { label => 'critical-' . $_->{counter}, 'exit_litteral' => 'critical' }, { label => 'warning-' . $_->{counter}, 'exit_litteral' => 'warning' }]);
+        }
+
+        $exit = $self->{output}->get_most_critical(status => [ @exits ]);
+        my $str_output = "CPU '$cpu_number' Usage: ";
+        my $str_append = '';
+        foreach (@{$maps}) {
+            next if (!defined($new_datas->{$cpu_number}->{$_->{counter}}));
+        
+            my $value = (($new_datas->{$cpu_number}->{$_->{counter}} - $old_datas->{$cpu_number}->{$_->{counter}}) * 100) / 
+                         ($new_datas->{$cpu_number}->{total} - $old_datas->{$cpu_number}->{total});
+            $str_output .= $str_append . sprintf($_->{output}, $value);
+            $str_append = ', ';
+            my $warning = $self->{perfdata}->get_perfdata_for_output(label => 'warning-' . $_->{counter});
+            my $critical = $self->{perfdata}->get_perfdata_for_output(label => 'critical-' . $_->{counter});
+
+            $self->{output}->perfdata_add(label => 'cpu' . $cpu_number . '_' . $_->{counter}, unit => '%',
+                                          value => sprintf("%.2f", $value),
+                                          warning => $warning,
+                                          critical => $critical,
+                                          min => 0, max => 100);
+        }
+        $self->{output}->output_add(long_msg => $str_output);
+        if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
+            $self->{output}->output_add(severity => $exit,
+                                        short_msg => $str_output);
+        }
+    }
+ 
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check average usage for each CPUs (need '/proc/stat' file)
+(User, Nice, System, Idle, Wait, Interrupt, SoftIRQ, Steal, Guest, GuestNice)
+
+=over 8
+
+=item B<--warning-*>
+
+Threshold warning in percent.
+Can be: 'user', 'nice', 'system', 'idle', 'wait', 'interrupt', 'softirq', 'steal', 'guest', 'guestnice'.
+
+=item B<--critical-*>
+
+Threshold critical in percent.
+Can be: 'user', 'nice', 'system', 'idle', 'wait', 'interrupt', 'softirq', 'steal', 'guest', 'guestnice'.
+
+=item B<--remote>
+
+Execute command remotely in 'ssh'.
+
+=item B<--hostname>
+
+Hostname to query (need --remote).
+
+=item B<--ssh-option>
+
+Specify multiple options like the user (example: --ssh-option='-l=centreon-engine' --ssh-option='-p=52').
+
+=item B<--ssh-path>
+
+Specify ssh command path (default: none)
+
+=item B<--ssh-command>
+
+Specify ssh command (default: 'ssh'). Useful to use 'plink'.
+
+=item B<--timeout>
+
+Timeout in seconds for the command (Default: 30).
+
+=item B<--sudo>
+
+Use 'sudo' to execute the command.
+
+=item B<--command>
+
+Command to get information (Default: 'cat').
+Can be changed if you have output in a file.
+
+=item B<--command-path>
+
+Command path (Default: none).
+
+=item B<--command-options>
+
+Command options (Default: '/proc/stat 2>&1').
+
+=back
+
+=cut
diff --git a/os/linux/local/mode/listinterfaces.pm b/os/linux/local/mode/listinterfaces.pm
index f3c6cabfd..333086038 100644
--- a/os/linux/local/mode/listinterfaces.pm
+++ b/os/linux/local/mode/listinterfaces.pm
@@ -62,6 +62,7 @@ sub new {
                                   "filter-name:s"     => { name => 'filter_name', },
                                   "filter-state:s"    => { name => 'filter_state', },
                                   "no-loopback"       => { name => 'no_loopback', },
+                                  "skip-novalues"     => { name => 'skip_novalues', },
                                 });
     $self->{result} = {};
     return $self;
@@ -87,12 +88,26 @@ sub manage_selection {
         $states .= 'R' if ($values =~ /RUNNING/ms);
         $states .= 'U' if ($values =~ /UP/ms);
         
-        next if (defined($self->{option_results}->{no_loopback}) && $values =~ /LOOPBACK/ms);
-        next if (defined($self->{option_results}->{filter_name}) && $self->{option_results}->{filter_name} ne '' &&
-                 $interface_name !~ /$self->{option_results}->{filter_name}/);
-        next if (defined($self->{option_results}->{filter_state}) && $self->{option_results}->{filter_state} ne '' &&
-                 $states !~ /$self->{option_results}->{filter_state}/);
+        if (defined($self->{option_results}->{no_loopback}) && $values =~ /LOOPBACK/ms) {
+            $self->{output}->output_add(long_msg => "Skipping interface '" . $interface_name . "': option --no-loopback");
+            next;
+        }
+        if (defined($self->{option_results}->{filter_name}) && $self->{option_results}->{filter_name} ne '' &&
+            $interface_name !~ /$self->{option_results}->{filter_name}/) {
+            $self->{output}->output_add(long_msg => "Skipping interface '" . $interface_name . "': no matching filter name");
+            next;
+        }
+        if (defined($self->{option_results}->{filter_state}) && $self->{option_results}->{filter_state} ne '' &&
+            $states !~ /$self->{option_results}->{filter_state}/) {
+            $self->{output}->output_add(long_msg => "Skipping interface '" . $interface_name . "': no matching filter state");
+            next;
+        }
         
+        $values =~ /RX bytes:(\S+).*?TX bytes:(\S+)/msi;
+        if (defined($self->{option_results}->{skip_novalues}) && !defined($1)) {
+            $self->{output}->output_add(long_msg => "Skipping interface '" . $interface_name . "': no values");
+            next;
+        }
         $self->{result}->{$interface_name} = {state => $states};
     }    
 }
@@ -101,16 +116,13 @@ sub run {
     my ($self, %options) = @_;
 	
     $self->manage_selection();
-    my $interfaces_display = '';
-    my $interfaces_display_append = '';
     foreach my $name (sort(keys %{$self->{result}})) {
-        $interfaces_display .= $interfaces_display_append . 'name = ' . $name . ' [state = ' . $self->{result}->{$name}->{state} . ']';
-        $interfaces_display_append = ', ';
+        $self->{output}->output_add(long_msg => "'" . $name . "' [state = '" . $self->{result}->{$name}->{state} . "']");
     }
     
     $self->{output}->output_add(severity => 'OK',
-                                short_msg => 'List interfaces: ' . $interfaces_display);
-    $self->{output}->display(nolabel => 1);
+                                short_msg => 'List interfaces:');
+    $self->{output}->display(nolabel => 1, force_ignore_perfdata => 1, force_long_output => 1);
     $self->{output}->exit();
 }
 
@@ -195,6 +207,10 @@ Can be: 'R' (running), 'U' (up).
 
 Don't display loopback interfaces.
 
+=item B<--skip-novalues>
+
+Filter interface without in/out byte values.
+
 =back
 
 =cut
\ No newline at end of file
diff --git a/os/linux/local/mode/listpartitions.pm b/os/linux/local/mode/listpartitions.pm
index 1064c774a..1906d902e 100644
--- a/os/linux/local/mode/listpartitions.pm
+++ b/os/linux/local/mode/listpartitions.pm
@@ -86,8 +86,11 @@ sub manage_selection {
         next if ($line !~ /^\s*(\S+)\s+(\S+)\s+(\S+)\s+(\S+)/);
         my ($major, $minor, $blocks, $name) = ($1, $2, $3, $4);
         
-        next if (defined($self->{option_results}->{filter_name}) && $self->{option_results}->{filter_name} ne '' &&
-                 $name !~ /$self->{option_results}->{filter_name}/);
+        if (defined($self->{option_results}->{filter_name}) && $self->{option_results}->{filter_name} ne '' &&
+            $name !~ /$self->{option_results}->{filter_name}/) {
+            $self->{output}->output_add(long_msg => "Skipping partition '" . $name . "': no matching filter name");
+            next;
+        }
         
         $self->{result}->{$name} = 1;
     }
@@ -97,16 +100,13 @@ sub run {
     my ($self, %options) = @_;
 	
     $self->manage_selection();
-    my $partitions_display = '';
-    my $partitions_display_append = '';
     foreach my $name (sort(keys %{$self->{result}})) {
-        $partitions_display .= $partitions_display_append . 'name = ' . $name;
-        $partitions_display_append = ', ';
+        $self->{output}->output_add(long_msg => "'" . $name . "'");
     }
     
     $self->{output}->output_add(severity => 'OK',
-                                short_msg => 'List partitions: ' . $partitions_display);
-    $self->{output}->display(nolabel => 1);
+                                short_msg => 'List partitions:');
+    $self->{output}->display(nolabel => 1, force_ignore_perfdata => 1, force_long_output => 1);
     $self->{output}->exit();
 }
 
diff --git a/os/linux/local/mode/liststorages.pm b/os/linux/local/mode/liststorages.pm
index c9f684ff9..395732dd8 100644
--- a/os/linux/local/mode/liststorages.pm
+++ b/os/linux/local/mode/liststorages.pm
@@ -88,12 +88,21 @@ sub manage_selection {
         next if ($line !~ /^(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(.*)/);
         my ($fs, $type, $size, $used, $available, $percent, $mount) = ($1, $2, $3, $4, $5, $6, $7);
         
-        next if (defined($self->{option_results}->{filter_fs}) && $self->{option_results}->{filter_fs} ne '' &&
-                 $fs !~ /$self->{option_results}->{filter_fs}/);
-        next if (defined($self->{option_results}->{filter_type}) && $self->{option_results}->{filter_type} ne '' &&
-                 $type !~ /$self->{option_results}->{filter_type}/);
-        next if (defined($self->{option_results}->{filter_mount}) && $self->{option_results}->{filter_mount} ne '' &&
-                 $mount !~ /$self->{option_results}->{filter_mount}/);
+        if (defined($self->{option_results}->{filter_fs}) && $self->{option_results}->{filter_fs} ne '' &&
+            $fs !~ /$self->{option_results}->{filter_fs}/) {
+            $self->{output}->output_add(long_msg => "Skipping storage '" . $mount . "': no matching filter filesystem");
+            next;
+        }
+        if (defined($self->{option_results}->{filter_type}) && $self->{option_results}->{filter_type} ne '' &&
+            $type !~ /$self->{option_results}->{filter_type}/) {
+            $self->{output}->output_add(long_msg => "Skipping storage '" . $mount . "': no matching filter filesystem type");
+            next;
+        }
+        if (defined($self->{option_results}->{filter_mount}) && $self->{option_results}->{filter_mount} ne '' &&
+            $mount !~ /$self->{option_results}->{filter_mount}/) {
+            $self->{output}->output_add(long_msg => "Skipping storage '" . $mount . "': no matching filter mount point");
+            next;
+        }
         
         $self->{result}->{$mount} = {fs => $fs, type => $type};
     }
@@ -103,16 +112,13 @@ sub run {
     my ($self, %options) = @_;
 	
     $self->manage_selection();
-    my $storages_display = '';
-    my $storages_display_append = '';
     foreach my $name (sort(keys %{$self->{result}})) {
-        $storages_display .= $storages_display_append . 'name = ' . $name . ' [fs = ' . $self->{result}->{$name}->{fs} . ', type = ' . $self->{result}->{$name}->{type} . ']';
-        $storages_display_append = ', ';
+        $self->{output}->output_add(long_msg => "'" . $name . "' [fs = " . $self->{result}->{$name}->{fs} . '] [type = ' . $self->{result}->{$name}->{type} . ']');
     }
     
     $self->{output}->output_add(severity => 'OK',
-                                short_msg => 'List storages: ' . $storages_display);
-    $self->{output}->display(nolabel => 1);
+                                short_msg => 'List storages:');
+    $self->{output}->display(nolabel => 1, force_ignore_perfdata => 1, force_long_output => 1);
     $self->{output}->exit();
 }
 
diff --git a/os/linux/local/mode/loadaverage.pm b/os/linux/local/mode/loadaverage.pm
index f2bdd73be..9297c090d 100644
--- a/os/linux/local/mode/loadaverage.pm
+++ b/os/linux/local/mode/loadaverage.pm
@@ -56,11 +56,12 @@ sub new {
                                   "ssh-command:s"     => { name => 'ssh_command', default => 'ssh' },
                                   "timeout:s"         => { name => 'timeout', default => 30 },
                                   "sudo"              => { name => 'sudo' },
-                                  "command:s"         => { name => 'command', default => 'cat' },
+                                  "command:s"         => { name => 'command', default => 'tail' },
                                   "command-path:s"    => { name => 'command_path' },
-                                  "command-options:s" => { name => 'command_options', default => '/proc/loadavg 2>&1' },
+                                  "command-options:s" => { name => 'command_options', default => '-n +1 /proc/loadavg /proc/stat 2>&1' },
                                   "warning:s"         => { name => 'warning', default => '' },
                                   "critical:s"        => { name => 'critical', default => '' },
+                                  "average"           => { name => 'average' },
                                 });
     return $self;
 }
@@ -109,42 +110,98 @@ sub run {
                                                   command_options => $self->{option_results}->{command_options});
     
     my ($load1m, $load5m, $load15m);
-    if ($stdout =~ /([0-9\.]+)\s+([0-9\.]+)\s+([0-9\.]+)/) {
+    my ($msg, $cpu_load1, $cpu_load5, $cpu_load15);
+
+    if ($stdout =~ /\/proc\/loadavg.*?([0-9\.]+)\s+([0-9\.]+)\s+([0-9\.]+)/ms) {
         ($load1m, $load5m, $load15m) = ($1, $2, $3)
     }
-    
+
     if (!defined($load1m) || !defined($load5m) || !defined($load15m)) {
         $self->{output}->add_option_msg(short_msg => "Some informations missing.");
         $self->{output}->option_exit();
     }
-    
-    my $exit1 = $self->{perfdata}->threshold_check(value => $load1m, 
-                               threshold => [ { label => 'crit1', 'exit_litteral' => 'critical' }, { label => 'warn1', exit_litteral => 'warning' } ]);
-    my $exit2 = $self->{perfdata}->threshold_check(value => $load5m, 
-                               threshold => [ { label => 'crit5', 'exit_litteral' => 'critical' }, { label => 'warn5', exit_litteral => 'warning' } ]);
-    my $exit3 = $self->{perfdata}->threshold_check(value => $load15m, 
-                               threshold => [ { label => 'crit15', 'exit_litteral' => 'critical' }, { label => 'warn15', exit_litteral => 'warning' } ]);
-    
-    my $exit = $self->{output}->get_most_critical(status => [ $exit1, $exit2, $exit3 ]);
-    $self->{output}->output_add(severity => $exit,
-                                short_msg => sprintf("Load average: %s, %s, %s", $load1m, $load5m, $load15m));
-            
-    $self->{output}->perfdata_add(label => 'load1',
-                                  value => $load1m,
+
+    if (defined($self->{option_results}->{average})) {    
+        my $countCpu = 0;
+        
+        $countCpu++ while ($stdout =~ /^cpu\d+/msg);
+        
+        if ($countCpu == 0){
+            $self->{output}->output_add(severity => 'unknown',
+                                        short_msg => 'Unable to get number of CPUs');
+            $self->{output}->display();
+            $self->{output}->exit();    
+        }
+
+        $cpu_load1 = sprintf("%0.2f", $load1m / $countCpu);
+        $cpu_load5 = sprintf("%0.2f", $load5m / $countCpu);
+        $cpu_load15 = sprintf("%0.2f", $load15m / $countCpu);
+        $msg = sprintf("Load average: %s [%s/%s CPUs], %s [%s/%s CPUs], %s [%s/%s CPUs]", $cpu_load1, $load1m, $countCpu,
+                       $cpu_load5, $load5m, $countCpu,
+                       $cpu_load15, $load15m, $countCpu);
+        $self->{output}->perfdata_add(label => 'avg_load1',
+                                  value => $cpu_load1,
                                   warning => $self->{perfdata}->get_perfdata_for_output(label => 'warn1'),
                                   critical => $self->{perfdata}->get_perfdata_for_output(label => 'crit1'),
                                   min => 0);
-    $self->{output}->perfdata_add(label => 'load5',
-                                  value => $load5m,
+        $self->{output}->perfdata_add(label => 'avg_load5',
+                                  value => $cpu_load5,
                                   warning => $self->{perfdata}->get_perfdata_for_output(label => 'warn5'),
                                   critical => $self->{perfdata}->get_perfdata_for_output(label => 'crit5'),
                                   min => 0);
-    $self->{output}->perfdata_add(label => 'load15',
-                                  value => $load15m,
+        $self->{output}->perfdata_add(label => 'avg_load15',
+                                  value => $cpu_load15,
                                   warning => $self->{perfdata}->get_perfdata_for_output(label => 'warn15'),
                                   critical => $self->{perfdata}->get_perfdata_for_output(label => 'crit15'),
                                   min => 0);
- 
+        $self->{output}->perfdata_add(label => 'load1',
+                                  value => $load1m,
+                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warn1', op => '*', value => $countCpu),
+                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'crit1', op => '*', value => $countCpu),
+                                  min => 0);
+        $self->{output}->perfdata_add(label => 'load5',
+                                  value => $load5m,
+                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warn5', op => '*', value => $countCpu),
+                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'crit5', op => '*', value => $countCpu),
+                                  min => 0);
+        $self->{output}->perfdata_add(label => 'load15',
+                                  value => $load15m,
+                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warn15', op => '*', value => $countCpu),
+                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'crit15', op => '*', value => $countCpu),
+                                  min => 0);
+    } else {
+        $cpu_load1 = $load1m;
+        $cpu_load5 = $load5m;
+        $cpu_load15 = $load15m;
+    
+        $msg = sprintf("Load average: %s, %s, %s", $cpu_load1, $cpu_load5, $cpu_load15);
+        $self->{output}->perfdata_add(label => 'load1',
+                                  value => $cpu_load1,
+                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warn1'),
+                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'crit1'),
+                                  min => 0);
+        $self->{output}->perfdata_add(label => 'load5',
+                                  value => $cpu_load5,
+                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warn5'),
+                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'crit5'),
+                                  min => 0);
+        $self->{output}->perfdata_add(label => 'load15',
+                                  value => $cpu_load15,
+                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warn15'),
+                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'crit15'),
+                                  min => 0);
+    }
+    
+    my $exit1 = $self->{perfdata}->threshold_check(value => $cpu_load1,
+                                                   threshold => [ { label => 'crit1', 'exit_litteral' => 'critical' }, { label => 'warn1', exit_litteral => 'warning' } ]);
+    my $exit2 = $self->{perfdata}->threshold_check(value => $cpu_load5,
+                                                   threshold => [ { label => 'crit5', 'exit_litteral' => 'critical' }, { label => 'warn5', exit_litteral => 'warning' } ]);
+    my $exit3 = $self->{perfdata}->threshold_check(value => $cpu_load15,
+                                                   threshold => [ { label => 'crit15', 'exit_litteral' => 'critical' }, { label => 'warn15', exit_litteral => 'warning' } ]);
+    my $exit = $self->{output}->get_most_critical(status => [ $exit1, $exit2, $exit3 ]);
+    $self->{output}->output_add(severity => $exit,
+                                short_msg => $msg);
+
     $self->{output}->display();
     $self->{output}->exit();
 }
@@ -167,6 +224,10 @@ Threshold warning (1min,5min,15min).
 
 Threshold critical (1min,5min,15min).
 
+=item B<--average>
+
+Load average for the number of CPUs.
+
 =item B<--remote>
 
 Execute command remotely in 'ssh'.
@@ -197,7 +258,7 @@ Use 'sudo' to execute the command.
 
 =item B<--command>
 
-Command to get information (Default: 'cat').
+Command to get information (Default: 'tail').
 Can be changed if you have output in a file.
 
 =item B<--command-path>
@@ -206,7 +267,7 @@ Command path (Default: none).
 
 =item B<--command-options>
 
-Command options (Default: '/proc/loadavg 2>&1').
+Command options (Default: '-n +1 /proc/loadavg /proc/stat 2>&1').
 
 =back
 
diff --git a/os/linux/local/mode/packeterrors.pm b/os/linux/local/mode/packeterrors.pm
index cf48eb97c..70fdd0039 100644
--- a/os/linux/local/mode/packeterrors.pm
+++ b/os/linux/local/mode/packeterrors.pm
@@ -96,11 +96,12 @@ sub new {
                                   "command:s"         => { name => 'command', default => 'ifconfig' },
                                   "command-path:s"    => { name => 'command_path', default => '/sbin' },
                                   "command-options:s" => { name => 'command_options', default => '-a 2>&1' },
-                                  "filter-state:s"    => { name => 'filter_state', default => 'RU' },
+                                  "filter-state:s"    => { name => 'filter_state', },
                                   "name:s"                  => { name => 'name' },
                                   "regexp"                  => { name => 'use_regexp' },
                                   "regexp-isensitive"       => { name => 'use_regexpi' },
                                   "no-loopback"             => { name => 'no_loopback', },
+                                  "skip"                    => { name => 'skip' },
                                 });
     foreach (keys %{$maps_counters}) {
         foreach my $name (keys %{$maps_counters->{$_}->{thresholds}}) {
@@ -163,7 +164,7 @@ sub manage_selection {
             && $interface_name ne $self->{option_results}->{name});
 
         $values =~ /RX packets:(\d+).*?TX packets:(\d+)/msi;
-        $self->{result}->{$interface_name} = {total_in => $1, total_out => $2};
+        $self->{result}->{$interface_name} = {total_in => $1, total_out => $2, state => $states};
         foreach (keys %{$maps_counters}) {
             $values =~ /$maps_counters->{$_}->{regexp}/msi;
             $self->{result}->{$interface_name}->{$_} = $1;
@@ -197,9 +198,35 @@ sub run {
     
     foreach my $name (sort(keys %{$self->{result}})) {
 
+        if ($self->{result}->{$name}->{state} !~ /RU/) {
+            if (!defined($self->{option_results}->{skip})) {
+                $self->{output}->output_add(severity => 'CRITICAL',
+                                            short_msg => "Interface '" . $name . "' is not up or/and running");
+            } else {
+                # Avoid getting "buffer creation..." alone
+                if (defined($self->{option_results}->{name}) && !defined($self->{option_results}->{use_regexp})) {
+                    $self->{output}->output_add(severity => 'OK',
+                                                short_msg => "Interface '" . $name . "' is not up or/and running (normal state)");
+                }
+                $self->{output}->output_add(long_msg => "Skip interface '" . $name . "': not up or/and running.");
+            }
+            next;
+        }
+        
+        # Some interface are running but not have bytes in/out
+        if (!defined($self->{result}->{$name}->{total_in})) {
+            if (defined($self->{option_results}->{name}) && !defined($self->{option_results}->{use_regexp})) {
+                    $self->{output}->output_add(severity => 'OK',
+                                                short_msg => "Interface '" . $name . "' is up and running but can't get packets (no values)");
+            }
+            $self->{output}->output_add(long_msg => "Skip interface '" . $name . "': can't get packets.");
+            next;
+        }
+    
         my $old_datas = {};
         my $next = 0;
         foreach (keys %{$self->{result}->{$name}}) {
+            next if ($_ eq 'state');
             $new_datas->{$_ . '_' . $name} = $self->{result}->{$name}->{$_};
             $old_datas->{$_ . '_' . $name} = $self->{statefile_value}->get(name => $_ . '_' . $name);
             if (!defined($old_datas->{$_ . '_' . $name})) {
@@ -353,7 +380,11 @@ Allows to use regexp non case-sensitive (with --regexp).
 
 =item B<--filter-state>
 
-Filter filesystem type (regexp can be used. Default: 'RU').
+Filter filesystem type (regexp can be used).
+
+=item B<--skip>
+
+Skip errors on interface status (not up and running).
 
 =item B<--no-loopback>
 
diff --git a/os/linux/local/mode/swap.pm b/os/linux/local/mode/swap.pm
index 0faf5d9eb..169d8dff1 100644
--- a/os/linux/local/mode/swap.pm
+++ b/os/linux/local/mode/swap.pm
@@ -61,7 +61,9 @@ sub new {
                                   "command-options:s" => { name => 'command_options', default => '/proc/meminfo 2>&1' },
                                   "warning:s"         => { name => 'warning', },
                                   "critical:s"        => { name => 'critical', },
+                                  "no-swap:s"               => { name => 'no_swap' },
                                 });
+    $self->{no_swap} = 'critical';
     return $self;
 }
 
@@ -77,6 +79,13 @@ sub check_options {
        $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'.");
        $self->{output}->option_exit();
     }
+    if (defined($self->{option_results}->{no_swap}) && $self->{option_results}->{no_swap} ne '') {
+        if ($self->{output}->is_litteral_status(status => $self->{option_results}->{no_swap}) == 0) {
+            $self->{output}->add_option_msg(short_msg => "Wrong --no-swap status '" . $self->{option_results}->{no_swap} . "'.");
+            $self->{output}->option_exit();
+        }
+         $self->{no_swap} = $self->{option_results}->{no_swap};
+    }
 }
 
 sub run {
@@ -102,6 +111,12 @@ sub run {
         $self->{output}->add_option_msg(short_msg => "Some informations missing.");
         $self->{output}->option_exit();
     }
+    if ($total_size == 0) {
+        $self->{output}->output_add(severity => $self->{no_swap},
+                                    short_msg => 'No active swap.');
+        $self->{output}->display();
+        $self->{output}->exit();
+    }
     
     my $swap_used = $total_size - $swap_free;
     
@@ -146,6 +161,10 @@ Threshold warning in percent.
 
 Threshold critical in percent.
 
+=item B<--no-swap>
+
+Threshold if no active swap (default: 'critical').
+
 =item B<--remote>
 
 Execute command remotely in 'ssh'.
diff --git a/os/linux/local/mode/traffic.pm b/os/linux/local/mode/traffic.pm
index ce491318c..49883de20 100644
--- a/os/linux/local/mode/traffic.pm
+++ b/os/linux/local/mode/traffic.pm
@@ -61,7 +61,7 @@ sub new {
                                   "command:s"         => { name => 'command', default => 'ifconfig' },
                                   "command-path:s"    => { name => 'command_path', default => '/sbin' },
                                   "command-options:s" => { name => 'command_options', default => '-a 2>&1' },
-                                  "filter-state:s"    => { name => 'filter_state', default => 'RU' },
+                                  "filter-state:s"    => { name => 'filter_state', },
                                   "warning-in:s"      => { name => 'warning_in' },
                                   "critical-in:s"     => { name => 'critical_in' },
                                   "warning-out:s"     => { name => 'warning_out' },
@@ -72,6 +72,7 @@ sub new {
                                   "regexp-isensitive"   => { name => 'use_regexpi' },
                                   "speed:s"             => { name => 'speed' },
                                   "no-loopback"         => { name => 'no_loopback', },
+                                  "skip"                => { name => 'skip' },
                                 });
     $self->{result} = {};
     $self->{hostname} = undef;
@@ -173,6 +174,31 @@ sub run {
     
     foreach my $name (sort(keys %{$self->{result}})) {
  
+        if ($self->{result}->{$name}->{state} !~ /RU/) {
+            if (!defined($self->{option_results}->{skip})) {
+                $self->{output}->output_add(severity => 'CRITICAL',
+                                            short_msg => "Interface '" . $name . "' is not up or/and running");
+            } else {
+                # Avoid getting "buffer creation..." alone
+                if (defined($self->{option_results}->{name}) && !defined($self->{option_results}->{use_regexp})) {
+                    $self->{output}->output_add(severity => 'OK',
+                                                short_msg => "Interface '" . $name . "' is not up or/and running (normal state)");
+                }
+                $self->{output}->output_add(long_msg => "Skip interface '" . $name . "': not up or/and running.");
+            }
+            next;
+        }
+        
+        # Some interface are running but not have bytes in/out
+        if (!defined($self->{result}->{$name}->{in})) {
+            if (defined($self->{option_results}->{name}) && !defined($self->{option_results}->{use_regexp})) {
+                    $self->{output}->output_add(severity => 'OK',
+                                                short_msg => "Interface '" . $name . "' is up and running but can't get traffic (no values)");
+            }
+            $self->{output}->output_add(long_msg => "Skip interface '" . $name . "': can't get traffic.");
+            next;
+        }
+ 
         $new_datas->{'in_' . $name} = $self->{result}->{$name}->{in} * 8;
         $new_datas->{'out_' . $name} = $self->{result}->{$name}->{out} * 8;
         
@@ -344,7 +370,11 @@ Allows to use regexp non case-sensitive (with --regexp).
 
 =item B<--filter-state>
 
-Filter interfaces type (regexp can be used. Default: 'RU').
+Filter interfaces type (regexp can be used).
+
+=item B<--skip>
+
+Skip errors on interface status (not up and running).
 
 =item B<--speed>
 
diff --git a/os/linux/local/plugin.pm b/os/linux/local/plugin.pm
index 9fdbac863..c6484799c 100644
--- a/os/linux/local/plugin.pm
+++ b/os/linux/local/plugin.pm
@@ -48,7 +48,9 @@ sub new {
     $self->{version} = '0.1';
     %{$self->{modes}} = (
                          'cpu'              => 'os::linux::local::mode::cpu',
+                         'cpu-detailed'     => 'os::linux::local::mode::cpudetailed',
                          'cmd-return'       => 'os::linux::local::mode::cmdreturn',
+                         'connections'      => 'os::linux::local::mode::connections',
                          'diskio'           => 'os::linux::local::mode::diskio',
                          'files-size'       => 'os::linux::local::mode::filessize',
                          'files-date'       => 'os::linux::local::mode::filesdate',
diff --git a/os/linux/snmp/plugin.pm b/os/linux/snmp/plugin.pm
index 279091831..ec43d5227 100644
--- a/os/linux/snmp/plugin.pm
+++ b/os/linux/snmp/plugin.pm
@@ -48,6 +48,7 @@ sub new {
     $self->{version} = '0.1';
     %{$self->{modes}} = (
                          'cpu'              => 'snmp_standard::mode::cpu',
+                         'cpu-detailed'     => 'snmp_standard::mode::cpudetailed',
                          'diskio'           => 'snmp_standard::mode::diskio',
                          'disk-usage'       => 'snmp_standard::mode::diskusage',
                          'inodes'           => 'snmp_standard::mode::inodes',
@@ -60,6 +61,7 @@ sub new {
                          'processcount'     => 'snmp_standard::mode::processcount',
                          'storage'          => 'snmp_standard::mode::storage',
                          'swap'             => 'snmp_standard::mode::swap',
+                         'tcpcon'           => 'snmp_standard::mode::tcpcon',
                          'traffic'          => 'snmp_standard::mode::traffic',
                          'uptime'           => 'snmp_standard::mode::uptime',
                          );
diff --git a/os/solaris/local/conf/prtdiag.conf b/os/solaris/local/conf/prtdiag.conf
index 02e0c4b29..c5acdac4e 100644
--- a/os/solaris/local/conf/prtdiag.conf
+++ b/os/solaris/local/conf/prtdiag.conf
@@ -100,7 +100,7 @@ checks.FRU.output_string = FRU '%Location%' operationnal status is '%Status%'
 
 [SunFire 280R]
 system.match = ^System Configuration:.*Sun Fire 280R
-system.checks = Leds,Fans,Disks,PSU
+system.checks = Leds,Fans,Disks,PSU,IO
 
 checks.Leds.description = system leds status
 checks.Leds.begin_match = ^System LED Status:\s+
@@ -132,10 +132,9 @@ checks.PSU.begin_match = ^Power Supplies:
 checks.PSU.end_match = ^=
 checks.PSU.data_match = ^(.*?\d+)\s+\[\s*(\S+)\s*\]
 checks.PSU.data_labels = Supply,Status
-checks.PSU.ok_condition = "%Status%" eq "OK"
+checks.PSU.ok_condition = "%Status%" =~ m/^OK|NO_FAULT$/
 checks.PSU.output_string = Power supply '%Supply%' status is '%Status%'
 
-
 [Enterprise 150]
 system.match = ^System Configuration:.*Sun Ultra 1 SBus
 system.checks = Boards
@@ -343,7 +342,7 @@ checks.Boards.data_labels = Diagnosis
 checks.Boards.ok_condition = "%Diagnosis%" =~ m/^No /
 checks.Boards.output_string = System diagnosis for IO cards is '%Diagnosis%'
 
-
+# OK Merethis
 [SunFire V240]
 system.match = ^System Configuration:.*Sun Fire V240
 system.checks = Fans,Leds,Temperatures,Voltages,Current,FRU
@@ -403,7 +402,15 @@ checks.FRU.output_string = FRU '%Location%' status is '%Status%'
 # OK Merethis
 [SunFire V440]
 system.match = ^System Configuration:.*Sun Fire V440
-system.checks = Fans,Leds,Temperatures,Voltages,Current,FRU
+system.checks = CPU,Fans,Leds,Temperatures,Voltages,Current,FRU
+
+checks.CPU.description = CPU status
+checks.CPU.begin_match = ^=+ CPUs =
+checks.CPU.end_match = ^$
+checks.CPU.data_match = ^\s*(\d+)\s+(?:.*?)\s+(\S+)\s+(\S+)\s*$
+checks.CPU.data_labels = CPU,Status,Location
+checks.CPU.ok_condition = "%Status%" =~ m/^on-line|online$/
+checks.CPU.output_string = CPU%CPU% ('%Location%') status is '%Status%'
 
 checks.Fans.description = fans status
 checks.Fans.begin_match = ^Fan Speeds:
@@ -457,7 +464,7 @@ checks.FRU.data_labels = Location,Status
 checks.FRU.ok_condition = "%Status%" =~ m/present|okay/
 checks.FRU.output_string = FRU '%Location%' status is '%Status%'
 
-
+# Ok Merethis
 [SunFire V490]
 system.match = ^System Configuration:.*Sun Fire V490
 system.checks = Temperatures,Leds,Disks,Fans,PSU
@@ -473,13 +480,11 @@ checks.Temperatures.output_string = Temperature sensor '%Sensor%' status is '%St
 
 checks.Leds.description = system leds status
 checks.Leds.begin_match = ^System LED Status:
-checks.Leds.end_match = ^=
-checks.Leds.fetch_mode = linear
-checks.Leds.skip_match = ^-+
-checks.Leds.data_match = ((?:\S+\s)*\S+),\[\s*(.*?)\s*\]
-checks.Leds.data_labels = Location,Status
-checks.Leds.ok_condition = not( ( "%Location%" eq "FAULT" ) and ("%Status%" eq "ON") )
-checks.Leds.output_string = System LED '%Location%' status is '%Status%'
+checks.Leds.end_match = :$
+checks.Leds.data_match = ^\s+\[\s*(.*?)\s*\]\s+\[\s*(.*?)\s*\]\s+\[\s*(.*?)\s*\]
+checks.Leds.data_labels = Location,Failure,Running
+checks.Leds.ok_condition = "%Failure%" ne "ON"
+checks.Leds.output_string = System failure led status is '%Failure%'
 
 checks.Disks.description = disks status
 checks.Disks.begin_match = ^Disk Status:
@@ -505,7 +510,53 @@ checks.PSU.data_labels = Supply,Status
 checks.PSU.ok_condition = "%Status%" eq "NO_FAULT"
 checks.PSU.output_string = Power supply '%Supply%' status is '%Status%'
 
+# Ok Merethis
+[SunFire 480]
+system.match = ^System Configuration:.*Sun Fire 480
+system.checks = Temperatures,Leds,Disks,Fans,PSU
 
+checks.Temperatures.description = temperature sensors
+checks.Temperatures.begin_match = ^System Temperatures.*:
+checks.Temperatures.end_match = ^$
+checks.Temperatures.skip_match = ^Device
+checks.Temperatures.data_match = ^(\S+)\s+(\S+)\s+(\S+)$
+checks.Temperatures.data_labels = Sensor,Temperature,Status
+checks.Temperatures.ok_condition = ( "%Status%" eq "OK" )
+checks.Temperatures.output_string = Temperature sensor '%Sensor%' status is '%Status%' (temp.: %Temperature% deg.)
+
+checks.Leds.description = system leds status
+checks.Leds.begin_match = ^System LED Status:
+checks.Leds.end_match = :$
+checks.Leds.data_match = ^\s+\[\s*(.*?)\s*\]\s+\[\s*(.*?)\s*\]\s+\[\s*(.*?)\s*\]
+checks.Leds.data_labels = Location,Failure,Running
+checks.Leds.ok_condition = "%Failure%" ne "ON"
+checks.Leds.output_string = System failure led status is '%Failure%'
+
+checks.Disks.description = disks status
+checks.Disks.begin_match = ^Disk Status:
+checks.Disks.end_match = ^$
+checks.Disks.data_match = ^(.*?\d+)(?:.*?)\[\s*(\S+)\s*\]\s*$
+checks.Disks.data_labels = Disk,Status
+checks.Disks.ok_condition = "%Status%" eq "NO_FAULT"
+checks.Disks.output_string = Disk '%Disk%' status is '%Status%'
+
+checks.Fans.description = fans status
+checks.Fans.begin_match = ^Fan Status:
+checks.Fans.end_match = ^=
+checks.Fans.data_match = ^(\S+)\s+(\S+)\s+(.*?)\s+\[\s*(\S+)\s*\]
+checks.Fans.data_labels = Tray,Fan,Speed,Status
+checks.Fans.ok_condition = "%Status%" eq "NO_FAULT"
+checks.Fans.output_string = Fan '%Tray%/%Fan%' status is '%Status%' (speed: %Speed% rpm)
+
+checks.PSU.description = power supplies status
+checks.PSU.begin_match = ^Power Supplies:
+checks.PSU.end_match = ^=
+checks.PSU.data_match = ^(.*?)\s+\[\s*(\S+)\s*\]
+checks.PSU.data_labels = Supply,Status
+checks.PSU.ok_condition = "%Status%" eq "NO_FAULT"
+checks.PSU.output_string = Power supply '%Supply%' status is '%Status%'
+
+# OK Merethis
 [SunFire 880]
 system.match = ^System Configuration:.*Sun Fire 880
 system.checks = Boards,Temperatures,Leds,Disks,Fans,PSU
@@ -534,7 +585,7 @@ checks.Leds.skip_match = ^$
 checks.Leds.fetch_mode = linear
 checks.Leds.data_match = ((?:\S+\s)*\S+),\[\s*(.*?)\s*\]
 checks.Leds.data_labels = Location,Status
-checks.Leds.ok_condition = not( ( "%Location%" eq "FAULT" ) and ("%Status%" eq "ON") )
+checks.Leds.ok_condition = not( ( "%Location%" =~ /FAULT/ ) and ("%Status%" eq "ON") )
 checks.Leds.output_string = System LED '%Location%' status is '%Status%'
 
 checks.Disks.description = disks status
@@ -626,5 +677,3 @@ checks.FRU.data_match = ^(\S+)\s+(\S+)
 checks.FRU.data_labels = Location,Status
 checks.FRU.ok_condition = "%Status%" =~ m/present|okay/
 checks.FRU.output_string = FRU '%Location%' status is '%Status%'
-
-
diff --git a/os/solaris/local/mode/hwraidctl.pm b/os/solaris/local/mode/hwraidctl.pm
index 1ae8c7d20..01e961caa 100644
--- a/os/solaris/local/mode/hwraidctl.pm
+++ b/os/solaris/local/mode/hwraidctl.pm
@@ -117,7 +117,8 @@ sub run {
         }
     }
 
-    my ($exit_code) = check_threshold($volumes_errors, $OPTION{warning}, $OPTION{critical});
+    my ($exit_code) = $self->{perfdata}->threshold_check(value => $volumes_errors, 
+                                                         threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]); 
     if ($volumes_errors > 0) {
         $self->{output}->output_add(severity => $exit_code,
                                     short_msg => sprintf("Some volumes problems:" . $volumes));
diff --git a/os/solaris/local/mode/prtdiag.pm b/os/solaris/local/mode/prtdiag.pm
index 5a16e75bd..abb5e6035 100644
--- a/os/solaris/local/mode/prtdiag.pm
+++ b/os/solaris/local/mode/prtdiag.pm
@@ -61,7 +61,7 @@ sub new {
                                   "sudo"              => { name => 'sudo' },
                                   "command:s"         => { name => 'command', default => 'prtdiag' },
                                   "command-path:s"    => { name => 'command_path', default => '/usr/platform/`/sbin/uname -i`/sbin' },
-                                  "command-options:s" => { name => 'command_options', default => '-v 2&1' },
+                                  "command-options:s" => { name => 'command_options', default => '-v 2>&1' },
                                   "config-file:s"     => { name => 'config_file' },
                                 });
     $self->{conf} = {};
@@ -266,6 +266,7 @@ sub prtdiag {
 sub run {
     my ($self, %options) = @_;
 
+    $self->load_prtdiag_config();
     $self->prtdiag();
     $self->{output}->display();
     $self->{output}->exit();
diff --git a/os/solaris/local/mode/svmdisks.pm b/os/solaris/local/mode/svmdisks.pm
index 70da0e56d..32f86e1fe 100644
--- a/os/solaris/local/mode/svmdisks.pm
+++ b/os/solaris/local/mode/svmdisks.pm
@@ -58,7 +58,7 @@ sub new {
                                   "sudo1"              => { name => 'sudo1' },
                                   "command1:s"         => { name => 'command1', default => 'metastat' },
                                   "command1-path:s"    => { name => 'command1_path', default => '/usr/sbin' },
-                                  "command1-options:s" => { name => 'command1_options', default => '-c 2>&1' },
+                                  "command1-options:s" => { name => 'command1_options', default => '2>&1' },
                                   "sudo2"              => { name => 'sudo2' },
                                   "command2:s"         => { name => 'command2', default => 'metadb' },
                                   "command2-path:s"    => { name => 'command2_path', default => '/usr/sbin' },
@@ -108,20 +108,43 @@ sub run {
 
     my $num_metastat_errors = 0;
     my $metastat_name = '';
-    foreach (split(/\n/, $stdout)) {
-        #d1               m 10.0GB d11 d12 (maint)
-        #       d11          s 10.0GB /dev/dsk/c5t600A0B80002929FC0000842E5251EE71d0s6
-        #       d12          s 10.0GB /dev/dsk/c5t600A0B800011978E000026D95251FEF1d0s6 (maint)
-        #d5               r  4.0GB /dev/dsk/c5t600A0B80002929FC000084305251EFADd0s6 /dev/dsk/c5t600A0B800011978E000026DC52520043d0s6 /dev/dsk/c5t600A0B800011978E000026E25252811Ad0s6
+    foreach my $disk_info (split(/(?=d\d+:)/, $stdout)) {
+        #d5: Mirror
+        #    Submirror 0: d15
+        #      State: Okay
+        #    Submirror 1: d25
+        #      State: Okay
+        #    Pass: 1
+        #    Read option: roundrobin (default)
+        #    Write option: parallel (default)
+        #    Size: 525798 blocks
         #
-        # Only need to check 's' (stripping) and 'r' (raid). 'm' (mirror) is (maint) because of 's' is (maint)
+        #d15: Submirror of d5
+        #    State: Okay
+        #    Size: 525798 blocks
+        #    Stripe 0:
+        #        Device     Start Block  Dbase        State Reloc Hot Spare
+        #        c0t0d0s5          0     No            Okay   Yes
+        #
+        #
+        #d25: Submirror of d5
+        #    State: Okay
+        #    Size: 525798 blocks
+        #    Stripe 0:
+        #        Device     Start Block  Dbase        State Reloc Hot Spare
+        #        c0t1d0s5          0     No            Okay   Yes
         
-        if (/^\s*(\S+)\s+(s|r)\s+\S+\s+(.*?)\(maint\)/i ) {
-            my $name = $1;
-            my $disks = $3;
-            $disks = trim($disks);
-            $num_metastat_errors++;
-            $metastat_name .= ' [' . $name . ' (' . $disks . ')]';
+        my @lines = split("\n",$disk_info);
+        my @line1 = split(/:/, $lines[0]);
+        my $disk = $line1[0];
+        my $type = $line1[1];
+        $type =~ s/^\s*(.*)\s*$/$1/;
+        #$type =~ s/\s+//g;
+        foreach my $line (@lines) {
+            if ($line =~ /^\s*(\S+)\s+(\S+)\s+(\S+)\s+Maint\S*\s+(.*?)$/i) {
+                $num_metastat_errors++;
+                $metastat_name .= ' [' . $1 . ' (' . $disk . ')][' . $type . ']';
+            }
         }
     }
     
@@ -160,11 +183,11 @@ sub run {
     my ($exit_code) = $self->{perfdata}->threshold_check(value => $num_metastat_errors, 
                                                          threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]); 
     if ($num_metastat_errors > 0) {
-        output_add(severity => $exit_code,
-                   short_msg => sprintf("Some metadevices need maintenance:" . $metastat_name));
+        $self->{output}->output_add(severity => $exit_code,
+                                    short_msg => sprintf("Some metadevices need maintenance:" . $metastat_name));
     } else {
-        output_add(severity => 'OK', 
-               short_msg => "No problems on metadevices");
+        $self->{output}->output_add(severity => 'OK', 
+                                    short_msg => "No problems on metadevices");
     }
     
     ($exit_code) = $self->{perfdata}->threshold_check(value => $num_metadb_errors, 
@@ -238,7 +261,7 @@ Command path (Default: '/usr/sbin').
 
 =item B<--command1-options>
 
-Command options (Default: '-c 2>&1').
+Command options (Default: '2>&1').
 
 =item B<--sudo2>
 
diff --git a/os/windows/snmp/mode/memory.pm b/os/windows/snmp/mode/memory.pm
index 03acfc070..57421f74d 100644
--- a/os/windows/snmp/mode/memory.pm
+++ b/os/windows/snmp/mode/memory.pm
@@ -119,8 +119,8 @@ sub run {
 
     $self->{output}->perfdata_add(label => "used",
                                   value => $physical_used,
-                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning', total => $total_size),
-                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical', total => $total_size),
+                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning', total => $total_size, cast_int => 1),
+                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical', total => $total_size, cast_int => 1),
                                   min => 0, max => $total_size);
 
     $self->{output}->display();
diff --git a/os/windows/snmp/mode/swap.pm b/os/windows/snmp/mode/swap.pm
index 779ed1253..60b186650 100644
--- a/os/windows/snmp/mode/swap.pm
+++ b/os/windows/snmp/mode/swap.pm
@@ -119,8 +119,8 @@ sub run {
 
     $self->{output}->perfdata_add(label => "used",
                                   value => $swap_used,
-                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning', total => $total_size),
-                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical', total => $total_size),
+                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning', total => $total_size, cast_int => 1),
+                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical', total => $total_size, cast_int => 1),
                                   min => 0, max => $total_size);
 
     $self->{output}->display();
diff --git a/os/windows/wsman/mode/listservices.pm b/os/windows/wsman/mode/listservices.pm
index 6be781286..a70367143 100644
--- a/os/windows/wsman/mode/listservices.pm
+++ b/os/windows/wsman/mode/listservices.pm
@@ -74,6 +74,7 @@ sub manage_selection {
         next if (!defined($self->{option_results}->{use_regexp}) && $name eq $self->{option_results}->{name});
         next if (defined($self->{option_results}->{use_regexp}) && $name =~ /$self->{option_results}->{name}/);
         
+        $self->{output}->output_add(long_msg => "Skipping service '" . $name . "': no matching filter name");
         delete $self->{result}->{$name};
     }
 }
@@ -84,21 +85,16 @@ sub run {
     $self->{wsman} = $options{wsman};
 
     $self->manage_selection();
-    my $services_display = '';
-    my $services_display_append = '';
     foreach my $name (sort(keys %{$self->{result}})) {
-
-        $services_display .= $services_display_append . 'name = ' . $name  . 
-                                ' [DisplayName = ' . $self->{output}->to_utf8($self->{result}->{$name}->{DisplayName}) . ',' . 
-                                 'StartMode = ' . $self->{result}->{$name}->{StartMode} . ',' .
-                                 'State = ' . $self->{result}->{$name}->{State} .
-                                ']';
-        $services_display_append = ', ';
+        $self->{output}->output_add(long_msg => "'" . $name . "' [DisplayName = " . $self->{output}->to_utf8($self->{result}->{$name}->{DisplayName}) . '] [' . 
+                                                'StartMode = ' . $self->{result}->{$name}->{StartMode} . '] [' .
+                                                'State = ' . $self->{result}->{$name}->{State} .
+                                                ']');
     }
     
     $self->{output}->output_add(severity => 'OK',
-                                short_msg => 'List services: ' . $services_display);
-    $self->{output}->display(nolabel => 1);
+                                short_msg => 'List services:');
+    $self->{output}->display(nolabel => 1, force_ignore_perfdata => 1, force_long_output => 1);
     $self->{output}->exit();
 }
 
diff --git a/snmp_standard/mode/cpu.pm b/snmp_standard/mode/cpu.pm
index e5ef4f84e..a7061af89 100644
--- a/snmp_standard/mode/cpu.pm
+++ b/snmp_standard/mode/cpu.pm
@@ -84,12 +84,12 @@ sub run {
         my $cpu_num = $1;
         
         $cpu += $result->{$key};
-        $i++;
         
         $self->{output}->output_add(long_msg => sprintf("CPU $i Usage is %.2f%%", $result->{$key}));
-        $self->{output}->perfdata_add(label => 'cpu' . $cpu_num,
-                                  value => sprintf("%.2f", $result->{$key}),
-                                  min => 0, max => 100);
+        $self->{output}->perfdata_add(label => 'cpu' . $i, unit => '%',
+                                      value => sprintf("%.2f", $result->{$key}),
+                                      min => 0, max => 100);
+        $i++;
     }
 
     my $avg_cpu = $cpu / $i;
@@ -97,7 +97,7 @@ sub run {
                                threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
     $self->{output}->output_add(severity => $exit_code,
                                 short_msg => sprintf("CPU(s) average usage is: %.2f%%", $avg_cpu));
-    $self->{output}->perfdata_add(label => 'total_cpu_avg',
+    $self->{output}->perfdata_add(label => 'total_cpu_avg', unit => '%',
                                   value => sprintf("%.2f", $avg_cpu),
                                   warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
                                   critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'),
@@ -113,7 +113,9 @@ __END__
 
 =head1 MODE
 
-Check system CPUs.
+Check system CPUs (HOST-RESOURCES-MIB)
+(The average, over the last minute, of the percentage 
+of time that this processor was not idle)
 
 =over 8
 
diff --git a/snmp_standard/mode/cpudetailed.pm b/snmp_standard/mode/cpudetailed.pm
new file mode 100644
index 000000000..fe78a882b
--- /dev/null
+++ b/snmp_standard/mode/cpudetailed.pm
@@ -0,0 +1,193 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package snmp_standard::mode::cpudetailed;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+use centreon::plugins::statefile;
+
+my $oids = {
+    '.1.3.6.1.4.1.2021.11.50.0' => { counter => 'user', output => 'User %.2f %%' }, # ssCpuRawUser
+    '.1.3.6.1.4.1.2021.11.51.0' => { counter => 'nice', output => 'Nice %.2f %%' }, # ssCpuRawNice
+    '.1.3.6.1.4.1.2021.11.52.0' => { counter => 'system', output => 'System %.2f %%' }, # ssCpuRawSystem
+    '.1.3.6.1.4.1.2021.11.53.0' => { counter => 'idle', output => 'Idle %.2f %%' }, # ssCpuRawIdle
+    '.1.3.6.1.4.1.2021.11.54.0' => { counter => 'wait', output => 'Wait %.2f %%' }, # ssCpuRawWait
+    '.1.3.6.1.4.1.2021.11.55.0' => { counter => 'kernel', output => 'Kernel %.2f %%' }, # ssCpuRawKernel
+    '.1.3.6.1.4.1.2021.11.56.0' => { counter => 'interrupt', output => 'Interrupt %.2f %%' }, # ssCpuRawInterrupt
+    '.1.3.6.1.4.1.2021.11.61.0' => { counter => 'softirq', output => 'Soft Irq %.2f %%' }, # ssCpuRawSoftIRQ
+    '.1.3.6.1.4.1.2021.11.64.0' => { counter => 'steal', output => 'Steal %.2f %%' }, # ssCpuRawSteal
+    '.1.3.6.1.4.1.2021.11.65.0' => { counter => 'guest', output => 'Guest %.2f %%' }, # ssCpuRawGuest
+    '.1.3.6.1.4.1.2021.11.66.0' => { counter => 'guestnice', output => 'Guest Nice %.2f %%' }, # ssCpuRawGuestNice
+};
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+                                { 
+                                });
+    foreach (keys %{$oids}) {
+        $options{options}->add_options(arguments => {
+                                                    'warning-' . $oids->{$_}->{counter} . ':s'    => { name => 'warning_' . $oids->{$_}->{counter} },
+                                                    'critical-' . $oids->{$_}->{counter} . ':s'    => { name => 'critical_' . $oids->{$_}->{counter} },
+                                                    });
+    }
+    $self->{statefile_value} = centreon::plugins::statefile->new(%options);
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+
+    foreach (keys %{$oids}) {
+        if (($self->{perfdata}->threshold_validate(label => 'warning-' . $oids->{$_}->{counter}, value => $self->{option_results}->{'warning_' . $oids->{$_}->{counter}})) == 0) {
+            $self->{output}->add_option_msg(short_msg => "Wrong warning-" . $oids->{$_}->{counter} . " threshold '" . $self->{option_results}->{'warning_' . $oids->{$_}->{counter}} . "'.");
+            $self->{output}->option_exit();
+        }
+        if (($self->{perfdata}->threshold_validate(label => 'critical-' . $oids->{$_}->{counter}, value => $self->{option_results}->{'critical_' . $oids->{$_}->{counter}})) == 0) {
+            $self->{output}->add_option_msg(short_msg => "Wrong critical-" . $oids->{$_}->{counter} . " threshold '" . $self->{option_results}->{'critical_' . $oids->{$_}->{counter}} . "'.");
+            $self->{output}->option_exit();
+        }
+    }
+    $self->{statefile_value}->check_options(%options);
+}
+
+sub run {
+    my ($self, %options) = @_;
+    # $options{snmp} = snmp object
+    $self->{snmp} = $options{snmp};
+    $self->{hostname} = $self->{snmp}->get_hostname();
+    $self->{snmp_port} = $self->{snmp}->get_port();
+    
+    my $result = $self->{snmp}->get_leef(oids => [keys %$oids], nothing_quit => 1);
+    
+    # Manage values
+    my ($total, $old_total, $buffer_creation) = (0, 0, 0);
+    my $new_datas = {};
+    my $old_datas = {};
+    $new_datas->{last_timestamp} = time();
+    $self->{statefile_value}->read(statefile => "snmpstandard_" . $self->{hostname}  . '_' . $self->{snmp_port} . '_' . $self->{mode});
+    foreach (keys %{$oids}) {
+        next if (!defined($result->{$_}));
+        $new_datas->{$oids->{$_}->{counter}} = $result->{$_};
+        $old_datas->{$oids->{$_}->{counter}} = $self->{statefile_value}->get(name => $oids->{$_}->{counter});
+        if (!defined($old_datas->{$oids->{$_}->{counter}})) {
+            $buffer_creation = 1;
+            next;
+        }
+        if ($new_datas->{$oids->{$_}->{counter}} < $old_datas->{$oids->{$_}->{counter}}) {
+            $buffer_creation = 1;
+            next;
+        }
+        $total += $new_datas->{$oids->{$_}->{counter}};
+        $old_total += $old_datas->{$oids->{$_}->{counter}};
+    }
+
+    $self->{statefile_value}->write(data => $new_datas);
+    if ($buffer_creation == 1) {
+        $self->{output}->output_add(severity => 'OK',
+                                    short_msg => "Buffer creation...");
+        $self->{output}->display();
+        $self->{output}->exit();
+    }
+    if ($total - $old_total == 0) {
+        $self->{output}->output_add(severity => 'OK',
+                                    short_msg => "Counter not moved. Have to wait.");
+        $self->{output}->display();
+        $self->{output}->exit();
+    }
+    
+    my @exits;
+    foreach (keys %{$oids}) {
+        next if (!defined($result->{$_}));
+        my $value = (($new_datas->{$oids->{$_}->{counter}} - $old_datas->{$oids->{$_}->{counter}}) * 100) / ($total - $old_total);
+        push @exits, $self->{perfdata}->threshold_check(value => $value, threshold => [ { label => 'critical-' . $oids->{$_}->{counter}, 'exit_litteral' => 'critical' }, { label => 'warning-' . $oids->{$_}->{counter}, 'exit_litteral' => 'warning' }]);
+    }
+
+    my $exit = $self->{output}->get_most_critical(status => [ @exits ]);
+    my $str_output = "CPU Usage: ";
+    my $str_append = '';
+    foreach (keys %{$oids}) {
+        next if (!defined($result->{$_}));
+        
+        my $value = (($new_datas->{$oids->{$_}->{counter}} - $old_datas->{$oids->{$_}->{counter}}) * 100) / ($total - $old_total);
+        $str_output .= $str_append . sprintf($oids->{$_}->{output}, $value);
+        $str_append = ', ';
+        my $warning = $self->{perfdata}->get_perfdata_for_output(label => 'warning-' . $oids->{$_}->{counter});
+        my $critical = $self->{perfdata}->get_perfdata_for_output(label => 'critical-' . $oids->{$_}->{counter});
+
+        $self->{output}->perfdata_add(label => $oids->{$_}->{counter}, unit => '%',
+                                      value => sprintf("%.2f", $value),
+                                      warning => $warning,
+                                      critical => $critical,
+                                      min => 0, max => 100);
+    }
+    $self->{output}->output_add(severity => $exit,
+                                short_msg => $str_output);
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check system CPUs (UCD-SNMP-MIB) (User, Nice, System, Idle, Wait, Kernel, Interrupt, SoftIRQ, Steal, Guest, GuestNice)
+An average of all CPUs.
+
+=over 8
+
+=item B<--warning-*>
+
+Threshold warning in percent.
+Can be: 'user', 'nice', 'system', 'idle', 'wait', 'kernel', 'interrupt', 'softirq', 'steal', 'guest', 'guestnice'.
+
+=item B<--critical-*>
+
+Threshold critical in percent.
+Can be: 'user', 'nice', 'system', 'idle', 'wait', 'kernel', 'interrupt', 'softirq', 'steal', 'guest', 'guestnice'.
+
+=back
+
+=cut
diff --git a/snmp_standard/mode/diskio.pm b/snmp_standard/mode/diskio.pm
index 440785e94..a063ae52b 100644
--- a/snmp_standard/mode/diskio.pm
+++ b/snmp_standard/mode/diskio.pm
@@ -54,7 +54,7 @@ sub new {
                                   "critical-read:s"         => { name => 'critical_read' },
                                   "warning-write:s"         => { name => 'warning_write' },
                                   "critical-write:s"        => { name => 'critical_write' },
-                                  "reload-cache-time:s"     => { name => 'reload_cache_time' },
+                                  "reload-cache-time:s"     => { name => 'reload_cache_time', default => 180 },
                                   "name"                    => { name => 'use_name' },
                                   "device:s"                => { name => 'device' },
                                   "regexp"                  => { name => 'use_regexp' },
@@ -207,6 +207,7 @@ sub run {
 sub reload_cache {
     my ($self) = @_;
     my $datas = {};
+    $datas->{last_timestamp} = time();
     $datas->{all_ids} = [];
 
     my $oid_diskIODevice = '.1.3.6.1.4.1.2021.13.15.1.1.2';
@@ -236,8 +237,8 @@ sub manage_selection {
     }
 
     my $timestamp_cache = $self->{statefile_cache}->get(name => 'last_timestamp');
-    if ($has_cache_file == 0 ||
-        (defined($timestamp_cache) && (time() - $timestamp_cache) > (($self->{option_results}->{reload_cache_time}) * 60))) {
+    if ($has_cache_file == 0 || !defined($timestamp_cache) || 
+        ((time() - $timestamp_cache) > (($self->{option_results}->{reload_cache_time}) * 60))) {
         $self->reload_cache();
         $self->{statefile_cache}->read();
     }
diff --git a/snmp_standard/mode/diskusage.pm b/snmp_standard/mode/diskusage.pm
index 9c839e282..df1cc9bec 100644
--- a/snmp_standard/mode/diskusage.pm
+++ b/snmp_standard/mode/diskusage.pm
@@ -59,7 +59,7 @@ sub new {
                                   "critical:s"              => { name => 'critical' },
                                   "units:s"                 => { name => 'units', default => '%' },
                                   "free"                    => { name => 'free' },
-                                  "reload-cache-time:s"     => { name => 'reload_cache_time' },
+                                  "reload-cache-time:s"     => { name => 'reload_cache_time', default => 180 },
                                   "diskpath:s"              => { name => 'diskpath' },
                                   "name"                    => { name => 'use_name' },
                                   "regexp"                  => { name => 'use_regexp' },
@@ -107,13 +107,10 @@ sub run {
                                  $oid_dskUsedLow, $oid_dskUsedHigh], instances => $self->{diskpath_id_selected});
     my $result = $self->{snmp}->get_leef(nothing_quit => 1);
 
-    
-
     my $num_disk_check = 0;
     foreach (sort @{$self->{diskpath_id_selected}}) {
         my $name_diskpath = $self->get_display_value(id => $_);
 
-        # in bytes hrStorageAllocationUnits
         my $total_size = (($result->{$oid_dskTotalHigh . "." . $_} << 32) + $result->{$oid_dskTotalLow . "." . $_}) * 1024;
         if (defined($self->{option_results}->{space_reservation})) {
             $total_size = $total_size - ($self->{option_results}->{space_reservation} * $total_size / 100);
@@ -192,6 +189,7 @@ sub reload_cache {
     my $datas = {};
 
     my $result = $self->{snmp}->get_table(oid => $oid_dskPath);
+    $datas->{last_timestamp} = time();
     $datas->{all_ids} = [];
     my $last_num = 0;
     foreach my $key ($self->{snmp}->oid_lex_sort(keys %$result)) {
@@ -219,8 +217,8 @@ sub manage_selection {
     }
 
     my $timestamp_cache = $self->{statefile_cache}->get(name => 'last_timestamp');
-    if ($has_cache_file == 0 ||
-        (defined($timestamp_cache) && (time() - $timestamp_cache) > (($self->{option_results}->{reload_cache_time}) * 60))) {
+    if ($has_cache_file == 0 || !defined($timestamp_cache) || 
+        ((time() - $timestamp_cache) > (($self->{option_results}->{reload_cache_time}) * 60))) {
             $self->reload_cache();
             $self->{statefile_cache}->read();
     }
diff --git a/snmp_standard/mode/inodes.pm b/snmp_standard/mode/inodes.pm
index a48741dd6..00fc32d3e 100644
--- a/snmp_standard/mode/inodes.pm
+++ b/snmp_standard/mode/inodes.pm
@@ -54,7 +54,7 @@ sub new {
                                 { 
                                   "warning:s"               => { name => 'warning' },
                                   "critical:s"              => { name => 'critical' },
-                                  "reload-cache-time:s"     => { name => 'reload_cache_time' },
+                                  "reload-cache-time:s"     => { name => 'reload_cache_time', default => 180 },
                                   "name"                    => { name => 'use_name' },
                                   "diskpath:s"              => { name => 'diskpath' },
                                   "regexp"                  => { name => 'use_regexp' },
@@ -138,8 +138,8 @@ sub reload_cache {
     my $datas = {};
 
     my $result = $self->{snmp}->get_table(oid => $oid_dskPath);
+    $datas->{last_timestamp} = time();
     $datas->{all_ids} = [];
-    my $last_num = 0;
     foreach my $key ($self->{snmp}->oid_lex_sort(keys %$result)) {
         next if ($key !~ /\.([0-9]+)$/);
         push @{$datas->{all_ids}}, $1;
@@ -165,8 +165,8 @@ sub manage_selection {
     }
 
     my $timestamp_cache = $self->{statefile_cache}->get(name => 'last_timestamp');
-    if ($has_cache_file == 0 ||
-        (defined($timestamp_cache) && (time() - $timestamp_cache) > (($self->{option_results}->{reload_cache_time}) * 60))) {
+    if ($has_cache_file == 0 || !defined($timestamp_cache) || 
+        ((time() - $timestamp_cache) > (($self->{option_results}->{reload_cache_time}) * 60))) {
             $self->reload_cache();
             $self->{statefile_cache}->read();
     }
diff --git a/snmp_standard/mode/listdiskspath.pm b/snmp_standard/mode/listdiskspath.pm
index 5e8f8e90b..010311f21 100644
--- a/snmp_standard/mode/listdiskspath.pm
+++ b/snmp_standard/mode/listdiskspath.pm
@@ -78,23 +78,24 @@ sub run {
 
     $self->manage_selection();
     my $result = $self->get_additional_information();
-    
-    my $diskpath_display = '';
-    my $diskpath_display_append = '';
+
     foreach (sort @{$self->{diskpath_id_selected}}) {
-        if (defined($result)) {
-            my $total_size = (($result->{$oid_dskTotalHigh . "." . $_} << 32) + $result->{$oid_dskTotalLow . "." . $_});
-            next if ($total_size == 0);
-        }
         my $display_value = $self->get_display_value(id => $_);
         
-        $diskpath_display .= $diskpath_display_append . "name = $display_value [id = $_]";
-        $diskpath_display_append = ', ';
+        if (defined($result)) {
+            my $total_size = (($result->{$oid_dskTotalHigh . "." . $_} << 32) + $result->{$oid_dskTotalLow . "." . $_});
+            if ($total_size == 0) {
+                $self->{output}->output_add(long_msg => "Skipping disk path '" . $display_value . "': size is 0");
+                next;
+            }
+        }
+
+        $self->{output}->output_add(long_msg => "'" . $display_value . "' [id = " . $_ . ']');
     }
 
     $self->{output}->output_add(severity => 'OK',
-                                short_msg => 'List disk path: ' . $diskpath_display);
-    $self->{output}->display(nolabel => 1);
+                                short_msg => 'List disk path:');
+    $self->{output}->display(nolabel => 1, force_ignore_perfdata => 1, force_long_output => 1);
     $self->{output}->exit();
 }
 
diff --git a/snmp_standard/mode/listinterfaces.pm b/snmp_standard/mode/listinterfaces.pm
index 7128e263a..c1e7c67c0 100644
--- a/snmp_standard/mode/listinterfaces.pm
+++ b/snmp_standard/mode/listinterfaces.pm
@@ -64,6 +64,7 @@ sub new {
                                   "interface:s"             => { name => 'interface' },
                                   "speed:s"                 => { name => 'speed' },
                                   "filter-status:s"         => { name => 'filter_status' },
+                                  "skip-speed0"             => { name => 'skip_speed0' },
                                   "use-adminstatus"         => { name => 'use_adminstatus' },
                                   "regexp"                  => { name => 'use_regexp' },
                                   "regexp-isensitive"       => { name => 'use_regexpi' },
@@ -102,8 +103,6 @@ sub run {
     $self->manage_selection();
     my $result = $self->get_additional_information();
     
-    my $interfaces_display = '';
-    my $interfaces_display_append = '';
     foreach (sort @{$self->{interface_id_selected}}) {
         my $display_value = $self->get_display_value(id => $_);
 
@@ -111,20 +110,26 @@ sub run {
         if (defined($self->{option_results}->{speed}) && $self->{option_results}->{speed} ne '') {
             $interface_speed = $self->{option_results}->{speed};
         }
+        
+        if (defined($self->{option_results}->{skip_speed0}) && $interface_speed == 0) {
+            $self->{output}->output_add(long_msg => "Skipping interface '" . $display_value . "': interface speed is 0 and option --skip-speed0 is set");
+            next;
+        }
         if (defined($self->{option_results}->{filter_status}) && $operstatus[$result->{$oid_operstatus . "." . $_} - 1] !~ /$self->{option_results}->{filter_status}/i) {
+            $self->{output}->output_add(long_msg => "Skipping interface '" . $display_value . "': no matching filter status");
             next;
         }
         if (defined($self->{option_results}->{use_adminstatus}) && $operstatus[$result->{$oid_adminstatus . "." . $_} - 1] ne 'up') {
+            $self->{output}->output_add(long_msg => "Skipping interface '" . $display_value . "': adminstatus is not 'up' and option --use-adminstatus is set");
             next;
         }
 
-        $interfaces_display .= $interfaces_display_append . "name = $display_value [speed = $interface_speed, status = " . $operstatus[$result->{$oid_operstatus . "." . $_} - 1] . ", id = $_]";
-        $interfaces_display_append = ', ';
+        $self->{output}->output_add(long_msg => "'" . $display_value . "' [speed = $interface_speed, status = " . $operstatus[$result->{$oid_operstatus . "." . $_} - 1] . ", id = $_]");
     }
 
     $self->{output}->output_add(severity => 'OK',
-                                short_msg => 'List interfaces: ' . $interfaces_display);
-    $self->{output}->display(nolabel => 1);
+                                short_msg => 'List interfaces:');
+    $self->{output}->display(nolabel => 1, force_ignore_perfdata => 1, force_long_output => 1);
     $self->{output}->exit();
 }
 
@@ -158,14 +163,14 @@ sub manage_selection {
     $self->{datas}->{oid_filter} = $self->{option_results}->{oid_filter};
     $self->{datas}->{oid_display} = $self->{option_results}->{oid_display};
     my $result = $self->{snmp}->get_table(oid => $oids_iftable{$self->{option_results}->{oid_filter}});
-    my $total_interface = 0;
+    $self->{datas}->{all_ids} = [];
     foreach my $key ($self->{snmp}->oid_lex_sort(keys %$result)) {
         next if ($key !~ /\.([0-9]+)$/);
         $self->{datas}->{$self->{option_results}->{oid_filter} . "_" . $1} = $self->{output}->to_utf8($result->{$key});
-        $total_interface = $1;
+        push @{$self->{datas}->{all_ids}}, $1;
     }
     
-    if (scalar(keys %{$self->{datas}}) <= 0) {
+    if (scalar(@{$self->{datas}->{all_ids}}) <= 0) {
         $self->{output}->add_option_msg(short_msg => "Can't get interfaces...");
         $self->{output}->option_exit();
     }
@@ -187,7 +192,7 @@ sub manage_selection {
             $self->{output}->option_exit();
         }
     } else {
-        for (my $i = 0; $i <= $total_interface; $i++) {
+        foreach my $i (@{$self->{datas}->{all_ids}}) {
             my $filter_name = $self->{datas}->{$self->{option_results}->{oid_filter} . "_" . $i};
             next if (!defined($filter_name));
             if (!defined($self->{option_results}->{interface})) {
@@ -236,6 +241,7 @@ sub disco_show {
         if (defined($self->{option_results}->{speed}) && $self->{option_results}->{speed} ne '') {
             $interface_speed = $self->{option_results}->{speed};
         }
+        next if (defined($self->{option_results}->{skip_speed0}) && $interface_speed == 0);
         if (defined($self->{option_results}->{filter_status}) && $operstatus[$result->{$oid_operstatus . "." . $_} - 1] !~ /$self->{option_results}->{filter_status}/i) {
             next;
         }
@@ -278,6 +284,10 @@ Allows to use regexp non case-sensitive (with --regexp).
 
 Set interface speed (in Mb).
 
+=item B<--skip-speed0>
+
+Don't display interface with speed 0.
+
 =item B<--filter-status>
 
 Display interfaces matching the filter (example: 'up').
diff --git a/snmp_standard/mode/liststorages.pm b/snmp_standard/mode/liststorages.pm
index 6eade826c..d7926e633 100644
--- a/snmp_standard/mode/liststorages.pm
+++ b/snmp_standard/mode/liststorages.pm
@@ -133,22 +133,22 @@ sub run {
 
     $self->manage_selection();
     my $result = $self->get_additional_information();
-    
-    my $storage_display = '';
-    my $storage_display_append = '';
+
     foreach (sort @{$self->{storage_id_selected}}) {
         my $display_value = $self->get_display_value(id => $_);
         my $storage_type = $result->{$oid_hrStorageType . "." . $_};
-        next if (!defined($storage_type) || 
-                ($storage_types_manage{$storage_type} !~ /$self->{option_results}->{filter_storage_type}/i));
+        if (!defined($storage_type) || 
+            ($storage_types_manage{$storage_type} !~ /$self->{option_results}->{filter_storage_type}/i)) {
+            $self->{output}->output_add(long_msg => "Skipping storage '" . $display_value . "': no type or no matching filter type");
+            next;
+        }
         
-        $storage_display .= $storage_display_append . "name = $display_value [size = " . $result->{$oid_hrStorageSize . "." . $_} * $result->{$oid_hrStorageAllocationUnits . "." . $_}  . "B, id = $_]";
-        $storage_display_append = ', ';
+        $self->{output}->output_add(long_msg => "'" . $display_value . "' [size = " . $result->{$oid_hrStorageSize . "." . $_} * $result->{$oid_hrStorageAllocationUnits . "." . $_}  . "B] [id = $_]");
     }
 
     $self->{output}->output_add(severity => 'OK',
-                                short_msg => 'List storage: ' . $storage_display);
-    $self->{output}->display(nolabel => 1);
+                                short_msg => 'List storage:');
+    $self->{output}->display(nolabel => 1, force_ignore_perfdata => 1, force_long_output => 1);
     $self->{output}->exit();
 }
 
diff --git a/snmp_standard/mode/loadaverage.pm b/snmp_standard/mode/loadaverage.pm
index 7abd28836..aef74c005 100644
--- a/snmp_standard/mode/loadaverage.pm
+++ b/snmp_standard/mode/loadaverage.pm
@@ -48,8 +48,9 @@ sub new {
     $self->{version} = '1.0';
     $options{options}->add_options(arguments =>
                                 { 
-                                  "warning:s"               => { name => 'warning', default => '' },
-                                  "critical:s"              => { name => 'critical', default => '' },
+                                  "warning:s"   => { name => 'warning', default => '' },
+                                  "critical:s"  => { name => 'critical', default => '' },
+                                  "average"     => { name => 'average' },
                                 });
 
     return $self;
@@ -92,39 +93,95 @@ sub run {
     my ($self, %options) = @_;
     # $options{snmp} = snmp object
     $self->{snmp} = $options{snmp};
-    
+   
+    my $oid_CountCpu = '.1.3.6.1.2.1.25.3.3.1.2'; 
     my $oid_CpuLoad1m = '.1.3.6.1.4.1.2021.10.1.3.1';
     my $oid_CpuLoad5m = '.1.3.6.1.4.1.2021.10.1.3.2';
     my $oid_CpuLoad15m = '.1.3.6.1.4.1.2021.10.1.3.3';
 
     my $result = $self->{snmp}->get_leef(oids => [$oid_CpuLoad1m, $oid_CpuLoad5m, $oid_CpuLoad15m], nothing_quit => 1);
     
-    my $exit1 = $self->{perfdata}->threshold_check(value => $result->{$oid_CpuLoad1m}, 
-                               threshold => [ { label => 'crit1', 'exit_litteral' => 'critical' }, { label => 'warn1', exit_litteral => 'warning' } ]);
-    my $exit2 = $self->{perfdata}->threshold_check(value => $result->{$oid_CpuLoad5m}, 
-                               threshold => [ { label => 'crit5', 'exit_litteral' => 'critical' }, { label => 'warn5', exit_litteral => 'warning' } ]);
-    my $exit3 = $self->{perfdata}->threshold_check(value => $result->{$oid_CpuLoad15m}, 
-                               threshold => [ { label => 'crit15', 'exit_litteral' => 'critical' }, { label => 'warn15', exit_litteral => 'warning' } ]);
-    
-    my $exit = $self->{output}->get_most_critical(status => [ $exit1, $exit2, $exit3 ]);
-    $self->{output}->output_add(severity => $exit,
-                                short_msg => sprintf("Load average: %s, %s, %s", $result->{$oid_CpuLoad1m}, $result->{$oid_CpuLoad5m}, $result->{$oid_CpuLoad15m}));
-            
-    $self->{output}->perfdata_add(label => 'load1',
-                                  value => $result->{$oid_CpuLoad1m},
+    my ($msg, $cpu_load1, $cpu_load5, $cpu_load15);
+
+    if (defined($self->{option_results}->{average})) {    
+        my $result2 = $self->{snmp}->get_table(oid => $oid_CountCpu);
+        if (scalar(keys %$result2)<=0){
+            $self->{output}->output_add(severity => 'unknown',
+                                        short_msg => 'Unable to get number of CPUs');
+            $self->{output}->display();
+            $self->{output}->exit();    
+        }
+
+        my $countCpu = scalar(keys %$result2);
+
+        $cpu_load1 = sprintf("%0.2f", $result->{$oid_CpuLoad1m} / $countCpu);
+        $cpu_load5 = sprintf("%0.2f", $result->{$oid_CpuLoad5m} / $countCpu);
+        $cpu_load15 = sprintf("%0.2f", $result->{$oid_CpuLoad15m} / $countCpu);
+        $msg = sprintf("Load average: %s [%s/%s CPUs], %s [%s/%s CPUs], %s [%s/%s CPUs]", $cpu_load1, $result->{$oid_CpuLoad1m}, $countCpu,
+                       $cpu_load5, $result->{$oid_CpuLoad5m}, $countCpu,
+                       $cpu_load15, $result->{$oid_CpuLoad15m}, $countCpu);
+        $self->{output}->perfdata_add(label => 'avg_load1',
+                                  value => $cpu_load1,
                                   warning => $self->{perfdata}->get_perfdata_for_output(label => 'warn1'),
                                   critical => $self->{perfdata}->get_perfdata_for_output(label => 'crit1'),
                                   min => 0);
-    $self->{output}->perfdata_add(label => 'load5',
-                                  value => $result->{$oid_CpuLoad5m},
+        $self->{output}->perfdata_add(label => 'avg_load5',
+                                  value => $cpu_load5,
                                   warning => $self->{perfdata}->get_perfdata_for_output(label => 'warn5'),
                                   critical => $self->{perfdata}->get_perfdata_for_output(label => 'crit5'),
                                   min => 0);
-    $self->{output}->perfdata_add(label => 'load15',
-                                  value => $result->{$oid_CpuLoad15m},
+        $self->{output}->perfdata_add(label => 'avg_load15',
+                                  value => $cpu_load15,
                                   warning => $self->{perfdata}->get_perfdata_for_output(label => 'warn15'),
                                   critical => $self->{perfdata}->get_perfdata_for_output(label => 'crit15'),
                                   min => 0);
+         $self->{output}->perfdata_add(label => 'load1',
+                                  value => $result->{$oid_CpuLoad1m},
+                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warn1', op => '*', value => $countCpu),
+                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'crit1', op => '*', value => $countCpu),
+                                  min => 0);
+        $self->{output}->perfdata_add(label => 'load5',
+                                  value => $result->{$oid_CpuLoad5m},
+                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warn5', op => '*', value => $countCpu),
+                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'crit5', op => '*', value => $countCpu),
+                                  min => 0);
+        $self->{output}->perfdata_add(label => 'load15',
+                                  value => $result->{$oid_CpuLoad15m},
+                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warn15', op => '*', value => $countCpu),
+                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'crit15', op => '*', value => $countCpu),
+                                  min => 0);
+    } else {
+        $cpu_load1 = $result->{$oid_CpuLoad1m};
+        $cpu_load5 = $result->{$oid_CpuLoad5m};
+        $cpu_load15 = $result->{$oid_CpuLoad15m};
+    
+        $msg = sprintf("Load average: %s, %s, %s", $cpu_load1, $cpu_load5, $cpu_load15);
+        $self->{output}->perfdata_add(label => 'load1',
+                                  value => $cpu_load1,
+                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warn1'),
+                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'crit1'),
+                                  min => 0);
+        $self->{output}->perfdata_add(label => 'load5',
+                                  value => $cpu_load5,
+                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warn5'),
+                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'crit5'),
+                                  min => 0);
+        $self->{output}->perfdata_add(label => 'load15',
+                                  value => $cpu_load15,
+                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warn15'),
+                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'crit15'),
+                                  min => 0);
+    }
+    
+    my $exit1 = $self->{perfdata}->threshold_check(value => $cpu_load1,
+                                                   threshold => [ { label => 'crit1', 'exit_litteral' => 'critical' }, { label => 'warn1', exit_litteral => 'warning' } ]);
+    my $exit2 = $self->{perfdata}->threshold_check(value => $cpu_load5,
+                                                   threshold => [ { label => 'crit5', 'exit_litteral' => 'critical' }, { label => 'warn5', exit_litteral => 'warning' } ]);
+    my $exit3 = $self->{perfdata}->threshold_check(value => $cpu_load15,
+                                                   threshold => [ { label => 'crit15', 'exit_litteral' => 'critical' }, { label => 'warn15', exit_litteral => 'warning' } ]);
+    my $exit = $self->{output}->get_most_critical(status => [ $exit1, $exit2, $exit3 ]);
+    $self->{output}->output_add(severity => $exit,
+                                short_msg => $msg);
 
     $self->{output}->display();
     $self->{output}->exit();
@@ -148,6 +205,10 @@ Threshold warning (1min,5min,15min).
 
 Threshold critical (1min,5min,15min).
 
+=item B<--average>
+
+Load average for the number of CPUs.
+
 =back
 
 =cut
diff --git a/snmp_standard/mode/memory.pm b/snmp_standard/mode/memory.pm
index 89117d02e..3a8207402 100644
--- a/snmp_standard/mode/memory.pm
+++ b/snmp_standard/mode/memory.pm
@@ -50,8 +50,12 @@ sub new {
                                 { 
                                   "warning:s"               => { name => 'warning' },
                                   "critical:s"              => { name => 'critical' },
+                                  "swap"                    => { name => 'check_swap' },
+                                  "warning-swap:s"          => { name => 'warning_swap' },
+                                  "critical-swap:s"         => { name => 'critical_swap' },
+                                  "no-swap:s"               => { name => 'no_swap' },
                                 });
-    
+    $self->{no_swap} = 'critical';
     return $self;
 }
 
@@ -66,7 +70,24 @@ sub check_options {
     if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) {
        $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'.");
        $self->{output}->option_exit();
-    }    
+    }
+    if (defined($self->{option_results}->{check_swap})) {
+        if (($self->{perfdata}->threshold_validate(label => 'warning-swap', value => $self->{option_results}->{warning_swap})) == 0) {
+            $self->{output}->add_option_msg(short_msg => "Wrong warning-swap threshold '" . $self->{option_results}->{warning_swap} . "'.");
+            $self->{output}->option_exit();
+        }
+        if (($self->{perfdata}->threshold_validate(label => 'critical-swap', value => $self->{option_results}->{critical_swap})) == 0) {
+            $self->{output}->add_option_msg(short_msg => "Wrong critical-swap threshold '" . $self->{option_results}->{critical_swap} . "'.");
+            $self->{output}->option_exit();
+        }
+        if (defined($self->{option_results}->{no_swap}) && $self->{option_results}->{no_swap} ne '') {
+            if ($self->{output}->is_litteral_status(status => $self->{option_results}->{no_swap}) == 0) {
+                $self->{output}->add_option_msg(short_msg => "Wrong --no-swap status '" . $self->{option_results}->{no_swap} . "'.");
+                $self->{output}->option_exit();
+            }
+            $self->{no_swap} = $self->{option_results}->{no_swap};
+        }
+    }
 }
 
 sub run {
@@ -79,10 +100,16 @@ sub run {
     my $oid_memShared = '.1.3.6.1.4.1.2021.4.13.0';
     my $oid_memBuffer = '.1.3.6.1.4.1.2021.4.14.0';
     my $oid_memCached = '.1.3.6.1.4.1.2021.4.15.0';
+    my $oid_memTotalSwap = '.1.3.6.1.4.1.2021.4.3.0'; # KB
+    my $oid_memAvailSwap = '.1.3.6.1.4.1.2021.4.4.0'; # KB
     
-    my $result = $self->{snmp}->get_leef(oids => [$oid_memTotalReal, $oid_memAvailReal,
-                                                  $oid_memShared, $oid_memBuffer, $oid_memCached], 
-                                          nothing_quit => 1);
+    my $oids = [$oid_memTotalReal, $oid_memAvailReal,
+                $oid_memShared, $oid_memBuffer, $oid_memCached];
+    if (defined($self->{option_results}->{check_swap})) {
+        push @$oids, ($oid_memTotalSwap, $oid_memAvailSwap);
+    }
+    my $result = $self->{snmp}->get_leef(oids => $oids, 
+                                         nothing_quit => 1);
 
     my $shared_used = defined($result->{$oid_memShared}) ? $result->{$oid_memShared} * 1024 : 0;
     my $cached_used = $result->{$oid_memCached} * 1024;
@@ -115,10 +142,41 @@ sub run {
                                   min => 0);
     $self->{output}->perfdata_add(label => "used",
                                   value => $nobuf_used,
-                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning', total => $total_size),
-                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical', total => $total_size),
+                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning', total => $total_size, cast_int => 1),
+                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical', total => $total_size, cast_int => 1),
                                   min => 0, max => $total_size);
 
+    if (defined($self->{option_results}->{check_swap})) {
+        if ($result->{$oid_memTotalSwap} == 0) {
+            $self->{output}->output_add(severity => $self->{no_swap},
+                                        short_msg => 'No active swap.');
+            $self->{output}->display();
+            $self->{output}->exit();
+        }
+    
+        $total_size = $result->{$oid_memTotalSwap} * 1024;
+        my $swap_used = ($result->{$oid_memTotalSwap} - $result->{$oid_memAvailSwap}) * 1024;
+    
+        $prct_used = $swap_used * 100 / $total_size;
+        $exit = $self->{perfdata}->threshold_check(value => $prct_used, threshold => [ { label => 'critical-swap', 'exit_litteral' => 'critical' }, { label => 'warning-swap', exit_litteral => 'warning' } ]);
+
+        my ($total_value, $total_unit) = $self->{perfdata}->change_bytes(value => $total_size);
+        my ($swap_used_value, $swap_used_unit) = $self->{perfdata}->change_bytes(value => $swap_used);
+        my ($swap_free_value, $swap_free_unit) = $self->{perfdata}->change_bytes(value => ($total_size - $swap_used));
+    
+        $self->{output}->output_add(severity => $exit,
+                                    short_msg => sprintf("Swap Total: %s Used: %s (%.2f%%) Free: %s (%.2f%%)",
+                                            $total_value . " " . $total_unit,
+                                            $swap_used_value . " " . $swap_used_unit, $prct_used,
+                                            $swap_free_value . " " . $swap_free_unit, (100 - $prct_used)));
+    
+        $self->{output}->perfdata_add(label => "swap",
+                                      value => $swap_used,
+                                      warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-swap', total => $total_size, cast_int => 1),
+                                      critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical-swap', total => $total_size, cast_int => 1),
+                                      min => 0, max => $total_size);
+    }
+                                  
     $self->{output}->display();
     $self->{output}->exit();
 }
@@ -141,6 +199,22 @@ Threshold warning in percent.
 
 Threshold critical in percent.
 
+=item B<-swap>
+
+Check swap also.
+
+=item B<--warning-swap>
+
+Threshold warning in percent.
+
+=item B<--critical-swap>
+
+Threshold critical in percent.
+
+=item B<--no-swap>
+
+Threshold if no active swap (default: 'critical').
+
 =back
 
 =cut
diff --git a/snmp_standard/mode/numericvalue.pm b/snmp_standard/mode/numericvalue.pm
index ab29d0003..6278e46f9 100644
--- a/snmp_standard/mode/numericvalue.pm
+++ b/snmp_standard/mode/numericvalue.pm
@@ -60,7 +60,7 @@ sub new {
                                   "format-scale-unit:s"     => { name => 'format_scale_unit', default => 'other'},
                                   "perfdata-unit:s"         => { name => 'perfdata_unit', default => ''},
                                   "perfdata-name:s"         => { name => 'perfdata_name', default => 'value'},
-                                  "perfdata-max:s"          => { name => 'perfdata_min', default => ''},
+                                  "perfdata-min:s"          => { name => 'perfdata_min', default => ''},
                                   "perfdata-max:s"          => { name => 'perfdata_max', default => ''},
                                 });
     $self->{statefile_cache} = centreon::plugins::statefile->new(%options);
@@ -71,11 +71,11 @@ sub check_options {
     my ($self, %options) = @_;
     $self->SUPER::init(%options);
 
-    if (!defined($self->{option_results}->{oid})) {
+    if (!defined($self->{option_results}->{oid}) || $self->{option_results}->{oid} eq '') {
        $self->{output}->add_option_msg(short_msg => "Need to specify an OID.");
        $self->{output}->option_exit(); 
     }
-    $self->{option_results}->{oid} .= '.' if ($self->{option_results}->{oid} !~ /^\./);
+    $self->{option_results}->{oid} = '.' . $self->{option_results}->{oid} if ($self->{option_results}->{oid} !~ /^\./);
     
     if ($self->{option_results}->{oid_type} !~ /^gauge|counter$/i) {
        $self->{output}->add_option_msg(short_msg => "Wrong --oid-type argument '" . $self->{option_results}->{oid_type} . "' ('gauge' or 'counter').");
diff --git a/snmp_standard/mode/packeterrors.pm b/snmp_standard/mode/packeterrors.pm
index 8b8b9b946..dd4f77fda 100644
--- a/snmp_standard/mode/packeterrors.pm
+++ b/snmp_standard/mode/packeterrors.pm
@@ -65,7 +65,7 @@ sub new {
                                   "critical-in-error:s"   => { name => 'critical_in_error' },
                                   "warning-out-error:s"   => { name => 'warning_out_error' },
                                   "critical-out-error:s"  => { name => 'critical_out_error' },
-                                  "reload-cache-time:s"     => { name => 'reload_cache_time' },
+                                  "reload-cache-time:s"     => { name => 'reload_cache_time', default => 180 },
                                   "name"                    => { name => 'use_name' },
                                   "interface:s"             => { name => 'interface' },
                                   "skip"                    => { name => 'skip' },
@@ -191,7 +191,10 @@ sub run {
 
     my $result = $self->{snmp}->get_leef();
     $new_datas->{last_timestamp} = time();
-    my $old_timestamp;
+    my $buffer_creation = 0;
+    my $old_timestamp = $self->{statefile_value}->get(name => 'last_timestamp');
+
+
     if (!defined($self->{option_results}->{interface}) || defined($self->{option_results}->{use_regexp})) {
         $self->{output}->output_add(severity => 'OK',
                                     short_msg => 'All interfaces are ok.');
@@ -205,6 +208,11 @@ sub run {
                 $self->{output}->output_add(severity => 'CRITICAL',
                                             short_msg => "Interface '" . $display_value . "' is not ready: " . $operstatus[$result->{$oid_operstatus . "." . $_} - 1]);
             } else {
+                # Avoid empty message
+                if (defined($self->{option_results}->{interface}) && !defined($self->{option_results}->{use_regexp})) {
+                    $self->{output}->output_add(severity => 'OK',
+                                                short_msg => "Interface '" . $display_value . "' is not up (normal state)");
+                }
                 $self->{output}->output_add(long_msg => "Skip interface '" . $display_value . "'.");
             }
             next;
@@ -238,7 +246,8 @@ sub run {
         }
         
         # We change mode. need to recreate a buffer
-        if (!defined($old_mode) || $new_datas->{'mode_' . $_} ne $old_mode) {
+        if (!defined($old_timestamp) || !defined($old_mode) || $new_datas->{'mode_' . $_} ne $old_mode) {
+            $buffer_creation = 1;
             next;
         }
         
@@ -248,7 +257,6 @@ sub run {
         my @getting = ('in_ucast', 'in_bcast', 'in_mcast', 'out_ucast', 'out_bcast', 'out_mcast',
                        'in_discard', 'in_error', 'out_discard', 'out_error');
         my $old_datas = {};
-        $old_timestamp = $self->{statefile_value}->get(name => 'last_timestamp');
         foreach my $key (@getting) {
             $old_datas->{$key} = $self->{statefile_value}->get(name => $key . '_' . $_);
             if (!defined($old_datas->{$key}) || $new_datas->{$key . '_' . $_} < $old_datas->{$key}) {
@@ -256,10 +264,7 @@ sub run {
                 $old_datas->{$key} = 0;
             }
         }
-        
-        if (!defined($old_timestamp)) {
-            next;
-        }
+
         my $time_delta = $new_datas->{last_timestamp} - $old_timestamp;
         if ($time_delta <= 0) {
             # At least one second. two fast calls ;)
@@ -330,7 +335,7 @@ sub run {
     }
 
     $self->{statefile_value}->write(data => $new_datas);    
-    if (!defined($old_timestamp)) {
+    if ($buffer_creation == 1) {
         $self->{output}->output_add(severity => 'OK',
                                     short_msg => "Buffer creation...");
     }
@@ -356,6 +361,7 @@ sub reload_cache {
 
     $datas->{oid_filter} = $self->{option_results}->{oid_filter};
     $datas->{oid_display} = $self->{option_results}->{oid_display};
+    $datas->{last_timestamp} = time();
     $datas->{all_ids} = [];
     my $result = $self->{snmp}->get_table(oid => $oids_iftable{$self->{option_results}->{oid_filter}});
     foreach my $key ($self->{snmp}->oid_lex_sort(keys %$result)) {
@@ -395,7 +401,7 @@ sub manage_selection {
     my $oid_filter = $self->{statefile_cache}->get(name => 'oid_filter');
     if ($has_cache_file == 0 ||
         ($self->{option_results}->{oid_display} !~ /^($oid_display|$oid_filter)$/i || $self->{option_results}->{oid_filter} !~ /^($oid_display|$oid_filter)$/i) ||
-        (defined($timestamp_cache) && (time() - $timestamp_cache) > (($self->{option_results}->{reload_cache_time}) * 60))) {
+        !defined($timestamp_cache) || ((time() - $timestamp_cache) > (($self->{option_results}->{reload_cache_time}) * 60))) {
         $self->reload_cache();
         $self->{statefile_cache}->read();
     }
diff --git a/snmp_standard/mode/storage.pm b/snmp_standard/mode/storage.pm
index 97f094837..3da042745 100644
--- a/snmp_standard/mode/storage.pm
+++ b/snmp_standard/mode/storage.pm
@@ -95,7 +95,7 @@ sub new {
                                   "critical:s"              => { name => 'critical' },
                                   "units:s"                 => { name => 'units', default => '%' },
                                   "free"                    => { name => 'free' },
-                                  "reload-cache-time:s"     => { name => 'reload_cache_time' },
+                                  "reload-cache-time:s"     => { name => 'reload_cache_time', default => 180 },
                                   "name"                    => { name => 'use_name' },
                                   "storage:s"               => { name => 'storage' },
                                   "regexp"                  => { name => 'use_regexp' },
@@ -251,6 +251,7 @@ sub reload_cache {
 
     $datas->{oid_filter} = $self->{option_results}->{oid_filter};
     $datas->{oid_display} = $self->{option_results}->{oid_display};
+    $datas->{last_timestamp} = time();
     $datas->{all_ids} = [];
     my $result = $self->{snmp}->get_table(oid => $oids_hrStorageTable{$self->{option_results}->{oid_filter}});
     foreach my $key ($self->{snmp}->oid_lex_sort(keys %$result)) {
@@ -296,7 +297,7 @@ sub manage_selection {
     my $oid_filter = $self->{statefile_cache}->get(name => 'oid_filter');
     if ($has_cache_file == 0 ||
         ($self->{option_results}->{oid_display} !~ /^($oid_display|$oid_filter)$/i || $self->{option_results}->{oid_filter} !~ /^($oid_display|$oid_filter)$/i) ||
-        (defined($timestamp_cache) && (time() - $timestamp_cache) > (($self->{option_results}->{reload_cache_time}) * 60))) {
+        !defined($timestamp_cache) || ((time() - $timestamp_cache) > (($self->{option_results}->{reload_cache_time}) * 60))) {
             $self->reload_cache();
             $self->{statefile_cache}->read();
     }
diff --git a/snmp_standard/mode/stringvalue.pm b/snmp_standard/mode/stringvalue.pm
index 9bf76791d..fce2d7a38 100644
--- a/snmp_standard/mode/stringvalue.pm
+++ b/snmp_standard/mode/stringvalue.pm
@@ -66,10 +66,11 @@ sub check_options {
     my ($self, %options) = @_;
     $self->SUPER::init(%options);
 
-    if (!defined($self->{option_results}->{oid})) {
+    if (!defined($self->{option_results}->{oid}) || $self->{option_results}->{oid} eq '') {
        $self->{output}->add_option_msg(short_msg => "Need to specify an OID.");
        $self->{output}->option_exit(); 
     }
+    $self->{option_results}->{oid} = '.' . $self->{option_results}->{oid} if ($self->{option_results}->{oid} !~ /^\./);
 
     $self->{map_values} = {};
     if (defined($self->{option_results}->{map_values})) {
diff --git a/snmp_standard/mode/swap.pm b/snmp_standard/mode/swap.pm
index 03e277c59..032b37a3d 100644
--- a/snmp_standard/mode/swap.pm
+++ b/snmp_standard/mode/swap.pm
@@ -50,8 +50,9 @@ sub new {
                                 { 
                                   "warning:s"               => { name => 'warning' },
                                   "critical:s"              => { name => 'critical' },
+                                  "no-swap:s"               => { name => 'no_swap' },
                                 });
-    
+    $self->{no_swap} = 'critical';
     return $self;
 }
 
@@ -66,7 +67,14 @@ sub check_options {
     if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) {
        $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'.");
        $self->{output}->option_exit();
-    }    
+    }
+    if (defined($self->{option_results}->{no_swap}) && $self->{option_results}->{no_swap} ne '') {
+        if ($self->{output}->is_litteral_status(status => $self->{option_results}->{no_swap}) == 0) {
+            $self->{output}->add_option_msg(short_msg => "Wrong --no-swap status '" . $self->{option_results}->{no_swap} . "'.");
+            $self->{output}->option_exit();
+        }
+         $self->{no_swap} = $self->{option_results}->{no_swap};
+    }
 }
 
 sub run {
@@ -78,6 +86,13 @@ sub run {
     my $oid_memAvailSwap = '.1.3.6.1.4.1.2021.4.4.0'; # KB
     my $result = $self->{snmp}->get_leef(oids => [$oid_memTotalSwap, $oid_memAvailSwap], nothing_quit => 1);
 
+    if ($result->{$oid_memTotalSwap} == 0) {
+        $self->{output}->output_add(severity => $self->{no_swap},
+                                    short_msg => 'No active swap.');
+        $self->{output}->display();
+        $self->{output}->exit();
+    }
+    
     my $total_size = $result->{$oid_memTotalSwap} * 1024;
     my $swap_used = ($result->{$oid_memTotalSwap} - $result->{$oid_memAvailSwap}) * 1024;
     
@@ -96,8 +111,8 @@ sub run {
     
     $self->{output}->perfdata_add(label => "used",
                                   value => $swap_used,
-                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning', total => $total_size),
-                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical', total => $total_size),
+                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning', total => $total_size, cast_int => 1),
+                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical', total => $total_size, cast_int => 1),
                                   min => 0, max => $total_size);
 
     $self->{output}->display();
@@ -122,6 +137,10 @@ Threshold warning in percent.
 
 Threshold critical in percent.
 
+=item B<--no-swap>
+
+Threshold if no active swap (default: 'critical').
+
 =back
 
 =cut
diff --git a/snmp_standard/mode/tcpcon.pm b/snmp_standard/mode/tcpcon.pm
new file mode 100644
index 000000000..bde1bd1b1
--- /dev/null
+++ b/snmp_standard/mode/tcpcon.pm
@@ -0,0 +1,408 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package snmp_standard::mode::tcpcon;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+
+my %map_states = (
+    1 => 'closed',
+    2 => 'listen',
+    3 => 'synSent',
+    4 => 'synReceived',
+    5 => 'established',
+    6 => 'finWait1',
+    7 => 'finWait2',
+    8 => 'closeWait',
+    9 => 'lastAck',
+    10 => 'closing',
+    11 => 'timeWait',
+    12 => 'deleteTCB',
+);
+
+my %map_addr_type = (
+    0 => 'unknown',
+    1 => 'ipv4',
+    2 => 'ipv6',
+    3 => 'ipv4z',
+    4 => 'ipv6z',
+    16 => 'dns',
+);
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+                                {
+                                  "warning:s"       => { name => 'warning', },
+                                  "critical:s"      => { name => 'critical', },
+                                  "service:s@"      => { name => 'service', },
+                                  "application:s@"  => { name => 'application', },
+                                });
+    @{$self->{connections}} = ();
+    $self->{services} = { total => { filter => '.*?#.*?#.*?#.*?#.*?#(?!(listen))', builtin => 1, number => 0, msg => 'Total connections: %d' } };
+    $self->{applications} = {};
+    $self->{states} = { closed => 0, listen => 0, synSent => 0, synReceived => 0,
+                        established => 0, finWait1 => 0, finWait2 => 0, closeWait => 0,
+                        lastAck => 0, closing => 0, timeWait => 0 };
+    return $self;
+}
+
+sub get_ipv6 {
+    my ($self, %options) = @_;
+    
+    my $ipv6 = '';
+    my $num = 1;
+    foreach my $val (split /\./, $options{value}) {
+        if ($num % 3 == 0) {
+            $ipv6 .= ':';
+            $num++;
+        }
+        $ipv6 .= sprintf("%02x", $val);
+        $num++;
+    }
+    
+    return $ipv6;
+}
+
+sub get_from_rfc4022 {
+    my ($self, %options) = @_;
+    
+    my $oid_tcpConnectionState = '.1.3.6.1.2.1.6.19.1.7';
+    my $result = $self->{snmp}->get_table(oid => $oid_tcpConnectionState);
+    
+    my $oid_tcpListenerProcess = '.1.3.6.1.2.1.6.20.1.4';
+    my $result2 = $self->{snmp}->get_table(oid => $oid_tcpListenerProcess);
+    return 0 if (scalar(keys %$result) + scalar(keys %$result2) == 0);
+    
+    # Listener
+    foreach (keys %$result2) {
+        /^$oid_tcpListenerProcess\.(\d+)/;
+        my $ipv = $map_addr_type{$1};
+        next if ($ipv !~ /^ipv4|ipv6$/); # manage only 'ipv4' (1) and 'ipv6' (2) for now
+        
+        my ($src_addr, $src_port, $dst_addr);
+        if ($ipv eq 'ipv6') {
+            $dst_addr = '0000:0000:0000:0000:0000:0000:0000:0000';
+            /^$oid_tcpListenerProcess\.\d+\.\d+\.((?:\d+\.){16})(\d+)/;
+            ($src_addr, $src_port) = ($self->get_ipv6(value => $1), $2);
+        } else {
+            /^$oid_tcpListenerProcess\.\d+\.\d+\.(\d+\.\d+\.\d+\.\d+)\.(\d+)/;
+            $dst_addr = '0.0.0.0';
+            ($src_addr, $src_port) = ($1, $2);
+        }
+        push @{$self->{connections}}, $ipv . "#$src_addr#$src_port#$dst_addr#0#listen";
+        $self->{states}->{listen}++;
+    }
+    
+    foreach (keys %$result) {
+        /^$oid_tcpConnectionState\.(\d+)/;
+        my $ipv = $map_addr_type{$1};
+        next if ($ipv !~ /^ipv4|ipv6$/); # manage only 'ipv4' (1) and 'ipv6' (2) for now
+        
+        my ($src_addr, $src_port, $dst_addr, $dst_port);
+        if ($ipv eq 'ipv6') {
+            /^$oid_tcpConnectionState\.\d+\.\d+\.((?:\d+\.){16})(\d+)\.\d+\.((?:\d+\.){16})(\d+)/;
+            ($src_addr, $src_port, $dst_addr, $dst_port) = ($self->get_ipv6(value => $1), $2, $self->get_ipv6(value => $3), $4);
+        } else {
+            /^$oid_tcpConnectionState\.\d+\.\d+\.(\d+\.\d+\.\d+\.\d+)\.(\d+)\.\d+\.(\d+\.\d+\.\d+\.\d+)\.(\d+)/;
+            ($src_addr, $src_port, $dst_addr, $dst_port) = ($1, $2, $3, $4);
+        }
+        $self->{states}->{$map_states{$result->{$_}}}++;
+        push @{$self->{connections}}, $ipv . "#$src_addr#$src_port#$dst_addr#$dst_port#" . lc($map_states{$result->{$_}});
+    }
+    
+    return 1;
+}
+
+sub get_from_rfc1213 {
+    my ($self, %options) = @_;
+    
+    my $oid_tcpConnState = '.1.3.6.1.2.1.6.13.1.1';
+    my $result = $self->{snmp}->get_table(oid => $oid_tcpConnState, nothing_quit => 1);
+    
+    # Construct
+    foreach (keys %$result) {
+        /(\d+\.\d+\.\d+\.\d+).(\d+)\.(\d+\.\d+\.\d+\.\d+).(\d+)$/;
+        $self->{states}->{$map_states{$result->{$_}}}++;
+        push @{$self->{connections}}, "ipv4#$1#$2#$3#$4#" . lc($map_states{$result->{$_}});
+    }
+}
+
+sub build_connections {
+    my ($self, %options) = @_;
+    
+    if ($self->get_from_rfc4022() == 0) {
+        $self->get_from_rfc1213();
+    }
+}
+
+sub check_services {
+    my ($self, %options) = @_;
+    
+    foreach my $service (@{$self->{option_results}->{service}}) {
+        my ($tag, $ipv, $state, $port_src, $port_dst, $filter_ip_src, $filter_ip_dst, $warn, $crit) = split /,/, $service;
+        
+        if (!defined($tag) || $tag eq '') {
+            $self->{output}->add_option_msg(short_msg => "Tag for service '" . $service . "' must be defined.");
+            $self->{output}->option_exit();
+        }
+        if (defined($self->{services}->{$tag})) {
+            $self->{output}->add_option_msg(short_msg => "Tag '" . $tag . "' (service) already exists.");
+            $self->{output}->option_exit();
+        }
+        
+        $self->{services}->{$tag} = { filter => ((defined($ipv) && $ipv ne '') ? $ipv : '.*?') . '#' . 
+                                                ((defined($filter_ip_src) && $filter_ip_src ne '') ? $filter_ip_src : '.*?') . '#' . 
+                                                ((defined($port_src) && $port_src ne '') ? $port_src : '.*?') . '#' . 
+                                                ((defined($filter_ip_dst) && $filter_ip_dst ne '') ? $filter_ip_dst : '.*?') . '#' . 
+                                                ((defined($port_dst) && $port_dst ne '') ? $port_dst : '.*?') . '#' . 
+                                                ((defined($state) && $state ne '') ? lc($state) : '(?!(listen))')
+                                                , 
+                                      builtin => 0, number => 0 };
+        if (($self->{perfdata}->threshold_validate(label => 'warning-service-' . $tag, value => $warn)) == 0) {
+            $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $warn . "' for service '$tag'.");
+            $self->{output}->option_exit();
+        }
+        if (($self->{perfdata}->threshold_validate(label => 'critical-service-' . $tag, value => $crit)) == 0) {
+            $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $crit . "' for service '$tag'.");
+            $self->{output}->option_exit();
+        }
+    }
+}
+
+sub check_applications {
+    my ($self, %options) = @_;
+    
+    foreach my $app (@{$self->{option_results}->{application}}) {
+        my ($tag, $services, $warn, $crit) = split /,/, $app;
+        
+        if (!defined($tag) || $tag eq '') {
+            $self->{output}->add_option_msg(short_msg => "Tag for application '" . $app . "' must be defined.");
+            $self->{output}->option_exit();
+        }
+        if (defined($self->{applications}->{$tag})) {
+            $self->{output}->add_option_msg(short_msg => "Tag '" . $tag . "' (application) already exists.");
+            $self->{output}->option_exit();
+        }
+        
+        $self->{applications}->{$tag} = {
+                                            services => {},
+                                        };
+        foreach my $service (split /\|/, $services) {
+            if (!defined($self->{services}->{$service})) {
+                $self->{output}->add_option_msg(short_msg => "Service '" . $service . "' is not defined.");
+                $self->{output}->option_exit();
+            }
+            $self->{applications}->{$tag}->{services}->{$service} = 1;
+        }
+        
+        if (($self->{perfdata}->threshold_validate(label => 'warning-app-' . $tag, value => $warn)) == 0) {
+            $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $warn . "' for application '$tag'.");
+            $self->{output}->option_exit();
+        }
+        if (($self->{perfdata}->threshold_validate(label => 'critical-app-' . $tag, value => $crit)) == 0) {
+            $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $crit . "' for application '$tag'.");
+            $self->{output}->option_exit();
+        }
+    }
+}
+
+sub test_services {
+    my ($self, %options) = @_;
+    
+    foreach my $tag (keys %{$self->{services}}) {
+        foreach (@{$self->{connections}}) {
+            if (/$self->{services}->{$tag}->{filter}/) {
+                $self->{services}->{$tag}->{number}++;
+            }
+        }        
+        
+        my $exit_code = $self->{perfdata}->threshold_check(value => $self->{services}->{$tag}->{number}, 
+                               threshold => [ { label => 'critical-service-' . $tag, 'exit_litteral' => 'critical' }, { label => 'warning-service-' . $tag, exit_litteral => 'warning' } ]);
+        my ($perf_label, $msg) = ('service_' . $tag, "Service '$tag' connections: %d");
+        if ($self->{services}->{$tag}->{builtin} == 1) {
+            ($perf_label, $msg) = ($tag, $self->{services}->{$tag}->{msg});
+        }
+        
+        $self->{output}->output_add(severity => $exit_code,
+                                    short_msg => sprintf($msg, $self->{services}->{$tag}->{number}));
+        $self->{output}->perfdata_add(label => $perf_label,
+                                      value => $self->{services}->{$tag}->{number},
+                                      warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-service-' . $tag),
+                                      critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical-service-' . $tag),
+                                      min => 0);
+    }
+}
+
+sub test_applications {
+    my ($self, %options) = @_;
+
+    foreach my $tag (keys %{$self->{applications}}) {
+        my $number = 0;
+        
+        foreach (keys %{$self->{applications}->{$tag}->{services}}) {
+            $number += $self->{services}->{$_}->{number};
+        }
+        
+        my $exit_code = $self->{perfdata}->threshold_check(value => $number, 
+                               threshold => [ { label => 'critical-app-' . $tag, 'exit_litteral' => 'critical' }, { label => 'warning-app-' . $tag, exit_litteral => 'warning' } ]);
+        $self->{output}->output_add(severity => $exit_code,
+                                    short_msg => sprintf("Applicatin '%s' connections: %d", $tag, $number));
+        $self->{output}->perfdata_add(label => 'app_' . $tag,
+                                      value => $number,
+                                      warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-app-' . $tag),
+                                      critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical-app-' . $tag),
+                                      min => 0);
+    }
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+
+    if (($self->{perfdata}->threshold_validate(label => 'warning-service-total', value => $self->{option_results}->{warning})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'.");
+        $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical-service-total', value => $self->{option_results}->{critical})) == 0) {
+        $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'.");
+        $self->{output}->option_exit();
+    }
+    $self->check_services();
+    $self->check_applications();
+}
+
+sub run {
+    my ($self, %options) = @_;
+    # $options{snmp} = snmp object
+    $self->{snmp} = $options{snmp};
+    
+    $self->build_connections();
+    $self->test_services();
+    $self->test_applications();
+    
+    foreach (keys %{$self->{states}}) {
+        $self->{output}->perfdata_add(label => 'con_' . $_,
+                                      value => $self->{states}->{$_},
+                                      min => 0);
+    }
+
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check tcp connections.
+
+=over 8
+
+=item B<--warning>
+
+Threshold warning for total connections.
+
+=item B<--critical>
+
+Threshold critical for total connections.
+
+=item B<--service>
+
+Check tcp connections following rules:
+tag,[type],[state],[port-src],[port-dst],[filter-ip-src],[filter-ip-dst],[threshold-warning],[threshold-critical]
+
+Example to test SSH connections on the server: --service="ssh,,,22,,,,10,20" 
+
+=over 16
+
+=item 
+
+Name to identify service (must be unique and couldn't be 'total').
+
+=item 
+
+regexp - can use 'ipv4', 'ipv6'. Empty means all.
+
+=item 
+
+regexp - can use 'finWait1', 'established',... Empty means all (minus listen).
+
+=item 
+
+regexp - can use to exclude or include some IPs.
+
+=item 
+
+nagios-perfdata - number of connections.
+
+=back
+
+=item B<--application>
+
+Check tcp connections of mutiple services:
+tag,[services],[threshold-warning],[threshold-critical]
+
+Example:
+--application="web,http|https,100,200"
+
+=over 16
+
+=item 
+
+Name to identify application (must be unique).
+
+=item 
+
+List of services (used the tag name. Separated by '|').
+
+=item 
+
+nagios-perfdata - number of connections.
+
+=back
+
+=back
+
+=cut
diff --git a/snmp_standard/mode/traffic.pm b/snmp_standard/mode/traffic.pm
index fe16f51e4..7e108fe7b 100644
--- a/snmp_standard/mode/traffic.pm
+++ b/snmp_standard/mode/traffic.pm
@@ -61,11 +61,14 @@ sub new {
                                   "critical-in:s"           => { name => 'critical_in' },
                                   "warning-out:s"           => { name => 'warning_out' },
                                   "critical-out:s"          => { name => 'critical_out' },
-                                  "reload-cache-time:s"     => { name => 'reload_cache_time' },
+                                  "reload-cache-time:s"     => { name => 'reload_cache_time', default => 180 },
                                   "name"                    => { name => 'use_name' },
                                   "interface:s"             => { name => 'interface' },
                                   "speed:s"                 => { name => 'speed' },
+                                  "speed-in:s"              => { name => 'speed_in' },
+                                  "speed-out:s"             => { name => 'speed_out' },
                                   "skip"                    => { name => 'skip' },
+                                  "skip-speed0"             => { name => 'skip_speed0' },
                                   "regexp"                  => { name => 'use_regexp' },
                                   "regexp-isensitive"       => { name => 'use_regexpi' },
                                   "oid-filter:s"            => { name => 'oid_filter', default => 'ifname'},
@@ -76,6 +79,7 @@ sub new {
                                 });
 
     $self->{interface_id_selected} = [];
+    $self->{get_speed} = 0;
     $self->{statefile_cache} = centreon::plugins::statefile->new(%options);
     $self->{statefile_value} = centreon::plugins::statefile->new(%options);
     
@@ -112,6 +116,11 @@ sub check_options {
         $self->{output}->add_option_msg(short_msg => "Unsupported --oid-display option.");
         $self->{output}->option_exit();
     }
+    if ((!defined($self->{option_results}->{speed}) || $self->{option_results}->{speed} eq '') &&
+        ((!defined($self->{option_results}->{speed_in}) || $self->{option_results}->{speed_in} eq '') ||
+        (!defined($self->{option_results}->{speed_out}) || $self->{option_results}->{speed_out} eq ''))) {
+        $self->{get_speed} = 1;
+    }
     
     $self->{statefile_cache}->check_options(%options);
     $self->{statefile_value}->check_options(%options);
@@ -140,12 +149,12 @@ sub run {
     
     foreach (@{$self->{interface_id_selected}}) {
         $self->{snmp}->load(oids => [$oid_adminstatus . "." . $_, $oid_operstatus . "." . $_, $oid_in32 . "." . $_, $oid_out32 . "." . $_]);
-        if (!defined($self->{option_results}->{speed}) || $self->{option_results}->{speed} eq '') {
+        if ($self->{get_speed} == 1) {
             $self->{snmp}->load(oids => [$oid_speed32 . "." . $_]);
         }
         if (!$self->{snmp}->is_snmpv1()) {
             $self->{snmp}->load(oids => [$oid_in64 . "." . $_, $oid_out64 . "." . $_]);
-            if (!defined($self->{option_results}->{speed}) || $self->{option_results}->{speed} eq '') {
+            if ($self->{get_speed} == 1) {
                 $self->{snmp}->load(oids => [$oid_speed64 . "." . $_]);
             }
         }
@@ -154,6 +163,7 @@ sub run {
     my $result = $self->{snmp}->get_leef();
     $new_datas->{last_timestamp} = time();
     my $old_timestamp = $self->{statefile_value}->get(name => 'last_timestamp');
+    my $buffer_creation = 0;
     if (!defined($self->{option_results}->{interface}) || defined($self->{option_results}->{use_regexp})) {
         $self->{output}->output_add(severity => 'OK',
                                     short_msg => 'All traffic are ok');
@@ -162,26 +172,6 @@ sub run {
     foreach (sort @{$self->{interface_id_selected}}) {
         my $display_value = $self->get_display_value(id => $_);
 
-        # Manage interface speed
-        my $interface_speed;
-        if (defined($self->{option_results}->{speed}) && $self->{option_results}->{speed} ne '') {
-            $interface_speed = $self->{option_results}->{speed} * 1000000;
-        } else {
-            if ((!defined($result->{$oid_speed32 . "." . $_}) || $result->{$oid_speed32 . "." . $_} !~ /^[0-9]+$/) && 
-                (!defined($result->{$oid_speed64 . "." . $_}) || $result->{$oid_speed64 . "." . $_} !~ /^[0-9]+$/)) {
-                $self->{output}->output_add(severity => 'UNKNOWN',
-                                            short_msg => "Interface '" . $display_value . "' Speed is null or incorrect. You should force the value with --speed option");
-                next;
-            }
-            $interface_speed = (defined($result->{$oid_speed64 . "." . $_}) && $result->{$oid_speed64 . "." . $_} ne '' ? ($result->{$oid_speed64 . "." . $_} * 1000000) : ($result->{$oid_speed32 . "." . $_}));
-            if ($interface_speed == 0) {
-                $self->{output}->output_add(severity => 'UNKNOWN',
-                                            short_msg => "Interface '" . $display_value . "' Speed is 0. You should force the value with --speed option");
-                next;
-            }
-        }
-        
-        
         if ($operstatus[$result->{$oid_operstatus . "." . $_} - 1] ne "up") {
             if (!defined($self->{option_results}->{skip}) && (!defined($result->{$oid_adminstatus . "." . $_}) || $operstatus[$result->{$oid_adminstatus . "." . $_} - 1] eq 'up') ) {
                 $self->{output}->output_add(severity => 'CRITICAL',
@@ -197,30 +187,79 @@ sub run {
             next;
         }
         
+        # Manage interface speed
+        my ($interface_speed_in, $interface_speed_out);
+        
+        if ($self->{get_speed} == 0) {
+            if (defined($self->{option_results}->{speed}) && $self->{option_results}->{speed} ne '') {
+                $interface_speed_in = $self->{option_results}->{speed} * 1000000;
+                $interface_speed_out = $self->{option_results}->{speed} * 1000000;
+            }
+            $interface_speed_in = $self->{option_results}->{speed_in} * 1000000 if (defined($self->{option_results}->{speed_in}) && $self->{option_results}->{speed_in} ne '');
+            $interface_speed_out = $self->{option_results}->{speed_out} * 1000000 if (defined($self->{option_results}->{speed_out}) && $self->{option_results}->{speed_out} ne '');
+        } else {
+            if ((!defined($result->{$oid_speed32 . "." . $_}) || $result->{$oid_speed32 . "." . $_} !~ /^[0-9]+$/) && 
+                (!defined($result->{$oid_speed64 . "." . $_}) || $result->{$oid_speed64 . "." . $_} !~ /^[0-9]+$/)) {
+                $self->{output}->output_add(severity => 'UNKNOWN',
+                                            short_msg => "Interface '" . $display_value . "' Speed is null or incorrect. You should force the value with --speed option");
+                next;
+            }
+            my $interface_speed = (defined($result->{$oid_speed64 . "." . $_}) && $result->{$oid_speed64 . "." . $_} ne '' ? ($result->{$oid_speed64 . "." . $_} * 1000000) : ($result->{$oid_speed32 . "." . $_}));
+            if (!defined($interface_speed) || $interface_speed == 0) {
+                if (!defined($self->{option_results}->{skip_speed0})) {
+                    $self->{output}->output_add(severity => 'UNKNOWN',
+                                                short_msg => "Interface '" . $display_value . "' Speed is 0. You should force the value with --speed option");
+                } else {
+                    $self->{output}->output_add(long_msg => "Skip interface '" . $display_value . "' (speed is 0).");
+                }
+                next;
+            }
+            $interface_speed_in = $interface_speed;
+            $interface_speed_out = $interface_speed;
+            $interface_speed_in = $self->{option_results}->{speed_in} * 1000000 if (defined($self->{option_results}->{speed_in}) && $self->{option_results}->{speed_in} ne '');
+            $interface_speed_out = $self->{option_results}->{speed_out} * 1000000 if (defined($self->{option_results}->{speed_out}) && $self->{option_results}->{speed_out} ne '');
+        }
+        
         my $old_mode = $self->{statefile_value}->get(name => 'mode_' . $_);
         $new_datas->{'mode_' . $_} = '32';
  
-        $new_datas->{'in_' . $_} = $result->{$oid_in32 . "." . $_} * 8;
+        $new_datas->{'in_' . $_} = $result->{$oid_in32 . "." . $_};
         if (defined($result->{$oid_in64 . "." . $_}) && $result->{$oid_in64 . "." . $_} ne '' && $result->{$oid_in64 . "." . $_} != 0) {
-            $new_datas->{'in_' . $_} = $result->{$oid_in64 . "." . $_} * 8;
+            $new_datas->{'in_' . $_} = $result->{$oid_in64 . "." . $_};
             $new_datas->{'mode_' . $_} = '64';
         }
-        $new_datas->{'out_' . $_} = $result->{$oid_out32 . "." . $_} * 8;
+        $new_datas->{'out_' . $_} = $result->{$oid_out32 . "." . $_};
         if (defined($result->{$oid_out64 . "." . $_}) && $result->{$oid_out64 . "." . $_} ne '' && $result->{$oid_out64 . "." . $_} != 0) {
-            $new_datas->{'out_' . $_} = $result->{$oid_out64 . "." . $_} * 8;
+            $new_datas->{'out_' . $_} = $result->{$oid_out64 . "." . $_};
             $new_datas->{'mode_' . $_} = '64';
         }
         
+        # Check if there is no values. Can happen :)
+        if (!defined($new_datas->{'out_' . $_}) || !defined($new_datas->{'in_' . $_})) {
+            # Avoid empty message
+            if (defined($self->{option_results}->{interface}) && !defined($self->{option_results}->{use_regexp})) {
+                 $self->{output}->output_add(severity => 'OK',
+                                             short_msg => "Interface '" . $display_value . "' is up");
+            }
+            $self->{output}->output_add(long_msg => "Skip interface '" . $display_value . "': bytes values are missing.");
+            next;
+        }
+        $new_datas->{'out_' . $_} *= 8;
+        $new_datas->{'in_' . $_} *= 8;
+        
         # We change mode. need to recreate a buffer
         if (!defined($old_mode) || $new_datas->{'mode_' . $_} ne $old_mode) {
+            $buffer_creation = 1;
             next;
         }
         
         my $old_in = $self->{statefile_value}->get(name => 'in_' . $_);
         my $old_out = $self->{statefile_value}->get(name => 'out_' . $_);
-        if (!defined($old_timestamp) || !defined($old_in) || !defined($old_out)) {
+        if (!defined($old_in) || !defined($old_out)) {
+            $buffer_creation = 1;
             next;
         }
+        
         if ($new_datas->{'in_' . $_} < $old_in) {
             # We set 0. Has reboot.
             $old_in = 0;
@@ -237,8 +276,8 @@ sub run {
         }
         my $in_absolute_per_sec = ($new_datas->{'in_' . $_} - $old_in) / $time_delta;
         my $out_absolute_per_sec = ($new_datas->{'out_' . $_} - $old_out) / $time_delta;
-        my $in_prct = $in_absolute_per_sec * 100 / $interface_speed;
-        my $out_prct = $out_absolute_per_sec * 100 / $interface_speed;
+        my $in_prct = $in_absolute_per_sec * 100 / $interface_speed_in;
+        my $out_prct = $out_absolute_per_sec * 100 / $interface_speed_out;
        
         ###########
         # Manage Output
@@ -263,18 +302,18 @@ sub run {
         $extra_label = '_' . $display_value if (!defined($self->{option_results}->{interface}) || defined($self->{option_results}->{use_regexp}));
         $self->{output}->perfdata_add(label => 'traffic_in' . $extra_label, unit => 'b/s',
                                       value => sprintf("%.2f", $in_absolute_per_sec),
-                                      warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-in', total => $interface_speed),
-                                      critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical-in', total => $interface_speed),
-                                      min => 0, max => $interface_speed);
+                                      warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-in', total => $interface_speed_in),
+                                      critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical-in', total => $interface_speed_in),
+                                      min => 0, max => $interface_speed_in);
         $self->{output}->perfdata_add(label => 'traffic_out' . $extra_label, unit => 'b/s',
                                       value => sprintf("%.2f", $out_absolute_per_sec),
-                                      warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-out', total => $interface_speed),
-                                      critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical-out', total => $interface_speed),
-                                      min => 0, max => $interface_speed);
+                                      warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-out', total => $interface_speed_out),
+                                      critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical-out', total => $interface_speed_out),
+                                      min => 0, max => $interface_speed_out);
     }
 
     $self->{statefile_value}->write(data => $new_datas);    
-    if (!defined($old_timestamp)) {
+    if ($buffer_creation == 1) {
         $self->{output}->output_add(severity => 'OK',
                                     short_msg => "Buffer creation...");
     }
@@ -300,6 +339,7 @@ sub reload_cache {
 
     $datas->{oid_filter} = $self->{option_results}->{oid_filter};
     $datas->{oid_display} = $self->{option_results}->{oid_display};
+    $datas->{last_timestamp} = time();
     $datas->{all_ids} = [];
     my $result = $self->{snmp}->get_table(oid => $oids_iftable{$self->{option_results}->{oid_filter}});
     foreach my $key ($self->{snmp}->oid_lex_sort(keys %$result)) {
@@ -339,7 +379,7 @@ sub manage_selection {
     my $oid_filter = $self->{statefile_cache}->get(name => 'oid_filter');
     if ($has_cache_file == 0 ||
         ($self->{option_results}->{oid_display} !~ /^($oid_display|$oid_filter)$/i || $self->{option_results}->{oid_filter} !~ /^($oid_display|$oid_filter)$/i) ||
-        (defined($timestamp_cache) && (time() - $timestamp_cache) > (($self->{option_results}->{reload_cache_time}) * 60))) {
+        !defined($timestamp_cache) || ((time() - $timestamp_cache) > (($self->{option_results}->{reload_cache_time}) * 60))) {
         $self->reload_cache();
         $self->{statefile_cache}->read();
     }
@@ -425,12 +465,24 @@ Allows to use regexp non case-sensitive (with --regexp).
 
 =item B<--speed>
 
-Set interface speed (in Mb).
+Set interface speed for incoming/outgoing traffic (in Mb).
+
+=item B<--speed-in>
+
+Set interface speed for incoming traffic (in Mb).
+
+=item B<--speed-out>
+
+Set interface speed for outgoing traffic (in Mb).
 
 =item B<--skip>
 
 Skip errors on interface status.
 
+=item B<--skip-speed0>
+
+Skip errors on interface with speed 0.
+
 =item B<--reload-cache-time>
 
 Time in seconds before reloading cache file (default: 180).
diff --git a/storage/dell/TL2000/mode/globalstatus.pm b/storage/dell/TL2000/mode/globalstatus.pm
index 7b39ba55e..77b1e07b8 100644
--- a/storage/dell/TL2000/mode/globalstatus.pm
+++ b/storage/dell/TL2000/mode/globalstatus.pm
@@ -42,7 +42,7 @@ use warnings;
 
 my %states = (
     1 => ['other', 'WARNING'], 
-    2 => ['unknown', 'UNKNOWN'], 
+    2 => ['unknown', 'WARNING'], 
     3 => ['ok', 'OK'], 
     4 => ['non critical', 'WARNING'],
     5 => ['critical', 'CRITICAL'],
@@ -57,14 +57,46 @@ sub new {
     $self->{version} = '1.0';
     $options{options}->add_options(arguments =>
                                 {
+                                "threshold-overload:s@"     => { name => 'threshold_overload' },
                                 });
 
     return $self;
 }
 
+sub check_treshold_overload {
+    my ($self, %options) = @_;
+    
+    $self->{overload_th} = {};
+    foreach my $val (@{$self->{option_results}->{threshold_overload}}) {
+        if ($val !~ /(.*?)=(.*)/) {
+            $self->{output}->add_option_msg(short_msg => "Wrong treshold-overload option '" . $val . "'.");
+            $self->{output}->option_exit();
+        }
+        my ($filter, $threshold) = ($1, $2);
+        if ($self->{output}->is_litteral_status(status => $threshold) == 0) {
+            $self->{output}->add_option_msg(short_msg => "Wrong treshold-overload status '" . $val . "'.");
+            $self->{output}->option_exit();
+        }
+        $self->{overload_th}->{$filter} = $threshold;
+    }
+}
+
 sub check_options {
     my ($self, %options) = @_;
     $self->SUPER::init(%options);
+    $self->check_treshold_overload();
+}
+
+sub get_severity {
+    my ($self, %options) = @_;
+    my $status = ${$states{$options{value}}}[1];
+    
+    foreach (keys %{$self->{overload_th}}) {
+        if (${$states{$options{value}}}[0] =~ /$_/) {
+            $status = $self->{overload_th}->{$_};
+        }
+    }
+    return $status;
 }
 
 sub run {
@@ -75,9 +107,9 @@ sub run {
     my $oid_TL2000StatusGlobalStatus = '.1.3.6.1.4.1.674.10893.2.102.2.1.0';
     my $result = $self->{snmp}->get_leef(oids => [$oid_TL2000StatusGlobalStatus], nothing_quit => 1);
     
-    $self->{output}->output_add(severity =>  ${$states{$result->{$oid_TL2000StatusGlobalStatus}}}[1],
+    $self->{output}->output_add(severity => $self->get_severity(value => $result->{$oid_TL2000StatusGlobalStatus}),
                                 short_msg => sprintf("Overall global status is '%s'.", 
-                                                ${$states{$result->{$oid_TL2000StatusGlobalStatus}}}[0]));
+                                                    ${$states{$result->{$oid_TL2000StatusGlobalStatus}}}[0]));
 
     $self->{output}->display();
     $self->{output}->exit();
@@ -93,6 +125,11 @@ Check the overall status of the appliance.
 
 =over 8
 
+=item B<--threshold-overload>
+
+Set to overload default threshold value.
+Example: --threshold-overload='(unknown|non critical)=critical'
+
 =back
 
 =cut
diff --git a/storage/emc/clariion/TODO b/storage/emc/clariion/TODO
index 50716351f..f4978fc54 100644
--- a/storage/emc/clariion/TODO
+++ b/storage/emc/clariion/TODO
@@ -39,143 +39,6 @@ LUN Capacity(Blocks):       1442538624
 Prct Rebuilt:               N/A
 Prct Bound:                 100
 
-======================
-Mode pour l'etat du SP
-======================
-
-La commande: getcrus
-SPE3 Enclosure SPE
-SP A State:                 Present
-SP B State:                 Present
-Enclosure SPE Power A0 State: Present
-Enclosure SPE Power A1 State: Present
-Enclosure SPE Power B0 State: Present
-Enclosure SPE Power B1 State: Present
-Enclosure SPE SPS A State:  Present
-Enclosure SPE SPS B State:  Present
-Enclosure SPE SPS A Cabling State: Valid
-Enclosure SPE SPS B Cabling State: Valid
-
-DAE3P Bus 0 Enclosure 0
-Bus 0 Enclosure 0 Fan A State: Present
-Bus 0 Enclosure 0 Fan B State: Present
-Bus 0 Enclosure 0 Power A State: Present
-Bus 0 Enclosure 0 Power B State: Present
-Bus 0 Enclosure 0 LCC A State: Present
-Bus 0 Enclosure 0 LCC B State: Present
-Bus 0 Enclosure 0 LCC A Revision: 7.85
-Bus 0 Enclosure 0 LCC B Revision: 7.85
-Bus 0 Enclosure 0 LCC A Serial #: FCNBD073833259
-Bus 0 Enclosure 0 LCC B Serial #: FCNBD073621646
-
-DAE3P Bus 1 Enclosure 0
-Bus 1 Enclosure 0 Fan A State: Present
-Bus 1 Enclosure 0 Fan B State: Present
-Bus 1 Enclosure 0 Power A State: Present
-Bus 1 Enclosure 0 Power B State: Present
-Bus 1 Enclosure 0 LCC A State: Present
-Bus 1 Enclosure 0 LCC B State: Present
-Bus 1 Enclosure 0 LCC A Revision: 7.85
-Bus 1 Enclosure 0 LCC B Revision: 7.85
-Bus 1 Enclosure 0 LCC A Serial #: JAHSL074355703
-Bus 1 Enclosure 0 LCC B Serial #: JAHSL074355754
-
-DAE3P Bus 0 Enclosure 1
-Bus 0 Enclosure 1 Fan A State: Present
-Bus 0 Enclosure 1 Fan B State: Present
-Bus 0 Enclosure 1 Power A State: Present
-Bus 0 Enclosure 1 Power B State: Present
-Bus 0 Enclosure 1 LCC A State: Present
-Bus 0 Enclosure 1 LCC B State: Present
-Bus 0 Enclosure 1 LCC A Revision: 7.85
-Bus 0 Enclosure 1 LCC B Revision: 7.85
-Bus 0 Enclosure 1 LCC A Serial #: JAHDL084257760
-Bus 0 Enclosure 1 LCC B Serial #: JAHDL084156218
-
-DAE3P Bus 1 Enclosure 1
-Bus 1 Enclosure 1 Fan A State: Present
-Bus 1 Enclosure 1 Fan B State: Present
-Bus 1 Enclosure 1 Power A State: Present
-Bus 1 Enclosure 1 Power B State: Present
-Bus 1 Enclosure 1 LCC A State: Present
-Bus 1 Enclosure 1 LCC B State: Present
-Bus 1 Enclosure 1 LCC A Revision: 7.85
-Bus 1 Enclosure 1 LCC B Revision: 7.85
-Bus 1 Enclosure 1 LCC A Serial #: FCNBD073619725
-Bus 1 Enclosure 1 LCC B Serial #: FCNBD073619505
-
-DAE3P Bus 1 Enclosure 2
-Bus 1 Enclosure 2 Fan A State: Present
-Bus 1 Enclosure 2 Fan B State: Present
-Bus 1 Enclosure 2 Power A State: Present
-Bus 1 Enclosure 2 Power B State: Present
-Bus 1 Enclosure 2 LCC A State: Present
-Bus 1 Enclosure 2 LCC B State: Present
-Bus 1 Enclosure 2 LCC A Revision: 7.85
-Bus 1 Enclosure 2 LCC B Revision: 7.85
-Bus 1 Enclosure 2 LCC A Serial #: JAHSL074767593
-Bus 1 Enclosure 2 LCC B Serial #: JAHSL074666885
-
-DAE3P Bus 1 Enclosure 3
-Bus 1 Enclosure 3 Fan A State: Present
-Bus 1 Enclosure 3 Fan B State: Present
-Bus 1 Enclosure 3 Power A State: Present
-Bus 1 Enclosure 3 Power B State: Present
-Bus 1 Enclosure 3 LCC A State: Present
-Bus 1 Enclosure 3 LCC B State: Present
-Bus 1 Enclosure 3 LCC A Revision: 7.85
-Bus 1 Enclosure 3 LCC B Revision: 7.85
-Bus 1 Enclosure 3 LCC A Serial #: JAHSL074767433
-Bus 1 Enclosure 3 LCC B Serial #: JAHSL074666624
-
-DAE3P Bus 1 Enclosure 4
-Bus 1 Enclosure 4 Fan A State: Present
-Bus 1 Enclosure 4 Fan B State: Present
-Bus 1 Enclosure 4 Power A State: Present
-Bus 1 Enclosure 4 Power B State: Present
-Bus 1 Enclosure 4 LCC A State: Present
-Bus 1 Enclosure 4 LCC B State: Present
-Bus 1 Enclosure 4 LCC A Revision: 7.85
-Bus 1 Enclosure 4 LCC B Revision: 7.85
-Bus 1 Enclosure 4 LCC A Serial #: JAHSL074767321
-Bus 1 Enclosure 4 LCC B Serial #: JAHSL074767360
-
-DAE3P Bus 1 Enclosure 5
-Bus 1 Enclosure 5 Fan A State: Present
-Bus 1 Enclosure 5 Fan B State: Present
-Bus 1 Enclosure 5 Power A State: Present
-Bus 1 Enclosure 5 Power B State: Present
-Bus 1 Enclosure 5 LCC A State: Present
-Bus 1 Enclosure 5 LCC B State: Present
-Bus 1 Enclosure 5 LCC A Revision: 7.85
-Bus 1 Enclosure 5 LCC B Revision: 7.85
-Bus 1 Enclosure 5 LCC A Serial #: JAHSL074664396
-Bus 1 Enclosure 5 LCC B Serial #: JAHSL074768042
-
-DAE3P Bus 1 Enclosure 6
-Bus 1 Enclosure 6 Fan A State: Present
-Bus 1 Enclosure 6 Fan B State: Present
-Bus 1 Enclosure 6 Power A State: Present
-Bus 1 Enclosure 6 Power B State: Present
-Bus 1 Enclosure 6 LCC A State: Present
-Bus 1 Enclosure 6 LCC B State: Present
-Bus 1 Enclosure 6 LCC A Revision: 7.85
-Bus 1 Enclosure 6 LCC B Revision: 7.85
-Bus 1 Enclosure 6 LCC A Serial #: JAHSL074666153
-Bus 1 Enclosure 6 LCC B Serial #: JAHSL074767483
-
-DAE3P Bus 1 Enclosure 7
-Bus 1 Enclosure 7 Fan A State: Present
-Bus 1 Enclosure 7 Fan B State: Present
-Bus 1 Enclosure 7 Power A State: Present
-Bus 1 Enclosure 7 Power B State: Present
-Bus 1 Enclosure 7 LCC A State: Present
-Bus 1 Enclosure 7 LCC B State: Present
-Bus 1 Enclosure 7 LCC A Revision: 7.85
-Bus 1 Enclosure 7 LCC B Revision: 7.85
-Bus 1 Enclosure 7 LCC A Serial #: JAHDL084155976
-Bus 1 Enclosure 7 LCC B Serial #: JAHDL084153292
-
 
 ======================
 Mode pour le controller global
@@ -189,17 +52,6 @@ Total Writes:                  401613
 Total Reads:                   6653775
 Prct Idle:                     94.2
 
-======================
-Mode pour le cache
-======================
-
-La commande: getcache -pdp -state -mirror
-
-Prct Dirty Cache Pages =            0
-SP Read Cache State                 Enabled
-SP Write Cache State                Enabled
-Write Cache Mirrored:               YES
-
 ======================
 Mode pour les disques
 ======================
diff --git a/storage/emc/clariion/custom.pm b/storage/emc/clariion/custom.pm
index dfb06b94b..7c7ce1225 100644
--- a/storage/emc/clariion/custom.pm
+++ b/storage/emc/clariion/custom.pm
@@ -233,19 +233,19 @@ my navisphere manage
 
 =item B<--navicli-path>
 
-Specify navicli path (default: 'navicli')
+Specify navicli path (default: '/opt/Navisphere/bin')
 
 =item B<--navicli-command>
 
-Specify navicli command (default: '/opt/Navisphere/bin').
+Specify navicli command (default: 'navicli').
 
 =item B<--naviseccli-path>
 
-Specify naviseccli path (default: 'naviseccli')
+Specify naviseccli path (default: '/opt/Navisphere/bin')
 
 =item B<--naviseccli-command>
 
-Specify naviseccli command (default: '/opt/Navisphere/bin').
+Specify naviseccli command (default: 'naviseccli').
 
 =item B<--sudo>
 
diff --git a/storage/emc/clariion/mode/cache.pm b/storage/emc/clariion/mode/cache.pm
new file mode 100644
index 000000000..c9fa1ba57
--- /dev/null
+++ b/storage/emc/clariion/mode/cache.pm
@@ -0,0 +1,214 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package storage::emc::clariion::mode::cache;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+use centreon::plugins::misc;
+
+my %states = (
+    read_cache => [
+        ['^enabled$'   , 'OK'],
+        ['^disabling$' , 'CRITICAL'], 
+        ['^disabled$'  , 'CRITICAL'], 
+        ['^.*$'        , 'CRITICAL'], 
+    ],
+    write_cache => [
+        ['^enabled$'    , 'OK'],
+        ['^disabled$'   , 'CRITICAL'],
+        ['^enabling$'   , 'OK'],
+        ['^initializing$' , 'WARNING'],
+        ['^dumping$'      , 'CRITICAL'],
+        ['^frozen$'       , 'CRITICAL'],
+        ['^.*$'           , 'CRITICAL'],
+    ],
+    write_mirror => [
+        ['^yes$'    , 'OK'],
+        ['^.*$'     , 'CRITICAL'],
+    ],
+);
+
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+                                {
+                                "threshold-overload:s@"     => { name => 'threshold_overload' },
+                                "warning:s"               => { name => 'warning', },
+                                "critical:s"              => { name => 'critical', },
+                                });
+
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+    
+    if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{option_results}->{warning})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'.");
+       $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'.");
+       $self->{output}->option_exit();
+    }
+    $self->{overload_th} = {};
+    foreach my $val (@{$self->{option_results}->{threshold_overload}}) {
+        if ($val !~ /(.*?):(.*?)=(.*)/) {
+            $self->{output}->add_option_msg(short_msg => "Wrong treshold-overload option '" . $val . "'.");
+            $self->{output}->option_exit();
+        }
+
+        my ($label, $filter, $threshold) = ($1, $2, $3);
+        if ($self->{output}->is_litteral_status(status => $threshold) == 0) {
+            $self->{output}->add_option_msg(short_msg => "Wrong treshold-overload status '" . $val . "'.");
+            $self->{output}->option_exit();
+        }
+        $self->{overload_th}->{$label} = {} if (!defined($self->{overload_th}->{$label}));
+        $self->{overload_th}->{$label}->{$filter} = $threshold;
+    }
+}
+
+sub get_severity {
+    my ($self, %options) = @_;
+    my $status = 'unknown';
+    
+    foreach my $entry (@{$states{$options{label}}}) {
+        if ($options{value} =~ /${$entry}[0]/i) {
+            $status = ${$entry}[1];
+            foreach my $filter (keys %{$self->{overload_th}->{$options{label}}}) {
+                if (${$entry}[0] =~ /$filter/i) {
+                    $status = $self->{overload_th}->{$options{label}}->{$filter};
+                    last;
+                }
+            }
+            last;
+        }
+    }
+
+    return $status;
+}
+
+sub run {
+    my ($self, %options) = @_;
+    my $clariion = $options{custom};
+    
+    #Prct Dirty Cache Pages =            0
+    #SP Read Cache State                 Enabled
+    #SP Write Cache State                Enabled
+    #Write Cache Mirrored:               YES
+    my $response = $clariion->execute_command(cmd => 'getcache -pdp -state -mirror');
+    chomp $response;
+    
+    if ($response !~ /^SP Read Cache State\s+(.*)/im) {
+        $self->{output}->output_add(severity => 'UNKNOWN',
+                                short_msg => 'Cannot find cache informations.');
+        $self->{output}->display();
+        $self->{output}->exit();
+    }
+    my $read_cache_state = $1;
+    
+    $response =~ /^SP Write Cache State\s+(.*)\s*$/im;
+    my $write_cache_state = $1;
+    
+    $response =~ /^Write Cache Mirrored:\s+(.*)\s*$/im;
+    my $write_cache_mirror = $1;
+    
+    $response =~ /^Prct.*?=\s+(\S+)/im;
+    my $dirty_prct = $1;
+    
+    $self->{output}->output_add(severity => $self->get_severity(value => $read_cache_state,
+                                                                label => 'read_cache'),
+                                short_msg => sprintf("Read cache state is '%s'", 
+                                                    $read_cache_state));
+    $self->{output}->output_add(severity => $self->get_severity(value => $write_cache_state,
+                                                                label => 'write_cache'),
+                                short_msg => sprintf("Write cache state is '%s'", 
+                                                    $write_cache_state));
+    $self->{output}->output_add(severity => $self->get_severity(value => $write_cache_mirror,
+                                                                label => 'write_mirror'),
+                                short_msg => sprintf("Write cache mirror is '%s'", 
+                                                    $write_cache_mirror));
+    
+    my $exit = $self->{perfdata}->threshold_check(value => $dirty_prct, 
+                                                  threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
+    if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
+        $self->{output}->output_add(severity => $exit,
+                                    short_msg => sprintf("Dirty Cache Pages is %s %%", $dirty_prct));
+    }
+    $self->{output}->perfdata_add(label => 'dirty_cache', unit => '%',
+                                  value => $dirty_prct,
+                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
+                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'),
+                                  min => 0, max => 100);
+    
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check status of the read and write cache.
+
+=over 8
+
+=item B<--warning>
+
+Threshold warning in percent (for dirty cache).
+
+=item B<--critical>
+
+Threshold critical in percent (for dirty cache).
+
+=item B<--threshold-overload>
+
+Set to overload default threshold value.
+Example: --threshold-overload='read_cache:(enabled)=critical'
+
+=back
+
+=cut
diff --git a/storage/emc/clariion/mode/listluns.pm b/storage/emc/clariion/mode/listluns.pm
index a1f1574a3..f1053de1b 100644
--- a/storage/emc/clariion/mode/listluns.pm
+++ b/storage/emc/clariion/mode/listluns.pm
@@ -99,16 +99,31 @@ sub manage_selection {
         $raid_group_id = $1 if ($content =~ /^RAIDGroup ID:\s+(.*)$/im);
         $drive_type = $1 if ($content =~ /^Drive Type:\s+(.*)$/im);
         
-        next if (defined($self->{option_results}->{filter_lunnumber}) && $self->{option_results}->{filter_lunnumber} ne '' &&
-                 $lun_num !~ /$self->{option_results}->{filter_lunnumber}/);
-        next if (defined($self->{option_results}->{filter_lunstate}) && $self->{option_results}->{filter_lunstate} ne '' &&
-                 $state !~ /$self->{option_results}->{filter_lunstate}/);
-        next if (defined($self->{option_results}->{filter_drivetype}) && $self->{option_results}->{filter_drivetype} ne '' &&
-                 $drive_type !~ /$self->{option_results}->{filter_drivetype}/);
-        next if (defined($self->{option_results}->{filter_raidtype}) && $self->{option_results}->{filter_raidtype} ne '' &&
-                 $raid_type !~ /$self->{option_results}->{filter_raidtype}/);
-        next if (defined($self->{option_results}->{filter_raidgroupid}) && $self->{option_results}->{filter_raidgroupid} ne '' &&
-                 $raid_group_id !~ /$self->{option_results}->{filter_raidgroupid}/);
+        if (defined($self->{option_results}->{filter_lunnumber}) && $self->{option_results}->{filter_lunnumber} ne '' &&
+            $lun_num !~ /$self->{option_results}->{filter_lunnumber}/) {
+            $self->{output}->output_add(long_msg => "Skipping lun '" . $lun_num . "': no matching filter lun number");
+            next;
+        }
+        if (defined($self->{option_results}->{filter_lunstate}) && $self->{option_results}->{filter_lunstate} ne '' &&
+            $state !~ /$self->{option_results}->{filter_lunstate}/) {
+            $self->{output}->output_add(long_msg => "Skipping lun '" . $lun_num . "': no matching filter lun state");
+            next;
+        }
+        if (defined($self->{option_results}->{filter_drivetype}) && $self->{option_results}->{filter_drivetype} ne '' &&
+            $drive_type !~ /$self->{option_results}->{filter_drivetype}/) {
+            $self->{output}->output_add(long_msg => "Skipping lun '" . $lun_num . "': no matching filter lun drive type");
+            next;
+        }
+        if (defined($self->{option_results}->{filter_raidtype}) && $self->{option_results}->{filter_raidtype} ne '' &&
+            $raid_type !~ /$self->{option_results}->{filter_raidtype}/) {
+            $self->{output}->output_add(long_msg => "Skipping lun '" . $lun_num . "': no matching filter lun raid type");
+            next;
+        }
+        if (defined($self->{option_results}->{filter_raidgroupid}) && $self->{option_results}->{filter_raidgroupid} ne '' &&
+            $raid_group_id !~ /$self->{option_results}->{filter_raidgroupid}/) {
+            $self->{output}->output_add(long_msg => "Skipping lun '" . $lun_num . "': no matching filter lun raid group id");
+            next;
+        }
 
         $self->{result}->{$lun_num} = {state => $state, drive_type => $drive_type, raid_type => $raid_type, raid_groupid => $raid_group_id};
     }
@@ -119,23 +134,17 @@ sub run {
     $self->{clariion} = $options{custom};
     
     $self->manage_selection();
-
-    my $lun_display = '';
-    my $lun_display_append = '';
     foreach my $num (sort(keys %{$self->{result}})) {
-        $lun_display .= $lun_display_append . 'number = ' . $num . 
-                               ' [' .
-                               'state = ' . $self->{result}->{$num}->{state} .
-                               ', drive type = ' . $self->{result}->{$num}->{drive_type} .
-                               ', raid type = ' . $self->{result}->{$num}->{raid_type} .
-                               ', raid groupid = ' . $self->{result}->{$num}->{raid_groupid} .
-                               ']';
-        $lun_display_append = ', ';
+        $self->{output}->output_add(long_msg => "'" . $num . "' [state = " . $self->{result}->{$num}->{state} .
+                                                '] [drive type = ' . $self->{result}->{$num}->{drive_type} .
+                                                '] [raid type = ' . $self->{result}->{$num}->{raid_type} .
+                                                '] [raid groupid = ' . $self->{result}->{$num}->{raid_groupid} .
+                                                ']');
     }
     
     $self->{output}->output_add(severity => 'OK',
-                                short_msg => 'List LUNs: ' . $lun_display);
-    $self->{output}->display(nolabel => 1);
+                                short_msg => 'List LUNs:');
+    $self->{output}->display(nolabel => 1, force_ignore_perfdata => 1, force_long_output => 1);
     $self->{output}->exit();
 }
 
diff --git a/storage/emc/clariion/mode/sp.pm b/storage/emc/clariion/mode/sp.pm
new file mode 100644
index 000000000..11448704c
--- /dev/null
+++ b/storage/emc/clariion/mode/sp.pm
@@ -0,0 +1,196 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package storage::emc::clariion::mode::sp;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+use centreon::plugins::misc;
+use storage::emc::clariion::mode::spcomponents::fan;
+use storage::emc::clariion::mode::spcomponents::lcc;
+use storage::emc::clariion::mode::spcomponents::psu;
+use storage::emc::clariion::mode::spcomponents::memory;
+use storage::emc::clariion::mode::spcomponents::cpu;
+use storage::emc::clariion::mode::spcomponents::iomodule;
+use storage::emc::clariion::mode::spcomponents::cable;
+use storage::emc::clariion::mode::spcomponents::sp;
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+                                { 
+                                  "exclude:s"        => { name => 'exclude' },
+                                  "component:s"      => { name => 'component', default => 'all' },
+                                  "no-component:s"   => { name => 'no_component' },
+                                });
+
+    $self->{components} = {};
+    $self->{no_components} = undef;
+    
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+    
+    if (defined($self->{option_results}->{no_component})) {
+        if ($self->{option_results}->{no_component} ne '') {
+            $self->{no_components} = $self->{option_results}->{no_component};
+        } else {
+            $self->{no_components} = 'critical';
+        }
+    }
+}
+
+sub component {
+    my ($self, %options) = @_;
+    
+    if ($self->{option_results}->{component} eq 'all') {
+        storage::emc::clariion::mode::spcomponents::fan::check($self);
+        storage::emc::clariion::mode::spcomponents::lcc::check($self);
+        storage::emc::clariion::mode::spcomponents::psu::check($self);
+        storage::emc::clariion::mode::spcomponents::cable::check($self);
+        storage::emc::clariion::mode::spcomponents::iomodule::check($self);
+        storage::emc::clariion::mode::spcomponents::memory::check($self);
+        storage::emc::clariion::mode::spcomponents::cpu::check($self);
+        storage::emc::clariion::mode::spcomponents::sp::check($self);
+    } elsif ($self->{option_results}->{component} eq 'sp') {
+        storage::emc::clariion::mode::spcomponents::sp::check($self);
+    } elsif ($self->{option_results}->{component} eq 'fan') {
+        storage::emc::clariion::mode::spcomponents::fan::check($self);
+    } elsif ($self->{option_results}->{component} eq 'lcc') {
+        storage::emc::clariion::mode::spcomponents::lcc::check($self);
+    } elsif ($self->{option_results}->{component} eq 'psu') {
+        storage::emc::clariion::mode::spcomponents::psu::check($self);
+    } elsif ($self->{option_results}->{component} eq 'memory') {
+        storage::emc::clariion::mode::spcomponents::memory::check($self);
+    } elsif ($self->{option_results}->{component} eq 'cpu') {
+        storage::emc::clariion::mode::spcomponents::cpu::check($self);
+    } elsif ($self->{option_results}->{component} eq 'io') {
+        storage::emc::clariion::mode::spcomponents::iomodule::check($self);
+    } elsif ($self->{option_results}->{component} eq 'cable') {
+        storage::emc::clariion::mode::spcomponents::cable::check($self);
+    } else {
+        $self->{output}->add_option_msg(short_msg => "Wrong option. Cannot find component '" . $self->{option_results}->{component} . "'.");
+        $self->{output}->option_exit();
+    }
+    
+    my $total_components = 0;
+    my $display_by_component = '';
+    my $display_by_component_append = '';
+    foreach my $comp (sort(keys %{$self->{components}})) {
+        # Skipping short msg when no components
+        next if ($self->{components}->{$comp}->{total} == 0 && $self->{components}->{$comp}->{skip} == 0);
+        $total_components += $self->{components}->{$comp}->{total} + $self->{components}->{$comp}->{skip};
+        $display_by_component .= $display_by_component_append . $self->{components}->{$comp}->{total} . '/' . $self->{components}->{$comp}->{skip} . ' ' . $self->{components}->{$comp}->{name};
+        $display_by_component_append = ', ';
+    }
+    
+    $self->{output}->output_add(severity => 'OK',
+                                short_msg => sprintf("All %s components [%s] are ok.", 
+                                                     $total_components,
+                                                     $display_by_component)
+                                );
+
+    if (defined($self->{option_results}->{no_component}) && $total_components == 0) {
+        $self->{output}->output_add(severity => $self->{no_components},
+                                    short_msg => 'No components are checked.');
+    }
+}
+
+sub run {
+    my ($self, %options) = @_;
+    my $clariion = $options{custom};
+    
+    $self->{response} = $clariion->execute_command(cmd => 'getcrus -all');
+    chomp $self->{response};
+
+    $self->component();
+
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+sub check_exclude {
+    my ($self, %options) = @_;
+
+    if (defined($options{instance})) {
+        if (defined($self->{option_results}->{exclude}) && $self->{option_results}->{exclude} =~ /(^|\s|,)${options{section}}[^,]*#\Q$options{instance}\E#/) {
+            $self->{components}->{$options{section}}->{skip}++;
+            $self->{output}->output_add(long_msg => sprintf("Skipping $options{section} section $options{instance} instance."));
+            return 1;
+        }
+    } elsif (defined($self->{option_results}->{exclude}) && $self->{option_results}->{exclude} =~ /(^|\s|,)$options{section}(\s|,|$)/) {
+        $self->{output}->output_add(long_msg => sprintf("Skipping $options{section} section."));
+        return 1;
+    }
+    return 0;
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check status of storage processor.
+
+=over 8
+
+=item B<--component>
+
+Which component to check (Default: 'all').
+Can be: 'cpu', 'psu', 'pc', 'fan', 'network', 'temperature', 'storage'.
+
+=item B<--exclude>
+
+Exclude some parts (comma seperated list) (Example: --exclude=fan,lcc)
+Can also exclude specific instance: --exclude=fan#1.2#,lcc
+
+=item B<--no-component>
+
+Return an error if no compenents are checked.
+If total (with skipped) is 0. (Default: 'critical' returns).
+
+=back
+
+=cut
\ No newline at end of file
diff --git a/storage/emc/clariion/mode/spcomponents/cable.pm b/storage/emc/clariion/mode/spcomponents/cable.pm
new file mode 100644
index 000000000..fbda6c53c
--- /dev/null
+++ b/storage/emc/clariion/mode/spcomponents/cable.pm
@@ -0,0 +1,76 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package storage::emc::clariion::mode::spcomponents::cable;
+
+use strict;
+use warnings;
+
+my %conditions = (
+    1 => ['^(?!(Present|Valid)$)' => 'CRITICAL'],
+);
+
+sub check {
+    my ($self) = @_;
+
+    $self->{output}->output_add(long_msg => "Checking cables");
+    $self->{components}->{cable} = {name => 'cables', total => 0, skip => 0};
+    return if ($self->check_exclude(section => 'cable'));
+    
+    # Enclosure SPE SPS A Cabling State: Valid
+    while ($self->{response} =~ /^(?:Bus\s+(\d+)\s+){0,1}Enclosure\s+(\S+)\s+(Power|SPS)\s+(\S+)\s+Cabling\s+State:\s+(.*)$/mgi) {
+        my ($state, $instance) = ($5, "$2.$3.$4");
+        if (defined($1)) {
+            $instance = "$1.$2.$3.$4";
+        }
+        
+        next if ($self->check_exclude(section => 'cable', instance => $instance));
+        $self->{components}->{cable}->{total}++;
+        
+        $self->{output}->output_add(long_msg => sprintf("cable '%s' state is %s.",
+                                                        $instance, $state)
+                                    );
+        foreach (keys %conditions) {
+            if ($state =~ /${$conditions{$_}}[0]/i) {
+                $self->{output}->output_add(severity =>  ${$conditions{$_}}[1],
+                                            short_msg => sprintf("cable '%s' state is %s",
+                                                        $instance, $state));
+                last;
+            }
+        }
+    }
+}
+
+1;
\ No newline at end of file
diff --git a/storage/emc/clariion/mode/spcomponents/cpu.pm b/storage/emc/clariion/mode/spcomponents/cpu.pm
new file mode 100644
index 000000000..411c6ed72
--- /dev/null
+++ b/storage/emc/clariion/mode/spcomponents/cpu.pm
@@ -0,0 +1,74 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package storage::emc::clariion::mode::spcomponents::cpu;
+
+use strict;
+use warnings;
+
+my %conditions = (
+    1 => ['^(?!(Present|Valid)$)' => 'CRITICAL'],
+);
+
+sub check {
+    my ($self) = @_;
+
+    $self->{output}->output_add(long_msg => "Checking cpu");
+    $self->{components}->{cpu} = {name => 'cpus', total => 0, skip => 0};
+    return if ($self->check_exclude(section => 'cpu'));
+    
+    # Enclosure SPE CPU Module A State: Present
+    while ($self->{response} =~ /^Enclosure\s+(\S+)\s+CPU\s+Module\s+(\S+)\s+State:\s+(.*)$/mgi) {
+        my $instance = "$1.$2";
+        my $state = $3;
+        
+        next if ($self->check_exclude(section => 'cpu', instance => $instance));
+        $self->{components}->{cpu}->{total}++;
+        
+        $self->{output}->output_add(long_msg => sprintf("cpu '%s' state is %s.",
+                                                        $instance, $state)
+                                    );
+        foreach (keys %conditions) {
+            if ($state =~ /${$conditions{$_}}[0]/i) {
+                $self->{output}->output_add(severity =>  ${$conditions{$_}}[1],
+                                            short_msg => sprintf("cpu '%s' state is %s",
+                                                        $instance, $state));
+                last;
+            }
+        }
+    }
+}
+
+1;
\ No newline at end of file
diff --git a/storage/emc/clariion/mode/spcomponents/fan.pm b/storage/emc/clariion/mode/spcomponents/fan.pm
new file mode 100644
index 000000000..8e2ff2171
--- /dev/null
+++ b/storage/emc/clariion/mode/spcomponents/fan.pm
@@ -0,0 +1,74 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package storage::emc::clariion::mode::spcomponents::fan;
+
+use strict;
+use warnings;
+
+my %conditions = (
+    1 => ['^(?!(Present|Valid)$)' => 'CRITICAL'],
+);
+
+sub check {
+    my ($self) = @_;
+
+    $self->{output}->output_add(long_msg => "Checking fans");
+    $self->{components}->{fan} = {name => 'fans', total => 0, skip => 0};
+    return if ($self->check_exclude(section => 'fan'));
+    
+    # Bus 0 Enclosure 0 Fan A State: Present
+    while ($self->{response} =~ /^Bus\s+(\d+)\s+Enclosure\s+(\d+)\s+Fan\s+(\S+)\s+State:\s+(.*)$/mgi) {
+        my $instance = "$1.$2.$3";
+        my $state = $4;
+        
+        next if ($self->check_exclude(section => 'fan', instance => $instance));
+        $self->{components}->{fan}->{total}++;
+        
+        $self->{output}->output_add(long_msg => sprintf("fan '%s' state is %s.",
+                                                        $instance, $state)
+                                    );
+        foreach (keys %conditions) {
+            if ($state =~ /${$conditions{$_}}[0]/i) {
+                $self->{output}->output_add(severity =>  ${$conditions{$_}}[1],
+                                            short_msg => sprintf("fan '%s' state is %s",
+                                                        $instance, $state));
+                last;
+            }
+        }
+    }
+}
+
+1;
\ No newline at end of file
diff --git a/storage/emc/clariion/mode/spcomponents/iomodule.pm b/storage/emc/clariion/mode/spcomponents/iomodule.pm
new file mode 100644
index 000000000..696d274a5
--- /dev/null
+++ b/storage/emc/clariion/mode/spcomponents/iomodule.pm
@@ -0,0 +1,74 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package storage::emc::clariion::mode::spcomponents::iomodule;
+
+use strict;
+use warnings;
+
+my %conditions = (
+    1 => ['^(?!(Present|Valid)$)' => 'CRITICAL'],
+);
+
+sub check {
+    my ($self) = @_;
+
+    $self->{output}->output_add(long_msg => "Checking I/O modules");
+    $self->{components}->{io} = {name => 'IO module', total => 0, skip => 0};
+    return if ($self->check_exclude(section => 'io'));
+    
+    # Enclosure SPE SP A I/O Module 0 State: Present
+    while ($self->{response} =~ /^Enclosure\s+(\S+)\s+SP\s+(\S+)\s+I\/O\s+Module\s+(\S+)\s+State:\s+(.*)$/mgi) {
+        my $instance = "$1.$2.$3";
+        my $state = $4;
+        
+        next if ($self->check_exclude(section => 'io', instance => $instance));
+        $self->{components}->{io}->{total}++;
+        
+        $self->{output}->output_add(long_msg => sprintf("I/O module '%s' state is %s.",
+                                                        $instance, $state)
+                                    );
+        foreach (keys %conditions) {
+            if ($state =~ /${$conditions{$_}}[0]/i) {
+                $self->{output}->output_add(severity =>  ${$conditions{$_}}[1],
+                                            short_msg => sprintf("I/O module '%s' state is %s",
+                                                        $instance, $state));
+                last;
+            }
+        }
+    }
+}
+
+1;
\ No newline at end of file
diff --git a/storage/emc/clariion/mode/spcomponents/lcc.pm b/storage/emc/clariion/mode/spcomponents/lcc.pm
new file mode 100644
index 000000000..7596fea2a
--- /dev/null
+++ b/storage/emc/clariion/mode/spcomponents/lcc.pm
@@ -0,0 +1,74 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package storage::emc::clariion::mode::spcomponents::lcc;
+
+use strict;
+use warnings;
+
+my %conditions = (
+    1 => ['^(?!(Present|Valid)$)' => 'CRITICAL'],
+);
+
+sub check {
+    my ($self) = @_;
+
+    $self->{output}->output_add(long_msg => "Checking link control card");
+    $self->{components}->{lcc} = {name => 'lccs', total => 0, skip => 0};
+    return if ($self->check_exclude(section => 'lcc'));
+    
+    # Bus 1 Enclosure 6 LCC A State: Present
+    while ($self->{response} =~ /^Bus\s+(\d+)\s+Enclosure\s+(\d+)\s+LCC\s+(\S+)\s+State:\s+(.*)$/mgi) {
+        my $instance = "$1.$2.$3";
+        my $state = $4;
+        
+        next if ($self->check_exclude(section => 'lcc', instance => $instance));
+        $self->{components}->{lcc}->{total}++;
+        
+        $self->{output}->output_add(long_msg => sprintf("lcc '%s' state is %s.",
+                                                        $instance, $state)
+                                    );
+        foreach (keys %conditions) {
+            if ($state =~ /${$conditions{$_}}[0]/i) {
+                $self->{output}->output_add(severity =>  ${$conditions{$_}}[1],
+                                            short_msg => sprintf("lcc '%s' state is %s",
+                                                        $instance, $state));
+                last;
+            }
+        }
+    }
+}
+
+1;
\ No newline at end of file
diff --git a/storage/emc/clariion/mode/spcomponents/memory.pm b/storage/emc/clariion/mode/spcomponents/memory.pm
new file mode 100644
index 000000000..3a0242f63
--- /dev/null
+++ b/storage/emc/clariion/mode/spcomponents/memory.pm
@@ -0,0 +1,74 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package storage::emc::clariion::mode::spcomponents::memory;
+
+use strict;
+use warnings;
+
+my %conditions = (
+    1 => ['^(?!(Present|Valid)$)' => 'CRITICAL'],
+);
+
+sub check {
+    my ($self) = @_;
+
+    $self->{output}->output_add(long_msg => "Checking dimm");
+    $self->{components}->{dimm} = {name => 'dimm', total => 0, skip => 0};
+    return if ($self->check_exclude(section => 'dimm'));
+    
+    # Enclosure SPE DIMM Module A State: Present
+    while ($self->{response} =~ /^Enclosure\s+(\S+)\s+DIMM\s+Module\s+(\S+)\s+State:\s+(.*)$/mgi) {
+        my $instance = "$1.$2";
+        my $state = $3;
+        
+        next if ($self->check_exclude(section => 'dimm', instance => $instance));
+        $self->{components}->{dimm}->{total}++;
+        
+        $self->{output}->output_add(long_msg => sprintf("Dimm '%s' state is %s.",
+                                                        $instance, $state)
+                                    );
+        foreach (keys %conditions) {
+            if ($state =~ /${$conditions{$_}}[0]/i) {
+                $self->{output}->output_add(severity =>  ${$conditions{$_}}[1],
+                                            short_msg => sprintf("Dimm '%s' state is %s",
+                                                        $instance, $state));
+                last;
+            }
+        }
+    }
+}
+
+1;
\ No newline at end of file
diff --git a/storage/emc/clariion/mode/spcomponents/psu.pm b/storage/emc/clariion/mode/spcomponents/psu.pm
new file mode 100644
index 000000000..9427bef96
--- /dev/null
+++ b/storage/emc/clariion/mode/spcomponents/psu.pm
@@ -0,0 +1,80 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package storage::emc::clariion::mode::spcomponents::psu;
+
+use strict;
+use warnings;
+
+my %conditions = (
+    1 => ['^(?!(Present|Valid)$)' => 'CRITICAL'],
+);
+
+sub check {
+    my ($self) = @_;
+
+    $self->{output}->output_add(long_msg => "Checking power supplies");
+    $self->{components}->{psu} = {name => 'psus', total => 0, skip => 0};
+    return if ($self->check_exclude(section => 'psu'));
+    
+    # SPS means = Standby Power Supply
+    
+    # Enclosure SPE Power A0 State: Present
+    # Enclosure SPE SPS A State:  Present
+    # Bus 0 Enclosure 0 Power A State: Present
+    while ($self->{response} =~ /^(?:Bus\s+(\d+)\s+){0,1}Enclosure\s+(\S+)\s+(Power|SPS)\s+(\S+)\s+State:\s+(.*)$/mgi) {
+        my ($state, $instance) = ($5, "$2.$3.$4");
+        if (defined($1)) {
+            $instance = "$1.$2.$3.$4";
+        }
+        
+        next if ($self->check_exclude(section => 'psu', instance => $instance));
+        $self->{components}->{psu}->{total}++;
+        
+        $self->{output}->output_add(long_msg => sprintf("Power Supply '%s' state is %s.",
+                                                        $instance, $state)
+                                    );
+        foreach (keys %conditions) {
+            if ($state =~ /${$conditions{$_}}[0]/i) {
+                $self->{output}->output_add(severity =>  ${$conditions{$_}}[1],
+                                            short_msg => sprintf("Power Supply '%s' state is %s",
+                                                        $instance, $state));
+                last;
+            }
+        }
+    }
+}
+
+1;
\ No newline at end of file
diff --git a/storage/emc/clariion/mode/spcomponents/sp.pm b/storage/emc/clariion/mode/spcomponents/sp.pm
new file mode 100644
index 000000000..1973075f3
--- /dev/null
+++ b/storage/emc/clariion/mode/spcomponents/sp.pm
@@ -0,0 +1,74 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package storage::emc::clariion::mode::spcomponents::sp;
+
+use strict;
+use warnings;
+
+my %conditions = (
+    1 => ['^(?!(Present|Valid)$)' => 'CRITICAL'],
+);
+
+sub check {
+    my ($self) = @_;
+
+    $self->{output}->output_add(long_msg => "Checking sp");
+    $self->{components}->{sp} = {name => 'sp', total => 0, skip => 0};
+    return if ($self->check_exclude(section => 'sp'));
+    
+    # SP A State:                 Present
+    while ($self->{response} =~ /^SP\s+(\S+)\s+State:\s+(.*)$/mgi) {
+        my $instance = $1;
+        my $state = $2;
+        
+        next if ($self->check_exclude(section => 'sp', instance => $instance));
+        $self->{components}->{sp}->{total}++;
+        
+        $self->{output}->output_add(long_msg => sprintf("sp '%s' state is %s.",
+                                                        $instance, $state)
+                                    );
+        foreach (keys %conditions) {
+            if ($state =~ /${$conditions{$_}}[0]/i) {
+                $self->{output}->output_add(severity =>  ${$conditions{$_}}[1],
+                                            short_msg => sprintf("sp '%s' state is %s",
+                                                        $instance, $state));
+                last;
+            }
+        }
+    }
+}
+
+1;
\ No newline at end of file
diff --git a/storage/emc/clariion/plugin.pm b/storage/emc/clariion/plugin.pm
index d6f5d7e6d..e0370177c 100644
--- a/storage/emc/clariion/plugin.pm
+++ b/storage/emc/clariion/plugin.pm
@@ -48,6 +48,8 @@ sub new {
 
     $self->{version} = '0.1';
     %{$self->{modes}} = (
+                         'cache'        => 'storage::emc::clariion::mode::cache',
+                         'sp'           => 'storage::emc::clariion::mode::sp',
                          'faults'       => 'storage::emc::clariion::mode::faults',
                          'list-luns'    => 'storage::emc::clariion::mode::listluns',
                          'sp-info'      => 'storage::emc::clariion::mode::spinfo',
diff --git a/storage/emc/recoverypoint/ssh/mode/monitoredparameters.pm b/storage/emc/recoverypoint/ssh/mode/monitoredparameters.pm
new file mode 100644
index 000000000..b0261bc79
--- /dev/null
+++ b/storage/emc/recoverypoint/ssh/mode/monitoredparameters.pm
@@ -0,0 +1,198 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package storage::emc::recoverypoint::ssh::mode::monitoredparameters;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+use centreon::plugins::misc;
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+                                { 
+                                  "hostname:s"        => { name => 'hostname' },
+                                  "ssh-option:s@"     => { name => 'ssh_option' },
+                                  "ssh-path:s"        => { name => 'ssh_path' },
+                                  "ssh-command:s"     => { name => 'ssh_command', default => 'ssh' },
+                                  "timeout:s"         => { name => 'timeout', default => 30 },
+                                  "sudo"              => { name => 'sudo' },
+                                  "command:s"         => { name => 'command', default => 'get_monitored_parameters' },
+                                  "command-path:s"    => { name => 'command_path' },
+                                  "command-options:s" => { name => 'command_options', default => '' },
+                                  "min-severity:s"    => { name => 'min_severity', default => 'minor' },
+                                  "warning:s"         => { name => 'warning' },
+                                  "critical:s"        => { name => 'critical' },
+                                });
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+    
+    if (!defined($self->{option_results}->{command})) {
+       $self->{output}->add_option_msg(short_msg => "Need to specify command option.");
+       $self->{output}->option_exit();
+    }
+
+    if (!defined($self->{option_results}->{hostname})) {
+       $self->{output}->add_option_msg(short_msg => "Need to specify hostname.");
+       $self->{output}->option_exit();
+    }
+
+    if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{option_results}->{warning})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'.");
+       $self->{output}->option_exit();
+    }
+    if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) {
+       $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'.");
+       $self->{output}->option_exit();
+    }
+    if ($self->{option_results}->{min_severity} !~ /^(minor|major|critical)$/) {
+        $self->{output}->add_option_msg(short_msg => 'Min-severity must be minor, major or critical.');
+        $self->{output}->option_exit();
+    } 
+}
+
+sub run {
+    my ($self, %options) = @_;
+
+    my $min_severity = ' min_severity=' . $self->{option_results}->{min_severity};
+    $self->{option_results}->{remote} = 1;
+
+    my ($stdout, $exit_code) = centreon::plugins::misc::execute(output => $self->{output},
+                                                                options => $self->{option_results},
+                                                                sudo => $self->{option_results}->{sudo},
+                                                                command => $self->{option_results}->{command},
+                                                                command_path => $self->{option_results}->{command_path},
+                                                                command_options => $self->{option_results}->{command_options} . $min_severity,
+                                                                );
+    my $long_msg = $stdout;
+    $long_msg =~ s/\|/~/mg;
+
+    my $count = 0;
+    foreach (split(/\n/, $stdout)) {
+        if (/^\s*Type:/im) {
+            $count++;
+        }
+    }    
+
+    $exit_code = $self->{perfdata}->threshold_check(value => $count, threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
+
+    $self->{output}->output_add(long_msg => $long_msg);
+    $self->{output}->output_add(severity => $exit_code, 
+                                short_msg => sprintf("%i problems found.",
+                                            $count));
+
+    $self->{output}->perfdata_add(label => "problems",
+                                  value => $count,
+                                  warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
+                                  critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'),
+                                  min => 0);
+
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check monitored paramaters by RecoveryPoint Appliance.
+
+=over 8
+
+=item B<--hostname>
+
+Hostname to query.
+
+=item B<--ssh-option>
+
+Specify multiple options like the user (example: --ssh-option='-l=centreon-engine' --ssh-option='-pw=password').
+
+=item B<--ssh-path>
+
+Specify ssh command path (default: none)
+
+=item B<--ssh-command>
+
+Specify ssh command (default: 'ssh'). Useful to use 'plink'.
+
+=item B<--timeout>
+
+Timeout in seconds for the command (Default: 30).
+
+=item B<--sudo>
+
+Use 'sudo' to execute the command.
+
+=item B<--command>
+
+Command to test (Default: get_monitored_parameters).
+You can use 'sh' to use '&&' or '||'.
+
+=item B<--command-path>
+
+Command path (Default: none).
+
+=item B<--command-options>
+
+Command options.
+
+=item B<--min-severity>
+
+Minimum severity level you want to count (Default: minor).
+Can be 'minor', 'major' or 'critical'.
+
+=item B<--warning>
+
+Threshold warning.
+
+=item B<--critical>
+
+Threshold critical.
+
+=back
+
+=cut
diff --git a/storage/emc/recoverypoint/ssh/mode/systemstatus.pm b/storage/emc/recoverypoint/ssh/mode/systemstatus.pm
new file mode 100644
index 000000000..266f201e5
--- /dev/null
+++ b/storage/emc/recoverypoint/ssh/mode/systemstatus.pm
@@ -0,0 +1,170 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package storage::emc::recoverypoint::ssh::mode::systemstatus;
+
+use base qw(centreon::plugins::mode);
+
+use strict;
+use warnings;
+use centreon::plugins::misc;
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    
+    $self->{version} = '1.0';
+    $options{options}->add_options(arguments =>
+                                { 
+                                  "hostname:s"        => { name => 'hostname' },
+                                  "ssh-option:s@"     => { name => 'ssh_option' },
+                                  "ssh-path:s"        => { name => 'ssh_path' },
+                                  "ssh-command:s"     => { name => 'ssh_command', default => 'ssh' },
+                                  "timeout:s"         => { name => 'timeout', default => 30 },
+                                  "sudo"              => { name => 'sudo' },
+                                  "command:s"         => { name => 'command', default => 'get_system_status' },
+                                  "command-path:s"    => { name => 'command_path' },
+                                  "command-options:s" => { name => 'command_options', default => 'category=system summary=yes' },
+                                });
+    return $self;
+}
+
+sub check_options {
+    my ($self, %options) = @_;
+    $self->SUPER::init(%options);
+
+    if (!defined($self->{option_results}->{hostname})) {
+       $self->{output}->add_option_msg(short_msg => "Need to specify hostname.");
+       $self->{output}->option_exit();
+    }
+    
+    if (!defined($self->{option_results}->{command})) {
+       $self->{output}->add_option_msg(short_msg => "Need to specify command option.");
+       $self->{output}->option_exit();
+    }
+}
+
+sub run {
+    my ($self, %options) = @_;
+
+    $self->{option_results}->{remote} = 1;
+
+    my ($stdout, $exit_code) = centreon::plugins::misc::execute(output => $self->{output},
+                                                                options => $self->{option_results},
+                                                                sudo => $self->{option_results}->{sudo},
+                                                                command => $self->{option_results}->{command},
+                                                                command_path => $self->{option_results}->{command_path},
+                                                                command_options => $self->{option_results}->{command_options},
+                                                                );
+    my $long_msg = $stdout;
+    $long_msg =~ s/\|/~/mg;
+
+    my ($system, $clusters, $wans, $groups);
+    foreach (split(/\n/, $stdout)) {
+        if (/^System:\s+(.*)$/i) {
+            $system = $1;
+        } elsif (/^Clusters:\s+(.*)$/i) {
+            $clusters = $1;
+        } elsif (/^Wans:\s+(.*)$/i) {
+            $wans = $1;
+        } elsif (/^Groups:\s+(.*)$/i) {
+            $groups = $1;
+        }
+    }    
+
+    $exit_code = 'ok';
+    if (($system !~ /OK/im) || ($clusters !~ /OK/im) || ($wans !~ /OK/im) || ($groups !~ /OK/im)) {
+        $exit_code = 'critical'
+    }
+
+    $self->{output}->output_add(long_msg => $long_msg);
+    $self->{output}->output_add(severity => $exit_code, 
+                                short_msg => sprintf("System %s, Clusters %s, WANs %s, Groups %s.",
+                                            $system, $clusters, $wans, $groups));
+    $self->{output}->display();
+    $self->{output}->exit();
+}
+
+1;
+
+__END__
+
+=head1 MODE
+
+Check system status.
+
+=over 8
+
+=item B<--hostname>
+
+Hostname to query.
+
+=item B<--ssh-option>
+
+Specify multiple options like the user (example: --ssh-option='-l=centreon-engine' --ssh-option='-pw=password').
+
+=item B<--ssh-path>
+
+Specify ssh command path (default: none)
+
+=item B<--ssh-command>
+
+Specify ssh command (default: 'ssh'). Useful to use 'plink'.
+
+=item B<--timeout>
+
+Timeout in seconds for the command (Default: 30).
+
+=item B<--sudo>
+
+Use 'sudo' to execute the command.
+
+=item B<--command>
+
+Command to test (Default: get_system_status).
+You can use 'sh' to use '&&' or '||'.
+
+=item B<--command-path>
+
+Command path (Default: none).
+
+=item B<--command-options>
+
+Command options (Default: category=system summary=yes).
+
+=back
+
+=cut
diff --git a/storage/emc/recoverypoint/ssh/plugin.pm b/storage/emc/recoverypoint/ssh/plugin.pm
new file mode 100644
index 000000000..4f721b889
--- /dev/null
+++ b/storage/emc/recoverypoint/ssh/plugin.pm
@@ -0,0 +1,65 @@
+################################################################################
+# Copyright 2005-2013 MERETHIS
+# Centreon is developped by : Julien Mathis and Romain Le Merlus under
+# GPL Licence 2.0.
+# 
+# This program is free software; you can redistribute it and/or modify it under 
+# the terms of the GNU General Public License as published by the Free Software 
+# Foundation ; either version 2 of the License.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along with 
+# this program; if not, see .
+# 
+# Linking this program statically or dynamically with other modules is making a 
+# combined work based on this program. Thus, the terms and conditions of the GNU 
+# General Public License cover the whole combination.
+# 
+# As a special exception, the copyright holders of this program give MERETHIS 
+# permission to link this program with independent modules to produce an executable, 
+# regardless of the license terms of these independent modules, and to copy and 
+# distribute the resulting executable under terms of MERETHIS choice, provided that 
+# MERETHIS also meet, for each linked independent module, the terms  and conditions 
+# of the license of that module. An independent module is a module which is not 
+# derived from this program. If you modify this program, you may extend this 
+# exception to your version of the program, but you are not obliged to do so. If you
+# do not wish to do so, delete this exception statement from your version.
+# 
+# For more information : contact@centreon.com
+# Authors : Quentin Garnier 
+#
+####################################################################################
+
+package storage::emc::recoverypoint::ssh::plugin;
+
+use strict;
+use warnings;
+use base qw(centreon::plugins::script_simple);
+
+sub new {
+    my ($class, %options) = @_;
+    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
+    bless $self, $class;
+    # $options->{options} = options object
+
+    $self->{version} = '0.1';
+    %{$self->{modes}} = (
+                         'system-status'        => 'storage::emc::recoverypoint::ssh::mode::systemstatus',
+                         'monitored-parameters' => 'storage::emc::recoverypoint::ssh::mode::monitoredparameters',
+                         );
+
+    return $self;
+}
+
+1;
+
+__END__
+
+=head1 PLUGIN DESCRIPTION
+
+Check EMC RecoveryPoint Appliance through SSH commands.
+
+=cut
diff --git a/storage/ibm/TS3100/mode/globalstatus.pm b/storage/ibm/TS3100/mode/globalstatus.pm
index 19e77619d..97e367a44 100644
--- a/storage/ibm/TS3100/mode/globalstatus.pm
+++ b/storage/ibm/TS3100/mode/globalstatus.pm
@@ -42,7 +42,7 @@ use warnings;
 
 my %states = (
     1 => ['other', 'WARNING'], 
-    2 => ['unknown', 'UNKNOWN'], 
+    2 => ['unknown', 'WARNING'], 
     3 => ['ok', 'OK'], 
     4 => ['non critical', 'WARNING'],
     5 => ['critical', 'CRITICAL'],
@@ -57,16 +57,47 @@ sub new {
     $self->{version} = '1.0';
     $options{options}->add_options(arguments =>
                                 {
+                                "threshold-overload:s@"     => { name => 'threshold_overload' },
                                 });
 
     return $self;
 }
 
+sub check_treshold_overload {
+    my ($self, %options) = @_;
+    
+    $self->{overload_th} = {};
+    foreach my $val (@{$self->{option_results}->{threshold_overload}}) {
+        if ($val !~ /(.*?)=(.*)/) {
+            $self->{output}->add_option_msg(short_msg => "Wrong treshold-overload option '" . $val . "'.");
+            $self->{output}->option_exit();
+        }
+        my ($filter, $threshold) = ($1, $2);
+        if ($self->{output}->is_litteral_status(status => $threshold) == 0) {
+            $self->{output}->add_option_msg(short_msg => "Wrong treshold-overload status '" . $val . "'.");
+            $self->{output}->option_exit();
+        }
+        $self->{overload_th}->{$filter} = $threshold;
+    }
+}
+
 sub check_options {
     my ($self, %options) = @_;
     $self->SUPER::init(%options);
 }
 
+sub get_severity {
+    my ($self, %options) = @_;
+    my $status = ${$states{$options{value}}}[1];
+    
+    foreach (keys %{$self->{overload_th}}) {
+        if (${$states{$options{value}}}[0] =~ /$_/) {
+            $status = $self->{overload_th}->{$_};
+        }
+    }
+    return $status;
+}
+
 sub run {
     my ($self, %options) = @_;
     # $options{snmp} = snmp object
@@ -75,7 +106,7 @@ sub run {
     my $oid_ibm3100StatusGlobalStatus = '.1.3.6.1.4.1.2.6.210.2.1.0';
     my $result = $self->{snmp}->get_leef(oids => [$oid_ibm3100StatusGlobalStatus], nothing_quit => 1);
     
-    $self->{output}->output_add(severity =>  ${$states{$result->{$oid_ibm3100StatusGlobalStatus}}}[1],
+    $self->{output}->output_add(severity => $self->get_severity(value => $result->{$oid_ibm3100StatusGlobalStatus}),
                                 short_msg => sprintf("Overall global status is '%s'.", 
                                                 ${$states{$result->{$oid_ibm3100StatusGlobalStatus}}}[0]));
 
@@ -93,6 +124,11 @@ Check the overall status of the appliance.
 
 =over 8
 
+=item B<--threshold-overload>
+
+Set to overload default threshold value.
+Example: --threshold-overload='(unknown|non critical)=critical'
+
 =back
 
 =cut
diff --git a/storage/ibm/TS3200/mode/globalstatus.pm b/storage/ibm/TS3200/mode/globalstatus.pm
index cb9904050..8a6c0c0a1 100644
--- a/storage/ibm/TS3200/mode/globalstatus.pm
+++ b/storage/ibm/TS3200/mode/globalstatus.pm
@@ -42,7 +42,7 @@ use warnings;
 
 my %states = (
     1 => ['other', 'WARNING'], 
-    2 => ['unknown', 'UNKNOWN'], 
+    2 => ['unknown', 'WARNING'], 
     3 => ['ok', 'OK'], 
     4 => ['non critical', 'WARNING'],
     5 => ['critical', 'CRITICAL'],
@@ -57,16 +57,47 @@ sub new {
     $self->{version} = '1.0';
     $options{options}->add_options(arguments =>
                                 {
+                                "threshold-overload:s@"     => { name => 'threshold_overload' },
                                 });
 
     return $self;
 }
 
+sub check_treshold_overload {
+    my ($self, %options) = @_;
+    
+    $self->{overload_th} = {};
+    foreach my $val (@{$self->{option_results}->{threshold_overload}}) {
+        if ($val !~ /(.*?)=(.*)/) {
+            $self->{output}->add_option_msg(short_msg => "Wrong treshold-overload option '" . $val . "'.");
+            $self->{output}->option_exit();
+        }
+        my ($filter, $threshold) = ($1, $2);
+        if ($self->{output}->is_litteral_status(status => $threshold) == 0) {
+            $self->{output}->add_option_msg(short_msg => "Wrong treshold-overload status '" . $val . "'.");
+            $self->{output}->option_exit();
+        }
+        $self->{overload_th}->{$filter} = $threshold;
+    }
+}
+
 sub check_options {
     my ($self, %options) = @_;
     $self->SUPER::init(%options);
 }
 
+sub get_severity {
+    my ($self, %options) = @_;
+    my $status = ${$states{$options{value}}}[1];
+    
+    foreach (keys %{$self->{overload_th}}) {
+        if (${$states{$options{value}}}[0] =~ /$_/) {
+            $status = $self->{overload_th}->{$_};
+        }
+    }
+    return $status;
+}
+
 sub run {
     my ($self, %options) = @_;
     # $options{snmp} = snmp object
@@ -75,7 +106,7 @@ sub run {
     my $oid_ibm3200StatusGlobalStatus = '.1.3.6.1.4.1.2.6.211.2.1.0';
     my $result = $self->{snmp}->get_leef(oids => [$oid_ibm3200StatusGlobalStatus], nothing_quit => 1);
     
-    $self->{output}->output_add(severity =>  ${$states{$result->{$oid_ibm3200StatusGlobalStatus}}}[1],
+    $self->{output}->output_add(severity => $self->get_severity(value => $result->{$oid_ibm3200StatusGlobalStatus}),
                                 short_msg => sprintf("Overall global status is '%s'.", 
                                                 ${$states{$result->{$oid_ibm3200StatusGlobalStatus}}}[0]));
 
@@ -93,6 +124,11 @@ Check the overall status of the appliance.
 
 =over 8
 
+=item B<--threshold-overload>
+
+Set to overload default threshold value.
+Example: --threshold-overload='(unknown|non critical)=critical'
+
 =back
 
 =cut
diff --git a/storage/netapp/mode/listfilesys.pm b/storage/netapp/mode/listfilesys.pm
index 67a2955f9..aa110378d 100644
--- a/storage/netapp/mode/listfilesys.pm
+++ b/storage/netapp/mode/listfilesys.pm
@@ -92,14 +92,21 @@ sub manage_selection {
             next;
         }
         
-        if (!defined($self->{option_results}->{use_regexp}) && $self->{result_names}->{$oid} eq $self->{option_results}->{name}) {
-            next if (defined($self->{option_results}->{type}) && $type !~ /$self->{option_results}->{type}/i);
-            push @{$self->{filesys_id_selected}}, $instance; 
+        if (defined($self->{option_results}->{type}) && $type !~ /$self->{option_results}->{type}/i) {
+            $self->{output}->output_add(long_msg => "Skipping filesys '" . $self->{result_names}->{$oid} . "': no matching filter type");
+            next;
         }
-        if (defined($self->{option_results}->{use_regexp}) && $self->{result_names}->{$oid} =~ /$self->{option_results}->{name}/) {
-            next if (defined($self->{option_results}->{type}) && $type !~ /$self->{option_results}->{type}/i);
-            push @{$self->{filesys_id_selected}}, $instance;
+
+        if (!defined($self->{option_results}->{use_regexp}) && $self->{result_names}->{$oid} ne $self->{option_results}->{name}) {
+            $self->{output}->output_add(long_msg => "Skipping filesys '" . $self->{result_names}->{$oid} . "': no matching filter name");
+            next;
         }
+        if (defined($self->{option_results}->{use_regexp}) && $self->{result_names}->{$oid} !~ /$self->{option_results}->{name}/) {
+            $self->{output}->output_add(long_msg => "Skipping filesys '" . $self->{result_names}->{$oid} . "': no matching filter name (regexp)");
+            next;
+        }
+        
+        push @{$self->{filesys_id_selected}}, $instance;
     }
 }
 
@@ -121,8 +128,7 @@ sub run {
 
     $self->manage_selection();
     my $result = $self->get_additional_information();
-    my $filesys_display = '';
-    my $filesys_display_append = '';
+
     foreach my $instance (sort @{$self->{filesys_id_selected}}) { 
         my $name = $self->{result_names}->{$oid_dfFileSys . '.' . $instance};
         my $type = $self->{result_types}->{$oid_dfType . '.' . $instance};
@@ -130,15 +136,17 @@ sub run {
         if (defined($result->{$oid_df64TotalKBytes . '.' . $instance}) && $result->{$oid_df64TotalKBytes . '.' . $instance} != 0) {
             $total_size = $result->{$oid_df64TotalKBytes . '.' . $instance} * 1024;
         }
-        next if (defined($self->{option_results}->{skip_total_zero}) && $total_size == 0);
+        if (defined($self->{option_results}->{skip_total_zero}) && $total_size == 0) {
+            $self->{output}->output_add(long_msg => "Skipping filesys '" . $name . "': total size is 0 and option --skip-total-zero is set");
+            next;
+        }
 
-        $filesys_display .= $filesys_display_append . "name = $name [total_size = $total_size B, type = " . $map_types{$type} . "]";
-        $filesys_display_append = ', ';
+        $self->{output}->output_add(long_msg => "'" . $name . "' [total_size = $total_size B] [type = " . $map_types{$type} . "]");
     }
     
     $self->{output}->output_add(severity => 'OK',
-                                short_msg => 'List filesys: ' . $filesys_display);
-    $self->{output}->display(nolabel => 1);
+                                short_msg => 'List filesys:');
+    $self->{output}->display(nolabel => 1, force_ignore_perfdata => 1, force_long_output => 1);
     $self->{output}->exit();
 }