From 6d3ce909a839e220762169eb74a4f41e912810f8 Mon Sep 17 00:00:00 2001 From: garnier-quentin Date: Thu, 17 Dec 2020 11:09:53 +0100 Subject: [PATCH] move microsoft applications --- .../activedirectory/local/conf/dcdiag.xml | 0 .../activedirectory/local/mode/dcdiag.pm | 2 +- .../activedirectory/local/mode/dfsrbacklog.pm | 0 .../activedirectory/local/mode/netdom.pm | 15 +++---- .../activedirectory/local/plugin.pm | 12 ++--- .../activedirectory/wsman/conf/dcdiag.xml | 0 .../activedirectory/wsman/mode/dcdiag.pm | 18 ++++---- .../activedirectory/wsman/plugin.pm | 4 +- .../2010/local/mode/activesyncmailbox.pm | 2 +- .../exchange/2010/local/mode/databases.pm | 4 +- .../exchange/2010/local/mode/imapmailbox.pm | 4 +- .../exchange/2010/local/mode/listdatabases.pm | 4 +- .../exchange/2010/local/mode/mapimailbox.pm | 4 +- .../2010/local/mode/outlookwebservices.pm | 4 +- .../exchange/2010/local/mode/owamailbox.pm | 4 +- .../exchange/2010/local/mode/queues.pm | 4 +- .../2010/local/mode/replicationhealth.pm | 4 +- .../2010/local/mode/resources/types.pm | 2 +- .../exchange/2010/local/mode/services.pm | 4 +- .../exchange/2010/local/plugin.pm | 22 ++++----- .../hyperv/2012/local/mode/listnodevms.pm | 4 +- .../2012/local/mode/nodeintegrationservice.pm | 4 +- .../hyperv/2012/local/mode/nodereplication.pm | 4 +- .../hyperv/2012/local/mode/nodesnapshot.pm | 4 +- .../hyperv/2012/local/mode/nodevmstatus.pm | 4 +- .../hyperv/2012/local/mode/resources/types.pm | 2 +- .../local/mode/scvmmintegrationservice.pm | 4 +- .../hyperv/2012/local/mode/scvmmsnapshot.pm | 4 +- .../hyperv/2012/local/mode/scvmmvmstatus.pm | 4 +- .../hyperv/2012/local/plugin.pm | 22 ++++----- .../iis/local/mode/applicationpoolstate.pm | 2 +- .../iis/local/mode/listapplicationpools.pm | 2 +- .../iis/local/mode/listsites.pm | 2 +- .../iis/local/mode/webservicestatistics.pm | 2 +- apps/{ => microsoft}/iis/local/plugin.pm | 10 ++--- .../{ => microsoft}/iis/restapi/custom/api.pm | 2 +- .../iis/restapi/mode/applicationpools.pm | 2 +- .../iis/restapi/mode/listapplicationpools.pm | 2 +- .../iis/restapi/mode/listwebsites.pm | 2 +- .../iis/restapi/mode/websites.pm | 2 +- apps/{ => microsoft}/iis/restapi/plugin.pm | 12 ++--- .../iis/wsman/mode/applicationpoolstate.pm | 20 ++++----- .../iis/wsman/mode/listapplicationpools.pm | 4 +- apps/{ => microsoft}/iis/wsman/plugin.pm | 10 ++--- .../mscs/local/mode/listnodes.pm | 12 ++--- .../mscs/local/mode/listresources.pm | 12 ++--- .../mscs/local/mode/networkstatus.pm | 41 ++++++----------- .../mscs/local/mode/nodestatus.pm | 45 +++++++------------ .../mscs/local/mode/resourcegroupstatus.pm | 2 +- .../mscs/local/mode/resourcestatus.pm | 45 ++++++------------- .../mscs/local/plugin.pm | 18 ++++---- .../local/mode/databasereplicationstatus.pm | 4 +- .../sccm/local/mode/sitestatus.pm | 2 +- apps/{ => microsoft}/sccm/local/plugin.pm | 10 ++--- .../wsus/local/mode/computersstatus.pm | 7 +-- .../wsus/local/mode/serverstatistics.pm | 7 +-- .../wsus/local/mode/synchronisationstatus.pm | 4 +- .../wsus/local/mode/updatesstatus.pm | 9 +--- apps/{ => microsoft}/wsus/local/plugin.pm | 14 +++--- 59 files changed, 206 insertions(+), 269 deletions(-) rename apps/{ => microsoft}/activedirectory/local/conf/dcdiag.xml (100%) rename apps/{ => microsoft}/activedirectory/local/mode/dcdiag.pm (99%) rename apps/{ => microsoft}/activedirectory/local/mode/dfsrbacklog.pm (100%) rename apps/{ => microsoft}/activedirectory/local/mode/netdom.pm (87%) rename apps/{ => microsoft}/activedirectory/local/plugin.pm (76%) rename apps/{ => microsoft}/activedirectory/wsman/conf/dcdiag.xml (100%) rename apps/{ => microsoft}/activedirectory/wsman/mode/dcdiag.pm (94%) rename apps/{ => microsoft}/activedirectory/wsman/plugin.pm (89%) rename apps/{ => microsoft}/exchange/2010/local/mode/activesyncmailbox.pm (98%) rename apps/{ => microsoft}/exchange/2010/local/mode/databases.pm (98%) rename apps/{ => microsoft}/exchange/2010/local/mode/imapmailbox.pm (98%) rename apps/{ => microsoft}/exchange/2010/local/mode/listdatabases.pm (98%) rename apps/{ => microsoft}/exchange/2010/local/mode/mapimailbox.pm (97%) rename apps/{ => microsoft}/exchange/2010/local/mode/outlookwebservices.pm (97%) rename apps/{ => microsoft}/exchange/2010/local/mode/owamailbox.pm (98%) rename apps/{ => microsoft}/exchange/2010/local/mode/queues.pm (97%) rename apps/{ => microsoft}/exchange/2010/local/mode/replicationhealth.pm (98%) rename apps/{ => microsoft}/exchange/2010/local/mode/resources/types.pm (97%) rename apps/{ => microsoft}/exchange/2010/local/mode/services.pm (98%) rename apps/{ => microsoft}/exchange/2010/local/plugin.pm (52%) rename apps/{ => microsoft}/hyperv/2012/local/mode/listnodevms.pm (97%) rename apps/{ => microsoft}/hyperv/2012/local/mode/nodeintegrationservice.pm (98%) rename apps/{ => microsoft}/hyperv/2012/local/mode/nodereplication.pm (97%) rename apps/{ => microsoft}/hyperv/2012/local/mode/nodesnapshot.pm (98%) rename apps/{ => microsoft}/hyperv/2012/local/mode/nodevmstatus.pm (98%) rename apps/{ => microsoft}/hyperv/2012/local/mode/resources/types.pm (98%) rename apps/{ => microsoft}/hyperv/2012/local/mode/scvmmintegrationservice.pm (98%) rename apps/{ => microsoft}/hyperv/2012/local/mode/scvmmsnapshot.pm (98%) rename apps/{ => microsoft}/hyperv/2012/local/mode/scvmmvmstatus.pm (98%) rename apps/{ => microsoft}/hyperv/2012/local/plugin.pm (55%) rename apps/{ => microsoft}/iis/local/mode/applicationpoolstate.pm (98%) rename apps/{ => microsoft}/iis/local/mode/listapplicationpools.pm (98%) rename apps/{ => microsoft}/iis/local/mode/listsites.pm (98%) rename apps/{ => microsoft}/iis/local/mode/webservicestatistics.pm (99%) rename apps/{ => microsoft}/iis/local/plugin.pm (73%) rename apps/{ => microsoft}/iis/restapi/custom/api.pm (99%) rename apps/{ => microsoft}/iis/restapi/mode/applicationpools.pm (98%) rename apps/{ => microsoft}/iis/restapi/mode/listapplicationpools.pm (97%) rename apps/{ => microsoft}/iis/restapi/mode/listwebsites.pm (97%) rename apps/{ => microsoft}/iis/restapi/mode/websites.pm (99%) rename apps/{ => microsoft}/iis/restapi/plugin.pm (69%) rename apps/{ => microsoft}/iis/wsman/mode/applicationpoolstate.pm (92%) rename apps/{ => microsoft}/iis/wsman/mode/listapplicationpools.pm (98%) rename apps/{ => microsoft}/iis/wsman/plugin.pm (81%) rename apps/{cluster => microsoft}/mscs/local/mode/listnodes.pm (92%) rename apps/{cluster => microsoft}/mscs/local/mode/listresources.pm (94%) rename apps/{cluster => microsoft}/mscs/local/mode/networkstatus.pm (74%) rename apps/{cluster => microsoft}/mscs/local/mode/nodestatus.pm (72%) rename apps/{cluster => microsoft}/mscs/local/mode/resourcegroupstatus.pm (99%) rename apps/{cluster => microsoft}/mscs/local/mode/resourcestatus.pm (72%) rename apps/{cluster => microsoft}/mscs/local/plugin.pm (64%) rename apps/{ => microsoft}/sccm/local/mode/databasereplicationstatus.pm (99%) rename apps/{ => microsoft}/sccm/local/mode/sitestatus.pm (99%) rename apps/{ => microsoft}/sccm/local/plugin.pm (80%) rename apps/{ => microsoft}/wsus/local/mode/computersstatus.pm (97%) rename apps/{ => microsoft}/wsus/local/mode/serverstatistics.pm (98%) rename apps/{ => microsoft}/wsus/local/mode/synchronisationstatus.pm (99%) rename apps/{ => microsoft}/wsus/local/mode/updatesstatus.pm (97%) rename apps/{ => microsoft}/wsus/local/plugin.pm (71%) diff --git a/apps/activedirectory/local/conf/dcdiag.xml b/apps/microsoft/activedirectory/local/conf/dcdiag.xml similarity index 100% rename from apps/activedirectory/local/conf/dcdiag.xml rename to apps/microsoft/activedirectory/local/conf/dcdiag.xml diff --git a/apps/activedirectory/local/mode/dcdiag.pm b/apps/microsoft/activedirectory/local/mode/dcdiag.pm similarity index 99% rename from apps/activedirectory/local/mode/dcdiag.pm rename to apps/microsoft/activedirectory/local/mode/dcdiag.pm index 855741443..59f45126b 100644 --- a/apps/activedirectory/local/mode/dcdiag.pm +++ b/apps/microsoft/activedirectory/local/mode/dcdiag.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::activedirectory::local::mode::dcdiag; +package apps::microsoft::activedirectory::local::mode::dcdiag; use base qw(centreon::plugins::mode); diff --git a/apps/activedirectory/local/mode/dfsrbacklog.pm b/apps/microsoft/activedirectory/local/mode/dfsrbacklog.pm similarity index 100% rename from apps/activedirectory/local/mode/dfsrbacklog.pm rename to apps/microsoft/activedirectory/local/mode/dfsrbacklog.pm diff --git a/apps/activedirectory/local/mode/netdom.pm b/apps/microsoft/activedirectory/local/mode/netdom.pm similarity index 87% rename from apps/activedirectory/local/mode/netdom.pm rename to apps/microsoft/activedirectory/local/mode/netdom.pm index 6bd07ebfa..7e368ee6a 100644 --- a/apps/activedirectory/local/mode/netdom.pm +++ b/apps/microsoft/activedirectory/local/mode/netdom.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::activedirectory::local::mode::netdom; +package apps::microsoft::activedirectory::local::mode::netdom; use base qw(centreon::plugins::mode); @@ -32,12 +32,11 @@ sub new { my $self = $class->SUPER::new(package => __PACKAGE__, %options); bless $self, $class; - $options{options}->add_options(arguments => - { - "domain:s" => { name => 'domain', }, - "workstation:s" => { name => 'workstation' }, - "timeout:s" => { name => 'timeout', default => 30 }, - }); + $options{options}->add_options(arguments => { + 'domain:s' => { name => 'domain' }, + 'workstation:s' => { name => 'workstation' }, + 'timeout:s' => { name => 'timeout', default => 30 } + }); return $self; } @@ -106,4 +105,4 @@ Set timeout time for command execution (Default: 30 sec) =back -=cut \ No newline at end of file +=cut diff --git a/apps/activedirectory/local/plugin.pm b/apps/microsoft/activedirectory/local/plugin.pm similarity index 76% rename from apps/activedirectory/local/plugin.pm rename to apps/microsoft/activedirectory/local/plugin.pm index a8279bbd2..8497ea91f 100644 --- a/apps/activedirectory/local/plugin.pm +++ b/apps/microsoft/activedirectory/local/plugin.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::activedirectory::local::plugin; +package apps::microsoft::activedirectory::local::plugin; use strict; use warnings; @@ -30,11 +30,11 @@ sub new { bless $self, $class; $self->{version} = '0.1'; - %{$self->{modes}} = ( - 'dcdiag' => 'apps::activedirectory::local::mode::dcdiag', - 'dfsr-backlog' => 'apps::activedirectory::local::mode::dfsrbacklog', - 'netdom' => 'apps::activedirectory::local::mode::netdom', - ); + $self->{modes} = { + 'dcdiag' => 'apps::microsoft::activedirectory::local::mode::dcdiag', + 'dfsr-backlog' => 'apps::microsoft::activedirectory::local::mode::dfsrbacklog', + 'netdom' => 'apps::microsoft::activedirectory::local::mode::netdom' + }; return $self; } diff --git a/apps/activedirectory/wsman/conf/dcdiag.xml b/apps/microsoft/activedirectory/wsman/conf/dcdiag.xml similarity index 100% rename from apps/activedirectory/wsman/conf/dcdiag.xml rename to apps/microsoft/activedirectory/wsman/conf/dcdiag.xml diff --git a/apps/activedirectory/wsman/mode/dcdiag.pm b/apps/microsoft/activedirectory/wsman/mode/dcdiag.pm similarity index 94% rename from apps/activedirectory/wsman/mode/dcdiag.pm rename to apps/microsoft/activedirectory/wsman/mode/dcdiag.pm index b6e2d386f..746350c14 100644 --- a/apps/activedirectory/wsman/mode/dcdiag.pm +++ b/apps/microsoft/activedirectory/wsman/mode/dcdiag.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::activedirectory::wsman::mode::dcdiag; +package apps::microsoft::activedirectory::wsman::mode::dcdiag; use base qw(centreon::plugins::mode); @@ -32,13 +32,13 @@ sub new { my $self = $class->SUPER::new(package => __PACKAGE__, %options); bless $self, $class; - $options{options}->add_options(arguments => - { - "config:s" => { name => 'config', }, - "language:s" => { name => 'language', default => 'en' }, - "dfsr" => { name => 'dfsr', }, - "noeventlog" => { name => 'noeventlog', }, - }); + $options{options}->add_options(arguments => { + "config:s" => { name => 'config' }, + "language:s" => { name => 'language', default => 'en' }, + "dfsr" => { name => 'dfsr' }, + "noeventlog" => { name => 'noeventlog' } + }); + $self->{os_is2003} = 0; $self->{os_is2008} = 0; $self->{os_is2012} = 0; @@ -228,4 +228,4 @@ Don't run the dc tests kccevent, frsevent and dfsrevent =back -=cut \ No newline at end of file +=cut diff --git a/apps/activedirectory/wsman/plugin.pm b/apps/microsoft/activedirectory/wsman/plugin.pm similarity index 89% rename from apps/activedirectory/wsman/plugin.pm rename to apps/microsoft/activedirectory/wsman/plugin.pm index 5d06df85e..1a556f80a 100644 --- a/apps/activedirectory/wsman/plugin.pm +++ b/apps/microsoft/activedirectory/wsman/plugin.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::activedirectory::wsman::plugin; +package apps::microsoft::activedirectory::wsman::plugin; use strict; use warnings; @@ -31,7 +31,7 @@ sub new { $self->{version} = '0.1'; %{$self->{modes}} = ( - 'dcdiag' => 'apps::activedirectory::wsman::mode::dcdiag', + 'dcdiag' => 'apps::microsoft::activedirectory::wsman::mode::dcdiag', ); return $self; diff --git a/apps/exchange/2010/local/mode/activesyncmailbox.pm b/apps/microsoft/exchange/2010/local/mode/activesyncmailbox.pm similarity index 98% rename from apps/exchange/2010/local/mode/activesyncmailbox.pm rename to apps/microsoft/exchange/2010/local/mode/activesyncmailbox.pm index e7e4824da..c1f42edf8 100644 --- a/apps/exchange/2010/local/mode/activesyncmailbox.pm +++ b/apps/microsoft/exchange/2010/local/mode/activesyncmailbox.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::exchange::2010::local::mode::activesyncmailbox; +package apps::microsoft::exchange::2010::local::mode::activesyncmailbox; use base qw(centreon::plugins::mode); diff --git a/apps/exchange/2010/local/mode/databases.pm b/apps/microsoft/exchange/2010/local/mode/databases.pm similarity index 98% rename from apps/exchange/2010/local/mode/databases.pm rename to apps/microsoft/exchange/2010/local/mode/databases.pm index 638ac08bf..588838e46 100644 --- a/apps/exchange/2010/local/mode/databases.pm +++ b/apps/microsoft/exchange/2010/local/mode/databases.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::exchange::2010::local::mode::databases; +package apps::microsoft::exchange::2010::local::mode::databases; use base qw(centreon::plugins::templates::counter); @@ -27,7 +27,7 @@ use warnings; use centreon::plugins::misc; use centreon::plugins::templates::catalog_functions qw(catalog_status_threshold_ng); use centreon::common::powershell::exchange::2010::databases; -use apps::exchange::2010::local::mode::resources::types qw($copystatus_contentindexstate); +use apps::microsoft::exchange::2010::local::mode::resources::types qw($copystatus_contentindexstate); use JSON::XS; sub custom_mailflow_latency_perfdata { diff --git a/apps/exchange/2010/local/mode/imapmailbox.pm b/apps/microsoft/exchange/2010/local/mode/imapmailbox.pm similarity index 98% rename from apps/exchange/2010/local/mode/imapmailbox.pm rename to apps/microsoft/exchange/2010/local/mode/imapmailbox.pm index c5107d430..de557a894 100644 --- a/apps/exchange/2010/local/mode/imapmailbox.pm +++ b/apps/microsoft/exchange/2010/local/mode/imapmailbox.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::exchange::2010::local::mode::imapmailbox; +package apps::microsoft::exchange::2010::local::mode::imapmailbox; use base qw(centreon::plugins::mode); @@ -46,7 +46,7 @@ sub new { 'warning:s' => { name => 'warning' }, 'critical:s' => { name => 'critical', default => '%{result} !~ /Success/i' }, 'mailbox:s' => { name => 'mailbox' }, - 'password:s' => { name => 'password' }, + 'password:s' => { name => 'password' } }); return $self; diff --git a/apps/exchange/2010/local/mode/listdatabases.pm b/apps/microsoft/exchange/2010/local/mode/listdatabases.pm similarity index 98% rename from apps/exchange/2010/local/mode/listdatabases.pm rename to apps/microsoft/exchange/2010/local/mode/listdatabases.pm index bc64ab038..3d186148d 100644 --- a/apps/exchange/2010/local/mode/listdatabases.pm +++ b/apps/microsoft/exchange/2010/local/mode/listdatabases.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::exchange::2010::local::mode::listdatabases; +package apps::microsoft::exchange::2010::local::mode::listdatabases; use base qw(centreon::plugins::mode); @@ -42,7 +42,7 @@ sub new { '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-filter:s' => { name => 'ps_database_filter' } }); return $self; diff --git a/apps/exchange/2010/local/mode/mapimailbox.pm b/apps/microsoft/exchange/2010/local/mode/mapimailbox.pm similarity index 97% rename from apps/exchange/2010/local/mode/mapimailbox.pm rename to apps/microsoft/exchange/2010/local/mode/mapimailbox.pm index 940cda22e..501eb12d1 100644 --- a/apps/exchange/2010/local/mode/mapimailbox.pm +++ b/apps/microsoft/exchange/2010/local/mode/mapimailbox.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::exchange::2010::local::mode::mapimailbox; +package apps::microsoft::exchange::2010::local::mode::mapimailbox; use base qw(centreon::plugins::mode); @@ -45,7 +45,7 @@ sub new { 'ps-display' => { name => 'ps_display' }, 'warning:s' => { name => 'warning' }, 'critical:s' => { name => 'critical', default => '%{result} !~ /Success/i' }, - 'mailbox:s' => { name => 'mailbox' }, + 'mailbox:s' => { name => 'mailbox' } }); return $self; diff --git a/apps/exchange/2010/local/mode/outlookwebservices.pm b/apps/microsoft/exchange/2010/local/mode/outlookwebservices.pm similarity index 97% rename from apps/exchange/2010/local/mode/outlookwebservices.pm rename to apps/microsoft/exchange/2010/local/mode/outlookwebservices.pm index 2d01a33e5..e474eac07 100644 --- a/apps/exchange/2010/local/mode/outlookwebservices.pm +++ b/apps/microsoft/exchange/2010/local/mode/outlookwebservices.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::exchange::2010::local::mode::outlookwebservices; +package apps::microsoft::exchange::2010::local::mode::outlookwebservices; use base qw(centreon::plugins::mode); @@ -46,7 +46,7 @@ sub new { 'warning:s' => { name => 'warning', }, 'critical:s' => { name => 'critical', default => '%{type} !~ /Success|Information/i' }, 'mailbox:s' => { name => 'mailbox' }, - 'password:s' => { name => 'password' }, + 'password:s' => { name => 'password' } }); return $self; diff --git a/apps/exchange/2010/local/mode/owamailbox.pm b/apps/microsoft/exchange/2010/local/mode/owamailbox.pm similarity index 98% rename from apps/exchange/2010/local/mode/owamailbox.pm rename to apps/microsoft/exchange/2010/local/mode/owamailbox.pm index 3f63b80a7..fd2708263 100644 --- a/apps/exchange/2010/local/mode/owamailbox.pm +++ b/apps/microsoft/exchange/2010/local/mode/owamailbox.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::exchange::2010::local::mode::owamailbox; +package apps::microsoft::exchange::2010::local::mode::owamailbox; use base qw(centreon::plugins::mode); @@ -48,7 +48,7 @@ sub new { 'url:s' => { name => 'url' }, 'mailbox:s' => { name => 'mailbox' }, 'password:s' => { name => 'password' }, - 'no-trust-ssl' => { name => 'no_trust_ssl' }, + 'no-trust-ssl' => { name => 'no_trust_ssl' } }); return $self; diff --git a/apps/exchange/2010/local/mode/queues.pm b/apps/microsoft/exchange/2010/local/mode/queues.pm similarity index 97% rename from apps/exchange/2010/local/mode/queues.pm rename to apps/microsoft/exchange/2010/local/mode/queues.pm index ee751e3b9..67f1687c7 100644 --- a/apps/exchange/2010/local/mode/queues.pm +++ b/apps/microsoft/exchange/2010/local/mode/queues.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::exchange::2010::local::mode::queues; +package apps::microsoft::exchange::2010::local::mode::queues; use base qw(centreon::plugins::templates::counter); @@ -27,7 +27,7 @@ use warnings; use centreon::plugins::misc; use centreon::plugins::templates::catalog_functions qw(catalog_status_threshold_ng); use centreon::common::powershell::exchange::2010::queues; -use apps::exchange::2010::local::mode::resources::types qw($queue_status $queue_delivery_type); +use apps::microsoft::exchange::2010::local::mode::resources::types qw($queue_status $queue_delivery_type); use JSON::XS; sub custom_status_output { diff --git a/apps/exchange/2010/local/mode/replicationhealth.pm b/apps/microsoft/exchange/2010/local/mode/replicationhealth.pm similarity index 98% rename from apps/exchange/2010/local/mode/replicationhealth.pm rename to apps/microsoft/exchange/2010/local/mode/replicationhealth.pm index 9a051317c..20ccf8669 100644 --- a/apps/exchange/2010/local/mode/replicationhealth.pm +++ b/apps/microsoft/exchange/2010/local/mode/replicationhealth.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::exchange::2010::local::mode::replicationhealth; +package apps::microsoft::exchange::2010::local::mode::replicationhealth; use base qw(centreon::plugins::mode); @@ -44,7 +44,7 @@ sub new { 'ps-exec-only' => { name => 'ps_exec_only', }, 'ps-display' => { name => 'ps_display' }, 'warning:s' => { name => 'warning', }, - 'critical:s' => { name => 'critical', default => '%{result} !~ /Passed/i' }, + 'critical:s' => { name => 'critical', default => '%{result} !~ /Passed/i' } }); return $self; diff --git a/apps/exchange/2010/local/mode/resources/types.pm b/apps/microsoft/exchange/2010/local/mode/resources/types.pm similarity index 97% rename from apps/exchange/2010/local/mode/resources/types.pm rename to apps/microsoft/exchange/2010/local/mode/resources/types.pm index b83160c42..bc662ed1f 100644 --- a/apps/exchange/2010/local/mode/resources/types.pm +++ b/apps/microsoft/exchange/2010/local/mode/resources/types.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::exchange::2010::local::mode::resources::types; +package apps::microsoft::exchange::2010::local::mode::resources::types; use strict; use warnings; diff --git a/apps/exchange/2010/local/mode/services.pm b/apps/microsoft/exchange/2010/local/mode/services.pm similarity index 98% rename from apps/exchange/2010/local/mode/services.pm rename to apps/microsoft/exchange/2010/local/mode/services.pm index 5bd1d3845..64ac0c019 100644 --- a/apps/exchange/2010/local/mode/services.pm +++ b/apps/microsoft/exchange/2010/local/mode/services.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::exchange::2010::local::mode::services; +package apps::microsoft::exchange::2010::local::mode::services; use base qw(centreon::plugins::mode); @@ -44,7 +44,7 @@ sub new { 'ps-exec-only' => { name => 'ps_exec_only' }, 'ps-display' => { name => 'ps_display' }, 'warning:s' => { name => 'warning' }, - 'critical:s' => { name => 'critical', default => '%{requiredservicesrunning} =~ /True/i and %{servicesnotrunning} ne ""' }, + 'critical:s' => { name => 'critical', default => '%{requiredservicesrunning} =~ /True/i and %{servicesnotrunning} ne ""' } }); return $self; diff --git a/apps/exchange/2010/local/plugin.pm b/apps/microsoft/exchange/2010/local/plugin.pm similarity index 52% rename from apps/exchange/2010/local/plugin.pm rename to apps/microsoft/exchange/2010/local/plugin.pm index 91d4f7526..a5d056f60 100644 --- a/apps/exchange/2010/local/plugin.pm +++ b/apps/microsoft/exchange/2010/local/plugin.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::exchange::2010::local::plugin; +package apps::microsoft::exchange::2010::local::plugin; use strict; use warnings; @@ -31,16 +31,16 @@ sub new { $self->{version} = '0.1'; $self->{modes} = { - 'activesync-mailbox' => 'apps::exchange::2010::local::mode::activesyncmailbox', - 'databases' => 'apps::exchange::2010::local::mode::databases', - 'list-databases' => 'apps::exchange::2010::local::mode::listdatabases', - 'imap-mailbox' => 'apps::exchange::2010::local::mode::imapmailbox', - 'mapi-mailbox' => 'apps::exchange::2010::local::mode::mapimailbox', - 'outlook-webservices' => 'apps::exchange::2010::local::mode::outlookwebservices', - 'owa-mailbox' => 'apps::exchange::2010::local::mode::owamailbox', - 'queues' => 'apps::exchange::2010::local::mode::queues', - 'replication-health' => 'apps::exchange::2010::local::mode::replicationhealth', - 'services' => 'apps::exchange::2010::local::mode::services' + 'activesync-mailbox' => 'apps::microsoft::exchange::2010::local::mode::activesyncmailbox', + 'databases' => 'apps::microsoft::exchange::2010::local::mode::databases', + 'list-databases' => 'apps::microsoft::exchange::2010::local::mode::listdatabases', + 'imap-mailbox' => 'apps::microsoft::exchange::2010::local::mode::imapmailbox', + 'mapi-mailbox' => 'apps::microsoft::exchange::2010::local::mode::mapimailbox', + 'outlook-webservices' => 'apps::microsoft::exchange::2010::local::mode::outlookwebservices', + 'owa-mailbox' => 'apps::microsoft::exchange::2010::local::mode::owamailbox', + 'queues' => 'apps::microsoft::exchange::2010::local::mode::queues', + 'replication-health' => 'apps::microsoft::exchange::2010::local::mode::replicationhealth', + 'services' => 'apps::microsoft::exchange::2010::local::mode::services' }; return $self; diff --git a/apps/hyperv/2012/local/mode/listnodevms.pm b/apps/microsoft/hyperv/2012/local/mode/listnodevms.pm similarity index 97% rename from apps/hyperv/2012/local/mode/listnodevms.pm rename to apps/microsoft/hyperv/2012/local/mode/listnodevms.pm index ae7ecf476..5c195985f 100644 --- a/apps/hyperv/2012/local/mode/listnodevms.pm +++ b/apps/microsoft/hyperv/2012/local/mode/listnodevms.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::hyperv::2012::local::mode::listnodevms; +package apps::microsoft::hyperv::2012::local::mode::listnodevms; use base qw(centreon::plugins::mode); @@ -26,7 +26,7 @@ use strict; use warnings; use centreon::plugins::misc; use centreon::common::powershell::hyperv::2012::listnodevms; -use apps::hyperv::2012::local::mode::resources::types qw($node_vm_state); +use apps::microsoft::hyperv::2012::local::mode::resources::types qw($node_vm_state); use JSON::XS; sub new { diff --git a/apps/hyperv/2012/local/mode/nodeintegrationservice.pm b/apps/microsoft/hyperv/2012/local/mode/nodeintegrationservice.pm similarity index 98% rename from apps/hyperv/2012/local/mode/nodeintegrationservice.pm rename to apps/microsoft/hyperv/2012/local/mode/nodeintegrationservice.pm index a1143baab..d053c168a 100644 --- a/apps/hyperv/2012/local/mode/nodeintegrationservice.pm +++ b/apps/microsoft/hyperv/2012/local/mode/nodeintegrationservice.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::hyperv::2012::local::mode::nodeintegrationservice; +package apps::microsoft::hyperv::2012::local::mode::nodeintegrationservice; use base qw(centreon::plugins::templates::counter); @@ -26,7 +26,7 @@ use strict; use warnings; use centreon::plugins::misc; use centreon::common::powershell::hyperv::2012::nodeintegrationservice; -use apps::hyperv::2012::local::mode::resources::types qw($node_vm_state $node_vm_integration_service_operational_status); +use apps::microsoft::hyperv::2012::local::mode::resources::types qw($node_vm_state $node_vm_integration_service_operational_status); use centreon::plugins::templates::catalog_functions qw(catalog_status_threshold); use JSON::XS; diff --git a/apps/hyperv/2012/local/mode/nodereplication.pm b/apps/microsoft/hyperv/2012/local/mode/nodereplication.pm similarity index 97% rename from apps/hyperv/2012/local/mode/nodereplication.pm rename to apps/microsoft/hyperv/2012/local/mode/nodereplication.pm index 88d8b0246..e0c32fb13 100644 --- a/apps/hyperv/2012/local/mode/nodereplication.pm +++ b/apps/microsoft/hyperv/2012/local/mode/nodereplication.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::hyperv::2012::local::mode::nodereplication; +package apps::microsoft::hyperv::2012::local::mode::nodereplication; use base qw(centreon::plugins::templates::counter); @@ -26,7 +26,7 @@ use strict; use warnings; use centreon::plugins::misc; use centreon::common::powershell::hyperv::2012::nodereplication; -use apps::hyperv::2012::local::mode::resources::types qw($node_replication_state); +use apps::microsoft::hyperv::2012::local::mode::resources::types qw($node_replication_state); use centreon::plugins::templates::catalog_functions qw(catalog_status_threshold); use JSON::XS; diff --git a/apps/hyperv/2012/local/mode/nodesnapshot.pm b/apps/microsoft/hyperv/2012/local/mode/nodesnapshot.pm similarity index 98% rename from apps/hyperv/2012/local/mode/nodesnapshot.pm rename to apps/microsoft/hyperv/2012/local/mode/nodesnapshot.pm index 0e8bfab17..bda0468df 100644 --- a/apps/hyperv/2012/local/mode/nodesnapshot.pm +++ b/apps/microsoft/hyperv/2012/local/mode/nodesnapshot.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::hyperv::2012::local::mode::nodesnapshot; +package apps::microsoft::hyperv::2012::local::mode::nodesnapshot; use base qw(centreon::plugins::templates::counter); @@ -26,7 +26,7 @@ use strict; use warnings; use centreon::plugins::misc; use centreon::common::powershell::hyperv::2012::nodesnapshot; -use apps::hyperv::2012::local::mode::resources::types qw($node_vm_state); +use apps::microsoft::hyperv::2012::local::mode::resources::types qw($node_vm_state); use JSON::XS; sub set_counters { diff --git a/apps/hyperv/2012/local/mode/nodevmstatus.pm b/apps/microsoft/hyperv/2012/local/mode/nodevmstatus.pm similarity index 98% rename from apps/hyperv/2012/local/mode/nodevmstatus.pm rename to apps/microsoft/hyperv/2012/local/mode/nodevmstatus.pm index 4cc895756..a6844a9bd 100644 --- a/apps/hyperv/2012/local/mode/nodevmstatus.pm +++ b/apps/microsoft/hyperv/2012/local/mode/nodevmstatus.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::hyperv::2012::local::mode::nodevmstatus; +package apps::microsoft::hyperv::2012::local::mode::nodevmstatus; use base qw(centreon::plugins::templates::counter); @@ -27,7 +27,7 @@ use warnings; use centreon::plugins::misc; use centreon::common::powershell::hyperv::2012::nodevmstatus; use centreon::plugins::templates::catalog_functions qw(catalog_status_threshold); -use apps::hyperv::2012::local::mode::resources::types qw($node_vm_state); +use apps::microsoft::hyperv::2012::local::mode::resources::types qw($node_vm_state); use JSON::XS; sub custom_status_output { diff --git a/apps/hyperv/2012/local/mode/resources/types.pm b/apps/microsoft/hyperv/2012/local/mode/resources/types.pm similarity index 98% rename from apps/hyperv/2012/local/mode/resources/types.pm rename to apps/microsoft/hyperv/2012/local/mode/resources/types.pm index c75a0b35c..f0ed913f9 100644 --- a/apps/hyperv/2012/local/mode/resources/types.pm +++ b/apps/microsoft/hyperv/2012/local/mode/resources/types.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::hyperv::2012::local::mode::resources::types; +package apps::microsoft::hyperv::2012::local::mode::resources::types; use strict; use warnings; diff --git a/apps/hyperv/2012/local/mode/scvmmintegrationservice.pm b/apps/microsoft/hyperv/2012/local/mode/scvmmintegrationservice.pm similarity index 98% rename from apps/hyperv/2012/local/mode/scvmmintegrationservice.pm rename to apps/microsoft/hyperv/2012/local/mode/scvmmintegrationservice.pm index 29a2ac26a..d903daceb 100644 --- a/apps/hyperv/2012/local/mode/scvmmintegrationservice.pm +++ b/apps/microsoft/hyperv/2012/local/mode/scvmmintegrationservice.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::hyperv::2012::local::mode::scvmmintegrationservice; +package apps::microsoft::hyperv::2012::local::mode::scvmmintegrationservice; use base qw(centreon::plugins::templates::counter); @@ -26,7 +26,7 @@ use strict; use warnings; use centreon::plugins::misc; use centreon::common::powershell::hyperv::2012::scvmmintegrationservice; -use apps::hyperv::2012::local::mode::resources::types qw($scvmm_vm_status); +use apps::microsoft::hyperv::2012::local::mode::resources::types qw($scvmm_vm_status); use centreon::plugins::templates::catalog_functions qw(catalog_status_threshold); use JSON::XS; diff --git a/apps/hyperv/2012/local/mode/scvmmsnapshot.pm b/apps/microsoft/hyperv/2012/local/mode/scvmmsnapshot.pm similarity index 98% rename from apps/hyperv/2012/local/mode/scvmmsnapshot.pm rename to apps/microsoft/hyperv/2012/local/mode/scvmmsnapshot.pm index 776e29fad..d3bfcfffd 100644 --- a/apps/hyperv/2012/local/mode/scvmmsnapshot.pm +++ b/apps/microsoft/hyperv/2012/local/mode/scvmmsnapshot.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::hyperv::2012::local::mode::scvmmsnapshot; +package apps::microsoft::hyperv::2012::local::mode::scvmmsnapshot; use base qw(centreon::plugins::templates::counter); @@ -26,7 +26,7 @@ use strict; use warnings; use centreon::plugins::misc; use centreon::common::powershell::hyperv::2012::scvmmsnapshot; -use apps::hyperv::2012::local::mode::resources::types qw($scvmm_vm_status); +use apps::microsoft::hyperv::2012::local::mode::resources::types qw($scvmm_vm_status); use JSON::XS; sub set_counters { diff --git a/apps/hyperv/2012/local/mode/scvmmvmstatus.pm b/apps/microsoft/hyperv/2012/local/mode/scvmmvmstatus.pm similarity index 98% rename from apps/hyperv/2012/local/mode/scvmmvmstatus.pm rename to apps/microsoft/hyperv/2012/local/mode/scvmmvmstatus.pm index 659f14a50..9f81cf080 100644 --- a/apps/hyperv/2012/local/mode/scvmmvmstatus.pm +++ b/apps/microsoft/hyperv/2012/local/mode/scvmmvmstatus.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::hyperv::2012::local::mode::scvmmvmstatus; +package apps::microsoft::hyperv::2012::local::mode::scvmmvmstatus; use base qw(centreon::plugins::templates::counter); @@ -26,7 +26,7 @@ use strict; use warnings; use centreon::plugins::misc; use centreon::common::powershell::hyperv::2012::scvmmvmstatus; -use apps::hyperv::2012::local::mode::resources::types qw($scvmm_vm_status); +use apps::microsoft::hyperv::2012::local::mode::resources::types qw($scvmm_vm_status); use centreon::plugins::templates::catalog_functions qw(catalog_status_threshold); use JSON::XS; diff --git a/apps/hyperv/2012/local/plugin.pm b/apps/microsoft/hyperv/2012/local/plugin.pm similarity index 55% rename from apps/hyperv/2012/local/plugin.pm rename to apps/microsoft/hyperv/2012/local/plugin.pm index d04761268..fedd47e52 100644 --- a/apps/hyperv/2012/local/plugin.pm +++ b/apps/microsoft/hyperv/2012/local/plugin.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::hyperv::2012::local::plugin; +package apps::microsoft::hyperv::2012::local::plugin; use strict; use warnings; @@ -30,16 +30,16 @@ sub new { bless $self, $class; $self->{version} = '0.1'; - %{$self->{modes}} = ( - 'list-node-vms' => 'apps::hyperv::2012::local::mode::listnodevms', - 'node-integration-service' => 'apps::hyperv::2012::local::mode::nodeintegrationservice', - 'node-replication' => 'apps::hyperv::2012::local::mode::nodereplication', - 'node-snapshot' => 'apps::hyperv::2012::local::mode::nodesnapshot', - 'node-vm-status' => 'apps::hyperv::2012::local::mode::nodevmstatus', - 'scvmm-integration-service' => 'apps::hyperv::2012::local::mode::scvmmintegrationservice', - 'scvmm-snapshot' => 'apps::hyperv::2012::local::mode::scvmmsnapshot', - 'scvmm-vm-status' => 'apps::hyperv::2012::local::mode::scvmmvmstatus', - ); + $self->{modes} = { + 'list-node-vms' => 'apps::microsoft::hyperv::2012::local::mode::listnodevms', + 'node-integration-service' => 'apps::microsoft::hyperv::2012::local::mode::nodeintegrationservice', + 'node-replication' => 'apps::microsoft::hyperv::2012::local::mode::nodereplication', + 'node-snapshot' => 'apps::microsoft::hyperv::2012::local::mode::nodesnapshot', + 'node-vm-status' => 'apps::microsoft::hyperv::2012::local::mode::nodevmstatus', + 'scvmm-integration-service' => 'apps::microsoft::hyperv::2012::local::mode::scvmmintegrationservice', + 'scvmm-snapshot' => 'apps::microsoft::hyperv::2012::local::mode::scvmmsnapshot', + 'scvmm-vm-status' => 'apps::microsoft::hyperv::2012::local::mode::scvmmvmstatus' + }; return $self; } diff --git a/apps/iis/local/mode/applicationpoolstate.pm b/apps/microsoft/iis/local/mode/applicationpoolstate.pm similarity index 98% rename from apps/iis/local/mode/applicationpoolstate.pm rename to apps/microsoft/iis/local/mode/applicationpoolstate.pm index 16461248b..ded92001d 100644 --- a/apps/iis/local/mode/applicationpoolstate.pm +++ b/apps/microsoft/iis/local/mode/applicationpoolstate.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::iis::local::mode::applicationpoolstate; +package apps::microsoft::iis::local::mode::applicationpoolstate; use base qw(centreon::plugins::templates::counter); diff --git a/apps/iis/local/mode/listapplicationpools.pm b/apps/microsoft/iis/local/mode/listapplicationpools.pm similarity index 98% rename from apps/iis/local/mode/listapplicationpools.pm rename to apps/microsoft/iis/local/mode/listapplicationpools.pm index 7ff6b9603..b5694637a 100644 --- a/apps/iis/local/mode/listapplicationpools.pm +++ b/apps/microsoft/iis/local/mode/listapplicationpools.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::iis::local::mode::listapplicationpools; +package apps::microsoft::iis::local::mode::listapplicationpools; use base qw(centreon::plugins::mode); diff --git a/apps/iis/local/mode/listsites.pm b/apps/microsoft/iis/local/mode/listsites.pm similarity index 98% rename from apps/iis/local/mode/listsites.pm rename to apps/microsoft/iis/local/mode/listsites.pm index 7daafbf7f..802f1b69b 100644 --- a/apps/iis/local/mode/listsites.pm +++ b/apps/microsoft/iis/local/mode/listsites.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::iis::local::mode::listsites; +package apps::microsoft::iis::local::mode::listsites; use base qw(centreon::plugins::mode); diff --git a/apps/iis/local/mode/webservicestatistics.pm b/apps/microsoft/iis/local/mode/webservicestatistics.pm similarity index 99% rename from apps/iis/local/mode/webservicestatistics.pm rename to apps/microsoft/iis/local/mode/webservicestatistics.pm index fe32b0a6e..8b34c67e8 100644 --- a/apps/iis/local/mode/webservicestatistics.pm +++ b/apps/microsoft/iis/local/mode/webservicestatistics.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::iis::local::mode::webservicestatistics; +package apps::microsoft::iis::local::mode::webservicestatistics; use base qw(centreon::plugins::templates::counter); diff --git a/apps/iis/local/plugin.pm b/apps/microsoft/iis/local/plugin.pm similarity index 73% rename from apps/iis/local/plugin.pm rename to apps/microsoft/iis/local/plugin.pm index 708920007..8ed002151 100644 --- a/apps/iis/local/plugin.pm +++ b/apps/microsoft/iis/local/plugin.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::iis::local::plugin; +package apps::microsoft::iis::local::plugin; use strict; use warnings; @@ -31,10 +31,10 @@ sub new { $self->{version} = '0.1'; $self->{modes} = { - 'applicationpool-state' => 'apps::iis::local::mode::applicationpoolstate', - 'list-applicationpools' => 'apps::iis::local::mode::listapplicationpools', - 'list-sites' => 'apps::iis::local::mode::listsites', - 'webservice-statistics' => 'apps::iis::local::mode::webservicestatistics' + 'applicationpool-state' => 'apps::microsoft::iis::local::mode::applicationpoolstate', + 'list-applicationpools' => 'apps::microsoft::iis::local::mode::listapplicationpools', + 'list-sites' => 'apps::microsoft::iis::local::mode::listsites', + 'webservice-statistics' => 'apps::microsoft::iis::local::mode::webservicestatistics' }; return $self; diff --git a/apps/iis/restapi/custom/api.pm b/apps/microsoft/iis/restapi/custom/api.pm similarity index 99% rename from apps/iis/restapi/custom/api.pm rename to apps/microsoft/iis/restapi/custom/api.pm index 0199d160e..8700b1493 100644 --- a/apps/iis/restapi/custom/api.pm +++ b/apps/microsoft/iis/restapi/custom/api.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::iis::restapi::custom::api; +package apps::microsoft::iis::restapi::custom::api; use strict; use warnings; diff --git a/apps/iis/restapi/mode/applicationpools.pm b/apps/microsoft/iis/restapi/mode/applicationpools.pm similarity index 98% rename from apps/iis/restapi/mode/applicationpools.pm rename to apps/microsoft/iis/restapi/mode/applicationpools.pm index bb5becc53..46b7067b7 100644 --- a/apps/iis/restapi/mode/applicationpools.pm +++ b/apps/microsoft/iis/restapi/mode/applicationpools.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::iis::restapi::mode::applicationpools; +package apps::microsoft::iis::restapi::mode::applicationpools; use base qw(centreon::plugins::templates::counter); diff --git a/apps/iis/restapi/mode/listapplicationpools.pm b/apps/microsoft/iis/restapi/mode/listapplicationpools.pm similarity index 97% rename from apps/iis/restapi/mode/listapplicationpools.pm rename to apps/microsoft/iis/restapi/mode/listapplicationpools.pm index 44c287576..ce7c50cd9 100644 --- a/apps/iis/restapi/mode/listapplicationpools.pm +++ b/apps/microsoft/iis/restapi/mode/listapplicationpools.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::iis::restapi::mode::listapplicationpools; +package apps::microsoft::iis::restapi::mode::listapplicationpools; use base qw(centreon::plugins::mode); diff --git a/apps/iis/restapi/mode/listwebsites.pm b/apps/microsoft/iis/restapi/mode/listwebsites.pm similarity index 97% rename from apps/iis/restapi/mode/listwebsites.pm rename to apps/microsoft/iis/restapi/mode/listwebsites.pm index 151d21809..125897490 100644 --- a/apps/iis/restapi/mode/listwebsites.pm +++ b/apps/microsoft/iis/restapi/mode/listwebsites.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::iis::restapi::mode::listwebsites; +package apps::microsoft::iis::restapi::mode::listwebsites; use base qw(centreon::plugins::mode); diff --git a/apps/iis/restapi/mode/websites.pm b/apps/microsoft/iis/restapi/mode/websites.pm similarity index 99% rename from apps/iis/restapi/mode/websites.pm rename to apps/microsoft/iis/restapi/mode/websites.pm index 4957b81e0..511d7257e 100644 --- a/apps/iis/restapi/mode/websites.pm +++ b/apps/microsoft/iis/restapi/mode/websites.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::iis::restapi::mode::websites; +package apps::microsoft::iis::restapi::mode::websites; use base qw(centreon::plugins::templates::counter); diff --git a/apps/iis/restapi/plugin.pm b/apps/microsoft/iis/restapi/plugin.pm similarity index 69% rename from apps/iis/restapi/plugin.pm rename to apps/microsoft/iis/restapi/plugin.pm index f9bd7b047..93e74abcd 100644 --- a/apps/iis/restapi/plugin.pm +++ b/apps/microsoft/iis/restapi/plugin.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::iis::restapi::plugin; +package apps::microsoft::iis::restapi::plugin; use strict; use warnings; @@ -31,13 +31,13 @@ sub new { $self->{version} = '0.1'; $self->{modes} = { - 'application-pools' => 'apps::iis::restapi::mode::applicationpools', - 'list-application-pools' => 'apps::iis::restapi::mode::listapplicationpools', - 'list-websites' => 'apps::iis::restapi::mode::listwebsites', - 'websites' => 'apps::iis::restapi::mode::websites' + 'application-pools' => 'apps::microsoft::iis::restapi::mode::applicationpools', + 'list-application-pools' => 'apps::microsoft::iis::restapi::mode::listapplicationpools', + 'list-websites' => 'apps::microsoft::iis::restapi::mode::listwebsites', + 'websites' => 'apps::microsoft::iis::restapi::mode::websites' }; - $self->{custom_modes}{api} = 'apps::iis::restapi::custom::api'; + $self->{custom_modes}->{api} = 'apps::microsoft::iis::restapi::custom::api'; return $self; } diff --git a/apps/iis/wsman/mode/applicationpoolstate.pm b/apps/microsoft/iis/wsman/mode/applicationpoolstate.pm similarity index 92% rename from apps/iis/wsman/mode/applicationpoolstate.pm rename to apps/microsoft/iis/wsman/mode/applicationpoolstate.pm index d09862940..01437e68f 100644 --- a/apps/iis/wsman/mode/applicationpoolstate.pm +++ b/apps/microsoft/iis/wsman/mode/applicationpoolstate.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::iis::wsman::mode::applicationpoolstate; +package apps::microsoft::iis::wsman::mode::applicationpoolstate; use base qw(centreon::plugins::mode); @@ -37,14 +37,14 @@ sub new { my $self = $class->SUPER::new(package => __PACKAGE__, %options); bless $self, $class; - $options{options}->add_options(arguments => - { - "warning" => { name => 'warning', }, - "critical" => { name => 'critical', }, - "pools:s" => { name => 'pools', }, - "auto" => { name => 'auto', }, - "exclude:s" => { name => 'exclude', }, - }); + $options{options}->add_options(arguments => { + "warning" => { name => 'warning' }, + "critical" => { name => 'critical' }, + "pools:s" => { name => 'pools' }, + "auto" => { name => 'auto' }, + "exclude:s" => { name => 'exclude' } + }); + $self->{pools_rules} = {}; $self->{wql_filter} = ''; $self->{threshold} = 'CRITICAL'; @@ -205,4 +205,4 @@ Exclude some pool for --auto option (Can be a regexp). =back -=cut \ No newline at end of file +=cut diff --git a/apps/iis/wsman/mode/listapplicationpools.pm b/apps/microsoft/iis/wsman/mode/listapplicationpools.pm similarity index 98% rename from apps/iis/wsman/mode/listapplicationpools.pm rename to apps/microsoft/iis/wsman/mode/listapplicationpools.pm index cf2b43a03..c47e1fab5 100644 --- a/apps/iis/wsman/mode/listapplicationpools.pm +++ b/apps/microsoft/iis/wsman/mode/listapplicationpools.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::iis::wsman::mode::listapplicationpools; +package apps::microsoft::iis::wsman::mode::listapplicationpools; use base qw(centreon::plugins::mode); @@ -142,4 +142,4 @@ Filter application pool state. Regexp can be used. =back -=cut \ No newline at end of file +=cut diff --git a/apps/iis/wsman/plugin.pm b/apps/microsoft/iis/wsman/plugin.pm similarity index 81% rename from apps/iis/wsman/plugin.pm rename to apps/microsoft/iis/wsman/plugin.pm index 10901efb4..9bf61ced4 100644 --- a/apps/iis/wsman/plugin.pm +++ b/apps/microsoft/iis/wsman/plugin.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::iis::wsman::plugin; +package apps::microsoft::iis::wsman::plugin; use strict; use warnings; @@ -30,10 +30,10 @@ sub new { bless $self, $class; $self->{version} = '0.1'; - %{$self->{modes}} = ( - 'applicationpool-state' => 'apps::iis::wsman::mode::applicationpoolstate', - 'list-applicationpools' => 'apps::iis::wsman::mode::listapplicationpools', - ); + $self->{modes} = { + 'applicationpool-state' => 'apps::microsoft::iis::wsman::mode::applicationpoolstate', + 'list-applicationpools' => 'apps::microsoft::iis::wsman::mode::listapplicationpools' + }; return $self; } diff --git a/apps/cluster/mscs/local/mode/listnodes.pm b/apps/microsoft/mscs/local/mode/listnodes.pm similarity index 92% rename from apps/cluster/mscs/local/mode/listnodes.pm rename to apps/microsoft/mscs/local/mode/listnodes.pm index 0d4483b95..6947ea35b 100644 --- a/apps/cluster/mscs/local/mode/listnodes.pm +++ b/apps/microsoft/mscs/local/mode/listnodes.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::cluster::mscs::local::mode::listnodes; +package apps::microsoft::mscs::local::mode::listnodes; use base qw(centreon::plugins::mode); @@ -31,10 +31,10 @@ sub new { my $self = $class->SUPER::new(package => __PACKAGE__, %options); bless $self, $class; - $options{options}->add_options(arguments => - { - "filter-name:s" => { name => 'filter_name' }, - }); + $options{options}->add_options(arguments => { + 'filter-name:s' => { name => 'filter_name' } + }); + return $self; } @@ -124,4 +124,4 @@ Filter node name (can be a regexp). =back =cut - \ No newline at end of file + diff --git a/apps/cluster/mscs/local/mode/listresources.pm b/apps/microsoft/mscs/local/mode/listresources.pm similarity index 94% rename from apps/cluster/mscs/local/mode/listresources.pm rename to apps/microsoft/mscs/local/mode/listresources.pm index d5d8543d2..f1a433616 100644 --- a/apps/cluster/mscs/local/mode/listresources.pm +++ b/apps/microsoft/mscs/local/mode/listresources.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::cluster::mscs::local::mode::listresources; +package apps::microsoft::mscs::local::mode::listresources; use base qw(centreon::plugins::mode); @@ -31,10 +31,10 @@ sub new { my $self = $class->SUPER::new(package => __PACKAGE__, %options); bless $self, $class; - $options{options}->add_options(arguments => - { - "filter-name:s" => { name => 'filter_name' }, - }); + $options{options}->add_options(arguments => { + 'filter-name:s' => { name => 'filter_name' } + }); + return $self; } @@ -146,4 +146,4 @@ Filter resource name (can be a regexp). =back =cut - \ No newline at end of file + diff --git a/apps/cluster/mscs/local/mode/networkstatus.pm b/apps/microsoft/mscs/local/mode/networkstatus.pm similarity index 74% rename from apps/cluster/mscs/local/mode/networkstatus.pm rename to apps/microsoft/mscs/local/mode/networkstatus.pm index ad522f601..3bd5801c5 100644 --- a/apps/cluster/mscs/local/mode/networkstatus.pm +++ b/apps/microsoft/mscs/local/mode/networkstatus.pm @@ -18,14 +18,14 @@ # limitations under the License. # -package apps::cluster::mscs::local::mode::networkstatus; +package apps::microsoft::mscs::local::mode::networkstatus; use base qw(centreon::plugins::templates::counter); use strict; use warnings; use Win32::OLE; -use centreon::plugins::templates::catalog_functions qw(catalog_status_threshold); +use centreon::plugins::templates::catalog_functions qw(catalog_status_threshold_ng); sub set_counters { my ($self, %options) = @_; @@ -35,14 +35,18 @@ sub set_counters { ]; $self->{maps_counters}->{network} = [ - { label => 'status', threshold => 0, set => { + { + label => 'status', + type => 2, + unknown_default => '%{state} =~ /unknown/', + critical_default => '%{state} =~ /down|partitioned|unavailable/', + set => { key_values => [ { name => 'state' }, { name => 'display' } ], - closure_custom_calc => $self->can('custom_status_calc'), closure_custom_output => $self->can('custom_status_output'), closure_custom_perfdata => sub { return 0; }, - closure_custom_threshold_check => \&catalog_status_threshold, + closure_custom_threshold_check => \&catalog_status_threshold_ng } - }, + } ]; } @@ -53,14 +57,6 @@ sub custom_status_output { return $msg; } -sub custom_status_calc { - my ($self, %options) = @_; - - $self->{result_values}->{state} = $options{new_datas}->{$self->{instance} . '_state'}; - $self->{result_values}->{display} = $options{new_datas}->{$self->{instance} . '_display'}; - return 0; -} - sub prefix_network_output { my ($self, %options) = @_; @@ -72,24 +68,13 @@ sub new { my $self = $class->SUPER::new(package => __PACKAGE__, %options); bless $self, $class; - $options{options}->add_options(arguments => - { - "filter-name:s" => { name => 'filter_name' }, - "unknown-status:s" => { name => 'unknown_status', default => '%{state} =~ /unknown/' }, - "warning-status:s" => { name => 'warning_status', default => '' }, - "critical-status:s" => { name => 'critical_status', default => '%{state} =~ /down|partitioned|unavailable/' }, - }); + $options{options}->add_options(arguments => { + 'filter-name:s' => { name => 'filter_name' } + }); return $self; } -sub check_options { - my ($self, %options) = @_; - $self->SUPER::check_options(%options); - - $self->change_macros(macros => ['warning_status', 'critical_status', 'unknown_status']); -} - my %map_state = ( -1 => 'unknown', 0 => 'unavailable', diff --git a/apps/cluster/mscs/local/mode/nodestatus.pm b/apps/microsoft/mscs/local/mode/nodestatus.pm similarity index 72% rename from apps/cluster/mscs/local/mode/nodestatus.pm rename to apps/microsoft/mscs/local/mode/nodestatus.pm index 77dc6c0b1..4c747444f 100644 --- a/apps/cluster/mscs/local/mode/nodestatus.pm +++ b/apps/microsoft/mscs/local/mode/nodestatus.pm @@ -18,14 +18,14 @@ # limitations under the License. # -package apps::cluster::mscs::local::mode::nodestatus; +package apps::microsoft::mscs::local::mode::nodestatus; use base qw(centreon::plugins::templates::counter); use strict; use warnings; use Win32::OLE; -use centreon::plugins::templates::catalog_functions qw(catalog_status_threshold); +use centreon::plugins::templates::catalog_functions qw(catalog_status_threshold_ng); sub set_counters { my ($self, %options) = @_; @@ -35,30 +35,26 @@ sub set_counters { ]; $self->{maps_counters}->{node} = [ - { label => 'status', threshold => 0, set => { + { + label => 'status', + type => 2, + unknown_default => '%{state} =~ /unknown/', + warning_default => '%{state} =~ /pause|joining/', + critical_default => '%{state} =~ /down/', + set => { key_values => [ { name => 'state' }, { name => 'display' } ], - closure_custom_calc => $self->can('custom_status_calc'), closure_custom_output => $self->can('custom_status_output'), closure_custom_perfdata => sub { return 0; }, - closure_custom_threshold_check => \&catalog_status_threshold, + closure_custom_threshold_check => \&catalog_status_threshold_ng } - }, + } ]; } sub custom_status_output { my ($self, %options) = @_; - my $msg = 'state : ' . $self->{result_values}->{state}; - return $msg; -} - -sub custom_status_calc { - my ($self, %options) = @_; - - $self->{result_values}->{state} = $options{new_datas}->{$self->{instance} . '_state'}; - $self->{result_values}->{display} = $options{new_datas}->{$self->{instance} . '_display'}; - return 0; + return 'state : ' . $self->{result_values}->{state}; } sub prefix_node_output { @@ -72,24 +68,13 @@ sub new { my $self = $class->SUPER::new(package => __PACKAGE__, %options); bless $self, $class; - $options{options}->add_options(arguments => - { - "filter-name:s" => { name => 'filter_name' }, - "unknown-status:s" => { name => 'unknown_status', default => '%{state} =~ /unknown/' }, - "warning-status:s" => { name => 'warning_status', default => '%{state} =~ /pause|joining/' }, - "critical-status:s" => { name => 'critical_status', default => '%{state} =~ /down/' }, - }); + $options{options}->add_options(arguments => { + 'filter-name:s' => { name => 'filter_name' } + }); return $self; } -sub check_options { - my ($self, %options) = @_; - $self->SUPER::check_options(%options); - - $self->change_macros(macros => ['warning_status', 'critical_status', 'unknown_status']); -} - my %map_state = ( -1 => 'unknown', 0 => 'up', diff --git a/apps/cluster/mscs/local/mode/resourcegroupstatus.pm b/apps/microsoft/mscs/local/mode/resourcegroupstatus.pm similarity index 99% rename from apps/cluster/mscs/local/mode/resourcegroupstatus.pm rename to apps/microsoft/mscs/local/mode/resourcegroupstatus.pm index d2755e241..417d4f714 100644 --- a/apps/cluster/mscs/local/mode/resourcegroupstatus.pm +++ b/apps/microsoft/mscs/local/mode/resourcegroupstatus.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::cluster::mscs::local::mode::resourcegroupstatus; +package apps::microsoft::mscs::local::mode::resourcegroupstatus; use base qw(centreon::plugins::templates::counter); diff --git a/apps/cluster/mscs/local/mode/resourcestatus.pm b/apps/microsoft/mscs/local/mode/resourcestatus.pm similarity index 72% rename from apps/cluster/mscs/local/mode/resourcestatus.pm rename to apps/microsoft/mscs/local/mode/resourcestatus.pm index 9f7ed0eb8..e4f0cdfad 100644 --- a/apps/cluster/mscs/local/mode/resourcestatus.pm +++ b/apps/microsoft/mscs/local/mode/resourcestatus.pm @@ -18,14 +18,14 @@ # limitations under the License. # -package apps::cluster::mscs::local::mode::resourcestatus; +package apps::microsoft::mscs::local::mode::resourcestatus; use base qw(centreon::plugins::templates::counter); use strict; use warnings; use Win32::OLE; -use centreon::plugins::templates::catalog_functions qw(catalog_status_threshold); +use centreon::plugins::templates::catalog_functions qw(catalog_status_threshold_ng); sub set_counters { my ($self, %options) = @_; @@ -35,31 +35,25 @@ sub set_counters { ]; $self->{maps_counters}->{resource} = [ - { label => 'status', threshold => 0, set => { + { + label => 'status', + type => 2, + unknown_default => '%{state} =~ /unknown/', + critical_default => '%{state} =~ /failed|offline/', + set => { key_values => [ { name => 'state' }, { name => 'display' }, { name => 'owner_node' } ], - closure_custom_calc => $self->can('custom_status_calc'), closure_custom_output => $self->can('custom_status_output'), closure_custom_perfdata => sub { return 0; }, - closure_custom_threshold_check => \&catalog_status_threshold, + closure_custom_threshold_check => \&catalog_status_threshold_ng } - }, + } ]; } sub custom_status_output { my ($self, %options) = @_; - my $msg = 'state : ' . $self->{result_values}->{state} . ' [node: ' . $self->{result_values}->{owner_node} . ']'; - return $msg; -} - -sub custom_status_calc { - my ($self, %options) = @_; - - $self->{result_values}->{state} = $options{new_datas}->{$self->{instance} . '_state'}; - $self->{result_values}->{display} = $options{new_datas}->{$self->{instance} . '_display'}; - $self->{result_values}->{owner_node} = $options{new_datas}->{$self->{instance} . '_owner_node'}; - return 0; + return 'state : ' . $self->{result_values}->{state} . ' [node: ' . $self->{result_values}->{owner_node} . ']'; } sub prefix_resource_output { @@ -73,24 +67,13 @@ sub new { my $self = $class->SUPER::new(package => __PACKAGE__, %options); bless $self, $class; - $options{options}->add_options(arguments => - { - "filter-name:s" => { name => 'filter_name' }, - "unknown-status:s" => { name => 'unknown_status', default => '%{state} =~ /unknown/' }, - "warning-status:s" => { name => 'warning_status', default => '' }, - "critical-status:s" => { name => 'critical_status', default => '%{state} =~ /failed|offline/' }, - }); + $options{options}->add_options(arguments => { + 'filter-name:s' => { name => 'filter_name' } + }); return $self; } -sub check_options { - my ($self, %options) = @_; - $self->SUPER::check_options(%options); - - $self->change_macros(macros => ['warning_status', 'critical_status', 'unknown_status']); -} - my %map_state = ( -1 => 'unknown', 0 => 'inherited', diff --git a/apps/cluster/mscs/local/plugin.pm b/apps/microsoft/mscs/local/plugin.pm similarity index 64% rename from apps/cluster/mscs/local/plugin.pm rename to apps/microsoft/mscs/local/plugin.pm index 902c3748f..fb9ebe3e6 100644 --- a/apps/cluster/mscs/local/plugin.pm +++ b/apps/microsoft/mscs/local/plugin.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::cluster::mscs::local::plugin; +package apps::microsoft::mscs::local::plugin; use strict; use warnings; @@ -30,14 +30,14 @@ sub new { bless $self, $class; $self->{version} = '0.1'; - %{$self->{modes}} = ( - 'list-nodes' => 'apps::cluster::mscs::local::mode::listnodes', - 'list-resources' => 'apps::cluster::mscs::local::mode::listresources', - 'network-status' => 'apps::cluster::mscs::local::mode::networkstatus', - 'node-status' => 'apps::cluster::mscs::local::mode::nodestatus', - 'resource-status' => 'apps::cluster::mscs::local::mode::resourcestatus', - 'resourcegroup-status' => 'apps::cluster::mscs::local::mode::resourcegroupstatus', - ); + $self->{modes} = { + 'list-nodes' => 'apps::microsoft::mscs::local::mode::listnodes', + 'list-resources' => 'apps::microsoft::mscs::local::mode::listresources', + 'network-status' => 'apps::microsoft::mscs::local::mode::networkstatus', + 'node-status' => 'apps::microsoft::mscs::local::mode::nodestatus', + 'resource-status' => 'apps::microsoft::mscs::local::mode::resourcestatus', + 'resourcegroup-status' => 'apps::microsoft::mscs::local::mode::resourcegroupstatus' + }; return $self; } diff --git a/apps/sccm/local/mode/databasereplicationstatus.pm b/apps/microsoft/sccm/local/mode/databasereplicationstatus.pm similarity index 99% rename from apps/sccm/local/mode/databasereplicationstatus.pm rename to apps/microsoft/sccm/local/mode/databasereplicationstatus.pm index e9106381d..7f2caa9b1 100644 --- a/apps/sccm/local/mode/databasereplicationstatus.pm +++ b/apps/microsoft/sccm/local/mode/databasereplicationstatus.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::sccm::local::mode::databasereplicationstatus; +package apps::microsoft::sccm::local::mode::databasereplicationstatus; use base qw(centreon::plugins::templates::counter); @@ -156,7 +156,7 @@ sub new { 'critical-link-status:s' => { name => 'critical_link_status', default => '' }, 'warning-site-status:s' => { name => 'warning_site_status', default => '' }, 'critical-site-status:s' => { name => 'critical_site_status', default => '' }, - 'timezone:s' => { name => 'timezone', default => 'UTC' }, + 'timezone:s' => { name => 'timezone', default => 'UTC' } }); return $self; diff --git a/apps/sccm/local/mode/sitestatus.pm b/apps/microsoft/sccm/local/mode/sitestatus.pm similarity index 99% rename from apps/sccm/local/mode/sitestatus.pm rename to apps/microsoft/sccm/local/mode/sitestatus.pm index 791275f31..76c16aabe 100644 --- a/apps/sccm/local/mode/sitestatus.pm +++ b/apps/microsoft/sccm/local/mode/sitestatus.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::sccm::local::mode::sitestatus; +package apps::microsoft::sccm::local::mode::sitestatus; use base qw(centreon::plugins::templates::counter); diff --git a/apps/sccm/local/plugin.pm b/apps/microsoft/sccm/local/plugin.pm similarity index 80% rename from apps/sccm/local/plugin.pm rename to apps/microsoft/sccm/local/plugin.pm index 288ba82f0..091d0311d 100644 --- a/apps/sccm/local/plugin.pm +++ b/apps/microsoft/sccm/local/plugin.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::sccm::local::plugin; +package apps::microsoft::sccm::local::plugin; use strict; use warnings; @@ -30,10 +30,10 @@ sub new { bless $self, $class; $self->{version} = '0.1'; - %{$self->{modes}} = ( - 'database-replication-status' => 'apps::sccm::local::mode::databasereplicationstatus', - 'site-status' => 'apps::sccm::local::mode::sitestatus', - ); + $self->{modes} = { + 'database-replication-status' => 'apps::microsoft::sccm::local::mode::databasereplicationstatus', + 'site-status' => 'apps::microsoft::sccm::local::mode::sitestatus' + }; return $self; } diff --git a/apps/wsus/local/mode/computersstatus.pm b/apps/microsoft/wsus/local/mode/computersstatus.pm similarity index 97% rename from apps/wsus/local/mode/computersstatus.pm rename to apps/microsoft/wsus/local/mode/computersstatus.pm index cb1443c2b..0e38dff0f 100644 --- a/apps/wsus/local/mode/computersstatus.pm +++ b/apps/microsoft/wsus/local/mode/computersstatus.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::wsus::local::mode::computersstatus; +package apps::microsoft::wsus::local::mode::computersstatus; use base qw(centreon::plugins::templates::counter); @@ -107,11 +107,6 @@ sub new { return $self; } -sub check_options { - my ($self, %options) = @_; - $self->SUPER::check_options(%options); -} - sub manage_selection { my ($self, %options) = @_; diff --git a/apps/wsus/local/mode/serverstatistics.pm b/apps/microsoft/wsus/local/mode/serverstatistics.pm similarity index 98% rename from apps/wsus/local/mode/serverstatistics.pm rename to apps/microsoft/wsus/local/mode/serverstatistics.pm index 4693df03a..57d085b87 100644 --- a/apps/wsus/local/mode/serverstatistics.pm +++ b/apps/microsoft/wsus/local/mode/serverstatistics.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::wsus::local::mode::serverstatistics; +package apps::microsoft::wsus::local::mode::serverstatistics; use base qw(centreon::plugins::templates::counter); @@ -124,11 +124,6 @@ sub new { return $self; } -sub check_options { - my ($self, %options) = @_; - $self->SUPER::check_options(%options); -} - sub manage_selection { my ($self, %options) = @_; diff --git a/apps/wsus/local/mode/synchronisationstatus.pm b/apps/microsoft/wsus/local/mode/synchronisationstatus.pm similarity index 99% rename from apps/wsus/local/mode/synchronisationstatus.pm rename to apps/microsoft/wsus/local/mode/synchronisationstatus.pm index 7ced9a5a8..d3155f8aa 100644 --- a/apps/wsus/local/mode/synchronisationstatus.pm +++ b/apps/microsoft/wsus/local/mode/synchronisationstatus.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::wsus::local::mode::synchronisationstatus; +package apps::microsoft::wsus::local::mode::synchronisationstatus; use base qw(centreon::plugins::templates::counter); @@ -224,7 +224,7 @@ sub new { 'warning-synchronisation-status:s' => { name => 'warning_synchronisation_status', default => '' }, 'critical-synchronisation-status:s' => { name => 'critical_synchronisation_status', default => '' }, 'warning-last-synchronisation-status:s' => { name => 'warning_last_synchronisation_status', default => '' }, - 'critical-last-synchronisation-status:s' => { name => 'critical_last_synchronisation_status', default => '%{status} !~ /Succeeded/' }, + 'critical-last-synchronisation-status:s' => { name => 'critical_last_synchronisation_status', default => '%{status} !~ /Succeeded/' } }); return $self; diff --git a/apps/wsus/local/mode/updatesstatus.pm b/apps/microsoft/wsus/local/mode/updatesstatus.pm similarity index 97% rename from apps/wsus/local/mode/updatesstatus.pm rename to apps/microsoft/wsus/local/mode/updatesstatus.pm index e36451f91..3098ef3d3 100644 --- a/apps/wsus/local/mode/updatesstatus.pm +++ b/apps/microsoft/wsus/local/mode/updatesstatus.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::wsus::local::mode::updatesstatus; +package apps::microsoft::wsus::local::mode::updatesstatus; use base qw(centreon::plugins::templates::counter); @@ -100,17 +100,12 @@ sub new { 'ps-display' => { name => 'ps_display' }, 'wsus-server:s' => { name => 'wsus_server', default => 'localhost' }, 'wsus-port:s' => { name => 'wsus_port', default => 8530 }, - 'use-ssl' => { name => 'use_ssl' }, + 'use-ssl' => { name => 'use_ssl' } }); return $self; } -sub check_options { - my ($self, %options) = @_; - $self->SUPER::check_options(%options); -} - sub manage_selection { my ($self, %options) = @_; diff --git a/apps/wsus/local/plugin.pm b/apps/microsoft/wsus/local/plugin.pm similarity index 71% rename from apps/wsus/local/plugin.pm rename to apps/microsoft/wsus/local/plugin.pm index 8cfdb9c2a..2feb70a7c 100644 --- a/apps/wsus/local/plugin.pm +++ b/apps/microsoft/wsus/local/plugin.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package apps::wsus::local::plugin; +package apps::microsoft::wsus::local::plugin; use strict; use warnings; @@ -30,12 +30,12 @@ sub new { bless $self, $class; $self->{version} = '0.1'; - %{$self->{modes}} = ( - 'computers-status' => 'apps::wsus::local::mode::computersstatus', - 'server-statistics' => 'apps::wsus::local::mode::serverstatistics', - 'synchronisation-status' => 'apps::wsus::local::mode::synchronisationstatus', - 'updates-status' => 'apps::wsus::local::mode::updatesstatus', - ); + $self->{modes} = { + 'computers-status' => 'apps::microsoft::wsus::local::mode::computersstatus', + 'server-statistics' => 'apps::microsoft::wsus::local::mode::serverstatistics', + 'synchronisation-status' => 'apps::microsoft::wsus::local::mode::synchronisationstatus', + 'updates-status' => 'apps::microsoft::wsus::local::mode::updatesstatus' + }; return $self; }