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.
#
package apps::activedirectory::local::mode::dcdiag;
package apps::microsoft::activedirectory::local::mode::dcdiag;
use base qw(centreon::plugins::mode);

View File

@ -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
=cut

View File

@ -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;
}

View File

@ -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
=cut

View File

@ -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;

View File

@ -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);

View File

@ -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 {

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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 {

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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 {

View File

@ -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;

View File

@ -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;

View File

@ -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 {

View File

@ -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 {

View File

@ -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;

View File

@ -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;

View File

@ -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 {

View File

@ -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;

View File

@ -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;
}

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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;
}

View File

@ -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
=cut

View File

@ -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
=cut

View File

@ -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;
}

View File

@ -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

View File

@ -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

View File

@ -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',

View File

@ -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',

View File

@ -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);

View File

@ -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',

View File

@ -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;
}

View File

@ -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;

View File

@ -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);

View File

@ -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;
}

View File

@ -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) = @_;

View File

@ -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) = @_;

View File

@ -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;

View File

@ -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) = @_;

View File

@ -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;
}