move microsoft applications

This commit is contained in:
garnier-quentin 2020-12-17 11:09:53 +01:00
parent 1b662bfec9
commit 6d3ce909a8
59 changed files with 206 additions and 269 deletions

View File

@ -18,7 +18,7 @@
# limitations under the License. # limitations under the License.
# #
package apps::activedirectory::local::mode::dcdiag; package apps::microsoft::activedirectory::local::mode::dcdiag;
use base qw(centreon::plugins::mode); use base qw(centreon::plugins::mode);

View File

@ -18,7 +18,7 @@
# limitations under the License. # limitations under the License.
# #
package apps::activedirectory::local::mode::netdom; package apps::microsoft::activedirectory::local::mode::netdom;
use base qw(centreon::plugins::mode); use base qw(centreon::plugins::mode);
@ -32,12 +32,11 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options); my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class; bless $self, $class;
$options{options}->add_options(arguments => $options{options}->add_options(arguments => {
{ 'domain:s' => { name => 'domain' },
"domain:s" => { name => 'domain', }, 'workstation:s' => { name => 'workstation' },
"workstation:s" => { name => 'workstation' }, 'timeout:s' => { name => 'timeout', default => 30 }
"timeout:s" => { name => 'timeout', default => 30 }, });
});
return $self; return $self;
} }
@ -106,4 +105,4 @@ Set timeout time for command execution (Default: 30 sec)
=back =back
=cut =cut

View File

@ -18,7 +18,7 @@
# limitations under the License. # limitations under the License.
# #
package apps::activedirectory::local::plugin; package apps::microsoft::activedirectory::local::plugin;
use strict; use strict;
use warnings; use warnings;
@ -30,11 +30,11 @@ sub new {
bless $self, $class; bless $self, $class;
$self->{version} = '0.1'; $self->{version} = '0.1';
%{$self->{modes}} = ( $self->{modes} = {
'dcdiag' => 'apps::activedirectory::local::mode::dcdiag', 'dcdiag' => 'apps::microsoft::activedirectory::local::mode::dcdiag',
'dfsr-backlog' => 'apps::activedirectory::local::mode::dfsrbacklog', 'dfsr-backlog' => 'apps::microsoft::activedirectory::local::mode::dfsrbacklog',
'netdom' => 'apps::activedirectory::local::mode::netdom', 'netdom' => 'apps::microsoft::activedirectory::local::mode::netdom'
); };
return $self; return $self;
} }

View File

@ -18,7 +18,7 @@
# limitations under the License. # limitations under the License.
# #
package apps::activedirectory::wsman::mode::dcdiag; package apps::microsoft::activedirectory::wsman::mode::dcdiag;
use base qw(centreon::plugins::mode); use base qw(centreon::plugins::mode);
@ -32,13 +32,13 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options); my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class; bless $self, $class;
$options{options}->add_options(arguments => $options{options}->add_options(arguments => {
{ "config:s" => { name => 'config' },
"config:s" => { name => 'config', }, "language:s" => { name => 'language', default => 'en' },
"language:s" => { name => 'language', default => 'en' }, "dfsr" => { name => 'dfsr' },
"dfsr" => { name => 'dfsr', }, "noeventlog" => { name => 'noeventlog' }
"noeventlog" => { name => 'noeventlog', }, });
});
$self->{os_is2003} = 0; $self->{os_is2003} = 0;
$self->{os_is2008} = 0; $self->{os_is2008} = 0;
$self->{os_is2012} = 0; $self->{os_is2012} = 0;
@ -228,4 +228,4 @@ Don't run the dc tests kccevent, frsevent and dfsrevent
=back =back
=cut =cut

View File

@ -18,7 +18,7 @@
# limitations under the License. # limitations under the License.
# #
package apps::activedirectory::wsman::plugin; package apps::microsoft::activedirectory::wsman::plugin;
use strict; use strict;
use warnings; use warnings;
@ -31,7 +31,7 @@ sub new {
$self->{version} = '0.1'; $self->{version} = '0.1';
%{$self->{modes}} = ( %{$self->{modes}} = (
'dcdiag' => 'apps::activedirectory::wsman::mode::dcdiag', 'dcdiag' => 'apps::microsoft::activedirectory::wsman::mode::dcdiag',
); );
return $self; return $self;

View File

@ -18,7 +18,7 @@
# limitations under the License. # 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); use base qw(centreon::plugins::mode);

View File

@ -18,7 +18,7 @@
# limitations under the License. # 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); use base qw(centreon::plugins::templates::counter);
@ -27,7 +27,7 @@ use warnings;
use centreon::plugins::misc; use centreon::plugins::misc;
use centreon::plugins::templates::catalog_functions qw(catalog_status_threshold_ng); use centreon::plugins::templates::catalog_functions qw(catalog_status_threshold_ng);
use centreon::common::powershell::exchange::2010::databases; 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; use JSON::XS;
sub custom_mailflow_latency_perfdata { sub custom_mailflow_latency_perfdata {

View File

@ -18,7 +18,7 @@
# limitations under the License. # 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); use base qw(centreon::plugins::mode);
@ -46,7 +46,7 @@ sub new {
'warning:s' => { name => 'warning' }, 'warning:s' => { name => 'warning' },
'critical:s' => { name => 'critical', default => '%{result} !~ /Success/i' }, 'critical:s' => { name => 'critical', default => '%{result} !~ /Success/i' },
'mailbox:s' => { name => 'mailbox' }, 'mailbox:s' => { name => 'mailbox' },
'password:s' => { name => 'password' }, 'password:s' => { name => 'password' }
}); });
return $self; return $self;

View File

@ -18,7 +18,7 @@
# limitations under the License. # 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); use base qw(centreon::plugins::mode);
@ -42,7 +42,7 @@ sub new {
'command-path:s' => { name => 'command_path' }, 'command-path:s' => { name => 'command_path' },
'command-options:s' => { name => 'command_options', default => '-InputFormat none -NoLogo -EncodedCommand' }, 'command-options:s' => { name => 'command_options', default => '-InputFormat none -NoLogo -EncodedCommand' },
'ps-exec-only' => { name => 'ps_exec_only' }, '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; return $self;

View File

@ -18,7 +18,7 @@
# limitations under the License. # 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); use base qw(centreon::plugins::mode);
@ -45,7 +45,7 @@ sub new {
'ps-display' => { name => 'ps_display' }, 'ps-display' => { name => 'ps_display' },
'warning:s' => { name => 'warning' }, 'warning:s' => { name => 'warning' },
'critical:s' => { name => 'critical', default => '%{result} !~ /Success/i' }, 'critical:s' => { name => 'critical', default => '%{result} !~ /Success/i' },
'mailbox:s' => { name => 'mailbox' }, 'mailbox:s' => { name => 'mailbox' }
}); });
return $self; return $self;

View File

@ -18,7 +18,7 @@
# limitations under the License. # 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); use base qw(centreon::plugins::mode);
@ -46,7 +46,7 @@ sub new {
'warning:s' => { name => 'warning', }, 'warning:s' => { name => 'warning', },
'critical:s' => { name => 'critical', default => '%{type} !~ /Success|Information/i' }, 'critical:s' => { name => 'critical', default => '%{type} !~ /Success|Information/i' },
'mailbox:s' => { name => 'mailbox' }, 'mailbox:s' => { name => 'mailbox' },
'password:s' => { name => 'password' }, 'password:s' => { name => 'password' }
}); });
return $self; return $self;

View File

@ -18,7 +18,7 @@
# limitations under the License. # 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); use base qw(centreon::plugins::mode);
@ -48,7 +48,7 @@ sub new {
'url:s' => { name => 'url' }, 'url:s' => { name => 'url' },
'mailbox:s' => { name => 'mailbox' }, 'mailbox:s' => { name => 'mailbox' },
'password:s' => { name => 'password' }, 'password:s' => { name => 'password' },
'no-trust-ssl' => { name => 'no_trust_ssl' }, 'no-trust-ssl' => { name => 'no_trust_ssl' }
}); });
return $self; return $self;

View File

@ -18,7 +18,7 @@
# limitations under the License. # 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); use base qw(centreon::plugins::templates::counter);
@ -27,7 +27,7 @@ use warnings;
use centreon::plugins::misc; use centreon::plugins::misc;
use centreon::plugins::templates::catalog_functions qw(catalog_status_threshold_ng); use centreon::plugins::templates::catalog_functions qw(catalog_status_threshold_ng);
use centreon::common::powershell::exchange::2010::queues; 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; use JSON::XS;
sub custom_status_output { sub custom_status_output {

View File

@ -18,7 +18,7 @@
# limitations under the License. # 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); use base qw(centreon::plugins::mode);
@ -44,7 +44,7 @@ sub new {
'ps-exec-only' => { name => 'ps_exec_only', }, 'ps-exec-only' => { name => 'ps_exec_only', },
'ps-display' => { name => 'ps_display' }, 'ps-display' => { name => 'ps_display' },
'warning:s' => { name => 'warning', }, 'warning:s' => { name => 'warning', },
'critical:s' => { name => 'critical', default => '%{result} !~ /Passed/i' }, 'critical:s' => { name => 'critical', default => '%{result} !~ /Passed/i' }
}); });
return $self; return $self;

View File

@ -18,7 +18,7 @@
# limitations under the License. # limitations under the License.
# #
package apps::exchange::2010::local::mode::resources::types; package apps::microsoft::exchange::2010::local::mode::resources::types;
use strict; use strict;
use warnings; use warnings;

View File

@ -18,7 +18,7 @@
# limitations under the License. # 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); use base qw(centreon::plugins::mode);
@ -44,7 +44,7 @@ sub new {
'ps-exec-only' => { name => 'ps_exec_only' }, 'ps-exec-only' => { name => 'ps_exec_only' },
'ps-display' => { name => 'ps_display' }, 'ps-display' => { name => 'ps_display' },
'warning:s' => { name => 'warning' }, '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; return $self;

View File

@ -18,7 +18,7 @@
# limitations under the License. # limitations under the License.
# #
package apps::exchange::2010::local::plugin; package apps::microsoft::exchange::2010::local::plugin;
use strict; use strict;
use warnings; use warnings;
@ -31,16 +31,16 @@ sub new {
$self->{version} = '0.1'; $self->{version} = '0.1';
$self->{modes} = { $self->{modes} = {
'activesync-mailbox' => 'apps::exchange::2010::local::mode::activesyncmailbox', 'activesync-mailbox' => 'apps::microsoft::exchange::2010::local::mode::activesyncmailbox',
'databases' => 'apps::exchange::2010::local::mode::databases', 'databases' => 'apps::microsoft::exchange::2010::local::mode::databases',
'list-databases' => 'apps::exchange::2010::local::mode::listdatabases', 'list-databases' => 'apps::microsoft::exchange::2010::local::mode::listdatabases',
'imap-mailbox' => 'apps::exchange::2010::local::mode::imapmailbox', 'imap-mailbox' => 'apps::microsoft::exchange::2010::local::mode::imapmailbox',
'mapi-mailbox' => 'apps::exchange::2010::local::mode::mapimailbox', 'mapi-mailbox' => 'apps::microsoft::exchange::2010::local::mode::mapimailbox',
'outlook-webservices' => 'apps::exchange::2010::local::mode::outlookwebservices', 'outlook-webservices' => 'apps::microsoft::exchange::2010::local::mode::outlookwebservices',
'owa-mailbox' => 'apps::exchange::2010::local::mode::owamailbox', 'owa-mailbox' => 'apps::microsoft::exchange::2010::local::mode::owamailbox',
'queues' => 'apps::exchange::2010::local::mode::queues', 'queues' => 'apps::microsoft::exchange::2010::local::mode::queues',
'replication-health' => 'apps::exchange::2010::local::mode::replicationhealth', 'replication-health' => 'apps::microsoft::exchange::2010::local::mode::replicationhealth',
'services' => 'apps::exchange::2010::local::mode::services' 'services' => 'apps::microsoft::exchange::2010::local::mode::services'
}; };
return $self; return $self;

View File

@ -18,7 +18,7 @@
# limitations under the License. # 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); use base qw(centreon::plugins::mode);
@ -26,7 +26,7 @@ use strict;
use warnings; use warnings;
use centreon::plugins::misc; use centreon::plugins::misc;
use centreon::common::powershell::hyperv::2012::listnodevms; 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; use JSON::XS;
sub new { sub new {

View File

@ -18,7 +18,7 @@
# limitations under the License. # 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); use base qw(centreon::plugins::templates::counter);
@ -26,7 +26,7 @@ use strict;
use warnings; use warnings;
use centreon::plugins::misc; use centreon::plugins::misc;
use centreon::common::powershell::hyperv::2012::nodeintegrationservice; 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 centreon::plugins::templates::catalog_functions qw(catalog_status_threshold);
use JSON::XS; use JSON::XS;

View File

@ -18,7 +18,7 @@
# limitations under the License. # 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); use base qw(centreon::plugins::templates::counter);
@ -26,7 +26,7 @@ use strict;
use warnings; use warnings;
use centreon::plugins::misc; use centreon::plugins::misc;
use centreon::common::powershell::hyperv::2012::nodereplication; 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 centreon::plugins::templates::catalog_functions qw(catalog_status_threshold);
use JSON::XS; use JSON::XS;

View File

@ -18,7 +18,7 @@
# limitations under the License. # 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); use base qw(centreon::plugins::templates::counter);
@ -26,7 +26,7 @@ use strict;
use warnings; use warnings;
use centreon::plugins::misc; use centreon::plugins::misc;
use centreon::common::powershell::hyperv::2012::nodesnapshot; 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; use JSON::XS;
sub set_counters { sub set_counters {

View File

@ -18,7 +18,7 @@
# limitations under the License. # 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); use base qw(centreon::plugins::templates::counter);
@ -27,7 +27,7 @@ use warnings;
use centreon::plugins::misc; use centreon::plugins::misc;
use centreon::common::powershell::hyperv::2012::nodevmstatus; use centreon::common::powershell::hyperv::2012::nodevmstatus;
use centreon::plugins::templates::catalog_functions qw(catalog_status_threshold); 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; use JSON::XS;
sub custom_status_output { sub custom_status_output {

View File

@ -18,7 +18,7 @@
# limitations under the License. # limitations under the License.
# #
package apps::hyperv::2012::local::mode::resources::types; package apps::microsoft::hyperv::2012::local::mode::resources::types;
use strict; use strict;
use warnings; use warnings;

View File

@ -18,7 +18,7 @@
# limitations under the License. # 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); use base qw(centreon::plugins::templates::counter);
@ -26,7 +26,7 @@ use strict;
use warnings; use warnings;
use centreon::plugins::misc; use centreon::plugins::misc;
use centreon::common::powershell::hyperv::2012::scvmmintegrationservice; 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 centreon::plugins::templates::catalog_functions qw(catalog_status_threshold);
use JSON::XS; use JSON::XS;

View File

@ -18,7 +18,7 @@
# limitations under the License. # 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); use base qw(centreon::plugins::templates::counter);
@ -26,7 +26,7 @@ use strict;
use warnings; use warnings;
use centreon::plugins::misc; use centreon::plugins::misc;
use centreon::common::powershell::hyperv::2012::scvmmsnapshot; 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; use JSON::XS;
sub set_counters { sub set_counters {

View File

@ -18,7 +18,7 @@
# limitations under the License. # 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); use base qw(centreon::plugins::templates::counter);
@ -26,7 +26,7 @@ use strict;
use warnings; use warnings;
use centreon::plugins::misc; use centreon::plugins::misc;
use centreon::common::powershell::hyperv::2012::scvmmvmstatus; 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 centreon::plugins::templates::catalog_functions qw(catalog_status_threshold);
use JSON::XS; use JSON::XS;

View File

@ -18,7 +18,7 @@
# limitations under the License. # limitations under the License.
# #
package apps::hyperv::2012::local::plugin; package apps::microsoft::hyperv::2012::local::plugin;
use strict; use strict;
use warnings; use warnings;
@ -30,16 +30,16 @@ sub new {
bless $self, $class; bless $self, $class;
$self->{version} = '0.1'; $self->{version} = '0.1';
%{$self->{modes}} = ( $self->{modes} = {
'list-node-vms' => 'apps::hyperv::2012::local::mode::listnodevms', 'list-node-vms' => 'apps::microsoft::hyperv::2012::local::mode::listnodevms',
'node-integration-service' => 'apps::hyperv::2012::local::mode::nodeintegrationservice', 'node-integration-service' => 'apps::microsoft::hyperv::2012::local::mode::nodeintegrationservice',
'node-replication' => 'apps::hyperv::2012::local::mode::nodereplication', 'node-replication' => 'apps::microsoft::hyperv::2012::local::mode::nodereplication',
'node-snapshot' => 'apps::hyperv::2012::local::mode::nodesnapshot', 'node-snapshot' => 'apps::microsoft::hyperv::2012::local::mode::nodesnapshot',
'node-vm-status' => 'apps::hyperv::2012::local::mode::nodevmstatus', 'node-vm-status' => 'apps::microsoft::hyperv::2012::local::mode::nodevmstatus',
'scvmm-integration-service' => 'apps::hyperv::2012::local::mode::scvmmintegrationservice', 'scvmm-integration-service' => 'apps::microsoft::hyperv::2012::local::mode::scvmmintegrationservice',
'scvmm-snapshot' => 'apps::hyperv::2012::local::mode::scvmmsnapshot', 'scvmm-snapshot' => 'apps::microsoft::hyperv::2012::local::mode::scvmmsnapshot',
'scvmm-vm-status' => 'apps::hyperv::2012::local::mode::scvmmvmstatus', 'scvmm-vm-status' => 'apps::microsoft::hyperv::2012::local::mode::scvmmvmstatus'
); };
return $self; return $self;
} }

View File

@ -18,7 +18,7 @@
# limitations under the License. # limitations under the License.
# #
package apps::iis::local::mode::applicationpoolstate; package apps::microsoft::iis::local::mode::applicationpoolstate;
use base qw(centreon::plugins::templates::counter); use base qw(centreon::plugins::templates::counter);

View File

@ -18,7 +18,7 @@
# limitations under the License. # limitations under the License.
# #
package apps::iis::local::mode::listapplicationpools; package apps::microsoft::iis::local::mode::listapplicationpools;
use base qw(centreon::plugins::mode); use base qw(centreon::plugins::mode);

View File

@ -18,7 +18,7 @@
# limitations under the License. # limitations under the License.
# #
package apps::iis::local::mode::listsites; package apps::microsoft::iis::local::mode::listsites;
use base qw(centreon::plugins::mode); use base qw(centreon::plugins::mode);

View File

@ -18,7 +18,7 @@
# limitations under the License. # limitations under the License.
# #
package apps::iis::local::mode::webservicestatistics; package apps::microsoft::iis::local::mode::webservicestatistics;
use base qw(centreon::plugins::templates::counter); use base qw(centreon::plugins::templates::counter);

View File

@ -18,7 +18,7 @@
# limitations under the License. # limitations under the License.
# #
package apps::iis::local::plugin; package apps::microsoft::iis::local::plugin;
use strict; use strict;
use warnings; use warnings;
@ -31,10 +31,10 @@ sub new {
$self->{version} = '0.1'; $self->{version} = '0.1';
$self->{modes} = { $self->{modes} = {
'applicationpool-state' => 'apps::iis::local::mode::applicationpoolstate', 'applicationpool-state' => 'apps::microsoft::iis::local::mode::applicationpoolstate',
'list-applicationpools' => 'apps::iis::local::mode::listapplicationpools', 'list-applicationpools' => 'apps::microsoft::iis::local::mode::listapplicationpools',
'list-sites' => 'apps::iis::local::mode::listsites', 'list-sites' => 'apps::microsoft::iis::local::mode::listsites',
'webservice-statistics' => 'apps::iis::local::mode::webservicestatistics' 'webservice-statistics' => 'apps::microsoft::iis::local::mode::webservicestatistics'
}; };
return $self; return $self;

View File

@ -18,7 +18,7 @@
# limitations under the License. # limitations under the License.
# #
package apps::iis::restapi::custom::api; package apps::microsoft::iis::restapi::custom::api;
use strict; use strict;
use warnings; use warnings;

View File

@ -18,7 +18,7 @@
# limitations under the License. # limitations under the License.
# #
package apps::iis::restapi::mode::applicationpools; package apps::microsoft::iis::restapi::mode::applicationpools;
use base qw(centreon::plugins::templates::counter); use base qw(centreon::plugins::templates::counter);

View File

@ -18,7 +18,7 @@
# limitations under the License. # limitations under the License.
# #
package apps::iis::restapi::mode::listapplicationpools; package apps::microsoft::iis::restapi::mode::listapplicationpools;
use base qw(centreon::plugins::mode); use base qw(centreon::plugins::mode);

View File

@ -18,7 +18,7 @@
# limitations under the License. # limitations under the License.
# #
package apps::iis::restapi::mode::listwebsites; package apps::microsoft::iis::restapi::mode::listwebsites;
use base qw(centreon::plugins::mode); use base qw(centreon::plugins::mode);

View File

@ -18,7 +18,7 @@
# limitations under the License. # limitations under the License.
# #
package apps::iis::restapi::mode::websites; package apps::microsoft::iis::restapi::mode::websites;
use base qw(centreon::plugins::templates::counter); use base qw(centreon::plugins::templates::counter);

View File

@ -18,7 +18,7 @@
# limitations under the License. # limitations under the License.
# #
package apps::iis::restapi::plugin; package apps::microsoft::iis::restapi::plugin;
use strict; use strict;
use warnings; use warnings;
@ -31,13 +31,13 @@ sub new {
$self->{version} = '0.1'; $self->{version} = '0.1';
$self->{modes} = { $self->{modes} = {
'application-pools' => 'apps::iis::restapi::mode::applicationpools', 'application-pools' => 'apps::microsoft::iis::restapi::mode::applicationpools',
'list-application-pools' => 'apps::iis::restapi::mode::listapplicationpools', 'list-application-pools' => 'apps::microsoft::iis::restapi::mode::listapplicationpools',
'list-websites' => 'apps::iis::restapi::mode::listwebsites', 'list-websites' => 'apps::microsoft::iis::restapi::mode::listwebsites',
'websites' => 'apps::iis::restapi::mode::websites' '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; return $self;
} }

View File

@ -18,7 +18,7 @@
# limitations under the License. # limitations under the License.
# #
package apps::iis::wsman::mode::applicationpoolstate; package apps::microsoft::iis::wsman::mode::applicationpoolstate;
use base qw(centreon::plugins::mode); use base qw(centreon::plugins::mode);
@ -37,14 +37,14 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options); my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class; bless $self, $class;
$options{options}->add_options(arguments => $options{options}->add_options(arguments => {
{ "warning" => { name => 'warning' },
"warning" => { name => 'warning', }, "critical" => { name => 'critical' },
"critical" => { name => 'critical', }, "pools:s" => { name => 'pools' },
"pools:s" => { name => 'pools', }, "auto" => { name => 'auto' },
"auto" => { name => 'auto', }, "exclude:s" => { name => 'exclude' }
"exclude:s" => { name => 'exclude', }, });
});
$self->{pools_rules} = {}; $self->{pools_rules} = {};
$self->{wql_filter} = ''; $self->{wql_filter} = '';
$self->{threshold} = 'CRITICAL'; $self->{threshold} = 'CRITICAL';
@ -205,4 +205,4 @@ Exclude some pool for --auto option (Can be a regexp).
=back =back
=cut =cut

View File

@ -18,7 +18,7 @@
# limitations under the License. # limitations under the License.
# #
package apps::iis::wsman::mode::listapplicationpools; package apps::microsoft::iis::wsman::mode::listapplicationpools;
use base qw(centreon::plugins::mode); use base qw(centreon::plugins::mode);
@ -142,4 +142,4 @@ Filter application pool state. Regexp can be used.
=back =back
=cut =cut

View File

@ -18,7 +18,7 @@
# limitations under the License. # limitations under the License.
# #
package apps::iis::wsman::plugin; package apps::microsoft::iis::wsman::plugin;
use strict; use strict;
use warnings; use warnings;
@ -30,10 +30,10 @@ sub new {
bless $self, $class; bless $self, $class;
$self->{version} = '0.1'; $self->{version} = '0.1';
%{$self->{modes}} = ( $self->{modes} = {
'applicationpool-state' => 'apps::iis::wsman::mode::applicationpoolstate', 'applicationpool-state' => 'apps::microsoft::iis::wsman::mode::applicationpoolstate',
'list-applicationpools' => 'apps::iis::wsman::mode::listapplicationpools', 'list-applicationpools' => 'apps::microsoft::iis::wsman::mode::listapplicationpools'
); };
return $self; return $self;
} }

View File

@ -18,7 +18,7 @@
# limitations under the License. # limitations under the License.
# #
package apps::cluster::mscs::local::mode::listnodes; package apps::microsoft::mscs::local::mode::listnodes;
use base qw(centreon::plugins::mode); use base qw(centreon::plugins::mode);
@ -31,10 +31,10 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options); my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class; bless $self, $class;
$options{options}->add_options(arguments => $options{options}->add_options(arguments => {
{ 'filter-name:s' => { name => 'filter_name' }
"filter-name:s" => { name => 'filter_name' }, });
});
return $self; return $self;
} }
@ -124,4 +124,4 @@ Filter node name (can be a regexp).
=back =back
=cut =cut

View File

@ -18,7 +18,7 @@
# limitations under the License. # limitations under the License.
# #
package apps::cluster::mscs::local::mode::listresources; package apps::microsoft::mscs::local::mode::listresources;
use base qw(centreon::plugins::mode); use base qw(centreon::plugins::mode);
@ -31,10 +31,10 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options); my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class; bless $self, $class;
$options{options}->add_options(arguments => $options{options}->add_options(arguments => {
{ 'filter-name:s' => { name => 'filter_name' }
"filter-name:s" => { name => 'filter_name' }, });
});
return $self; return $self;
} }
@ -146,4 +146,4 @@ Filter resource name (can be a regexp).
=back =back
=cut =cut

View File

@ -18,14 +18,14 @@
# limitations under the License. # 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 base qw(centreon::plugins::templates::counter);
use strict; use strict;
use warnings; use warnings;
use Win32::OLE; 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 { sub set_counters {
my ($self, %options) = @_; my ($self, %options) = @_;
@ -35,14 +35,18 @@ sub set_counters {
]; ];
$self->{maps_counters}->{network} = [ $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' } ], key_values => [ { name => 'state' }, { name => 'display' } ],
closure_custom_calc => $self->can('custom_status_calc'),
closure_custom_output => $self->can('custom_status_output'), closure_custom_output => $self->can('custom_status_output'),
closure_custom_perfdata => sub { return 0; }, 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; 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 { sub prefix_network_output {
my ($self, %options) = @_; my ($self, %options) = @_;
@ -72,24 +68,13 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options); my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class; bless $self, $class;
$options{options}->add_options(arguments => $options{options}->add_options(arguments => {
{ 'filter-name:s' => { name => 'filter_name' }
"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/' },
});
return $self; 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 = ( my %map_state = (
-1 => 'unknown', -1 => 'unknown',
0 => 'unavailable', 0 => 'unavailable',

View File

@ -18,14 +18,14 @@
# limitations under the License. # 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 base qw(centreon::plugins::templates::counter);
use strict; use strict;
use warnings; use warnings;
use Win32::OLE; 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 { sub set_counters {
my ($self, %options) = @_; my ($self, %options) = @_;
@ -35,30 +35,26 @@ sub set_counters {
]; ];
$self->{maps_counters}->{node} = [ $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' } ], key_values => [ { name => 'state' }, { name => 'display' } ],
closure_custom_calc => $self->can('custom_status_calc'),
closure_custom_output => $self->can('custom_status_output'), closure_custom_output => $self->can('custom_status_output'),
closure_custom_perfdata => sub { return 0; }, 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 { sub custom_status_output {
my ($self, %options) = @_; my ($self, %options) = @_;
my $msg = 'state : ' . $self->{result_values}->{state}; return '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;
} }
sub prefix_node_output { sub prefix_node_output {
@ -72,24 +68,13 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options); my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class; bless $self, $class;
$options{options}->add_options(arguments => $options{options}->add_options(arguments => {
{ 'filter-name:s' => { name => 'filter_name' }
"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/' },
});
return $self; 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 = ( my %map_state = (
-1 => 'unknown', -1 => 'unknown',
0 => 'up', 0 => 'up',

View File

@ -18,7 +18,7 @@
# limitations under the License. # 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); use base qw(centreon::plugins::templates::counter);

View File

@ -18,14 +18,14 @@
# limitations under the License. # 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 base qw(centreon::plugins::templates::counter);
use strict; use strict;
use warnings; use warnings;
use Win32::OLE; 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 { sub set_counters {
my ($self, %options) = @_; my ($self, %options) = @_;
@ -35,31 +35,25 @@ sub set_counters {
]; ];
$self->{maps_counters}->{resource} = [ $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' } ], 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_output => $self->can('custom_status_output'),
closure_custom_perfdata => sub { return 0; }, 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 { sub custom_status_output {
my ($self, %options) = @_; my ($self, %options) = @_;
my $msg = 'state : ' . $self->{result_values}->{state} . ' [node: ' . $self->{result_values}->{owner_node} . ']'; return '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;
} }
sub prefix_resource_output { sub prefix_resource_output {
@ -73,24 +67,13 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options); my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class; bless $self, $class;
$options{options}->add_options(arguments => $options{options}->add_options(arguments => {
{ 'filter-name:s' => { name => 'filter_name' }
"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/' },
});
return $self; 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 = ( my %map_state = (
-1 => 'unknown', -1 => 'unknown',
0 => 'inherited', 0 => 'inherited',

View File

@ -18,7 +18,7 @@
# limitations under the License. # limitations under the License.
# #
package apps::cluster::mscs::local::plugin; package apps::microsoft::mscs::local::plugin;
use strict; use strict;
use warnings; use warnings;
@ -30,14 +30,14 @@ sub new {
bless $self, $class; bless $self, $class;
$self->{version} = '0.1'; $self->{version} = '0.1';
%{$self->{modes}} = ( $self->{modes} = {
'list-nodes' => 'apps::cluster::mscs::local::mode::listnodes', 'list-nodes' => 'apps::microsoft::mscs::local::mode::listnodes',
'list-resources' => 'apps::cluster::mscs::local::mode::listresources', 'list-resources' => 'apps::microsoft::mscs::local::mode::listresources',
'network-status' => 'apps::cluster::mscs::local::mode::networkstatus', 'network-status' => 'apps::microsoft::mscs::local::mode::networkstatus',
'node-status' => 'apps::cluster::mscs::local::mode::nodestatus', 'node-status' => 'apps::microsoft::mscs::local::mode::nodestatus',
'resource-status' => 'apps::cluster::mscs::local::mode::resourcestatus', 'resource-status' => 'apps::microsoft::mscs::local::mode::resourcestatus',
'resourcegroup-status' => 'apps::cluster::mscs::local::mode::resourcegroupstatus', 'resourcegroup-status' => 'apps::microsoft::mscs::local::mode::resourcegroupstatus'
); };
return $self; return $self;
} }

View File

@ -18,7 +18,7 @@
# limitations under the License. # limitations under the License.
# #
package apps::sccm::local::mode::databasereplicationstatus; package apps::microsoft::sccm::local::mode::databasereplicationstatus;
use base qw(centreon::plugins::templates::counter); use base qw(centreon::plugins::templates::counter);
@ -156,7 +156,7 @@ sub new {
'critical-link-status:s' => { name => 'critical_link_status', default => '' }, 'critical-link-status:s' => { name => 'critical_link_status', default => '' },
'warning-site-status:s' => { name => 'warning_site_status', default => '' }, 'warning-site-status:s' => { name => 'warning_site_status', default => '' },
'critical-site-status:s' => { name => 'critical_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; return $self;

View File

@ -18,7 +18,7 @@
# limitations under the License. # limitations under the License.
# #
package apps::sccm::local::mode::sitestatus; package apps::microsoft::sccm::local::mode::sitestatus;
use base qw(centreon::plugins::templates::counter); use base qw(centreon::plugins::templates::counter);

View File

@ -18,7 +18,7 @@
# limitations under the License. # limitations under the License.
# #
package apps::sccm::local::plugin; package apps::microsoft::sccm::local::plugin;
use strict; use strict;
use warnings; use warnings;
@ -30,10 +30,10 @@ sub new {
bless $self, $class; bless $self, $class;
$self->{version} = '0.1'; $self->{version} = '0.1';
%{$self->{modes}} = ( $self->{modes} = {
'database-replication-status' => 'apps::sccm::local::mode::databasereplicationstatus', 'database-replication-status' => 'apps::microsoft::sccm::local::mode::databasereplicationstatus',
'site-status' => 'apps::sccm::local::mode::sitestatus', 'site-status' => 'apps::microsoft::sccm::local::mode::sitestatus'
); };
return $self; return $self;
} }

View File

@ -18,7 +18,7 @@
# limitations under the License. # limitations under the License.
# #
package apps::wsus::local::mode::computersstatus; package apps::microsoft::wsus::local::mode::computersstatus;
use base qw(centreon::plugins::templates::counter); use base qw(centreon::plugins::templates::counter);
@ -107,11 +107,6 @@ sub new {
return $self; return $self;
} }
sub check_options {
my ($self, %options) = @_;
$self->SUPER::check_options(%options);
}
sub manage_selection { sub manage_selection {
my ($self, %options) = @_; my ($self, %options) = @_;

View File

@ -18,7 +18,7 @@
# limitations under the License. # limitations under the License.
# #
package apps::wsus::local::mode::serverstatistics; package apps::microsoft::wsus::local::mode::serverstatistics;
use base qw(centreon::plugins::templates::counter); use base qw(centreon::plugins::templates::counter);
@ -124,11 +124,6 @@ sub new {
return $self; return $self;
} }
sub check_options {
my ($self, %options) = @_;
$self->SUPER::check_options(%options);
}
sub manage_selection { sub manage_selection {
my ($self, %options) = @_; my ($self, %options) = @_;

View File

@ -18,7 +18,7 @@
# limitations under the License. # limitations under the License.
# #
package apps::wsus::local::mode::synchronisationstatus; package apps::microsoft::wsus::local::mode::synchronisationstatus;
use base qw(centreon::plugins::templates::counter); use base qw(centreon::plugins::templates::counter);
@ -224,7 +224,7 @@ sub new {
'warning-synchronisation-status:s' => { name => 'warning_synchronisation_status', default => '' }, 'warning-synchronisation-status:s' => { name => 'warning_synchronisation_status', default => '' },
'critical-synchronisation-status:s' => { name => 'critical_synchronisation_status', default => '' }, 'critical-synchronisation-status:s' => { name => 'critical_synchronisation_status', default => '' },
'warning-last-synchronisation-status:s' => { name => 'warning_last_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; return $self;

View File

@ -18,7 +18,7 @@
# limitations under the License. # limitations under the License.
# #
package apps::wsus::local::mode::updatesstatus; package apps::microsoft::wsus::local::mode::updatesstatus;
use base qw(centreon::plugins::templates::counter); use base qw(centreon::plugins::templates::counter);
@ -100,17 +100,12 @@ sub new {
'ps-display' => { name => 'ps_display' }, 'ps-display' => { name => 'ps_display' },
'wsus-server:s' => { name => 'wsus_server', default => 'localhost' }, 'wsus-server:s' => { name => 'wsus_server', default => 'localhost' },
'wsus-port:s' => { name => 'wsus_port', default => 8530 }, 'wsus-port:s' => { name => 'wsus_port', default => 8530 },
'use-ssl' => { name => 'use_ssl' }, 'use-ssl' => { name => 'use_ssl' }
}); });
return $self; return $self;
} }
sub check_options {
my ($self, %options) = @_;
$self->SUPER::check_options(%options);
}
sub manage_selection { sub manage_selection {
my ($self, %options) = @_; my ($self, %options) = @_;

View File

@ -18,7 +18,7 @@
# limitations under the License. # limitations under the License.
# #
package apps::wsus::local::plugin; package apps::microsoft::wsus::local::plugin;
use strict; use strict;
use warnings; use warnings;
@ -30,12 +30,12 @@ sub new {
bless $self, $class; bless $self, $class;
$self->{version} = '0.1'; $self->{version} = '0.1';
%{$self->{modes}} = ( $self->{modes} = {
'computers-status' => 'apps::wsus::local::mode::computersstatus', 'computers-status' => 'apps::microsoft::wsus::local::mode::computersstatus',
'server-statistics' => 'apps::wsus::local::mode::serverstatistics', 'server-statistics' => 'apps::microsoft::wsus::local::mode::serverstatistics',
'synchronisation-status' => 'apps::wsus::local::mode::synchronisationstatus', 'synchronisation-status' => 'apps::microsoft::wsus::local::mode::synchronisationstatus',
'updates-status' => 'apps::wsus::local::mode::updatesstatus', 'updates-status' => 'apps::microsoft::wsus::local::mode::updatesstatus'
); };
return $self; return $self;
} }