enhance indent
This commit is contained in:
parent
d156ccabcb
commit
52db696583
|
@ -154,25 +154,24 @@ sub new {
|
|||
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
|
||||
bless $self, $class;
|
||||
|
||||
$options{options}->add_options(arguments =>
|
||||
{
|
||||
"hostname:s" => { name => 'hostname' },
|
||||
"remote" => { name => 'remote' },
|
||||
"ssh-option:s@" => { name => 'ssh_option' },
|
||||
"ssh-path:s" => { name => 'ssh_path' },
|
||||
"ssh-command:s" => { name => 'ssh_command', default => 'ssh' },
|
||||
"timeout:s" => { name => 'timeout', default => 30 },
|
||||
"sudo" => { name => 'sudo' },
|
||||
"command:s" => { name => 'command', default => 'vcconfig' },
|
||||
"command-path:s" => { name => 'command_path', default => '/quadstorvtl/bin' },
|
||||
"command-options:s" => { name => 'command_options', default => '-l -v %{vtl_name}' },
|
||||
"vtl-name:s" => { name => 'vtl_name' },
|
||||
"filter-name:s" => { name => 'filter_name' },
|
||||
"warning-status:s" => { name => 'warning_status', default => '' },
|
||||
"critical-status:s" => { name => 'critical_status', default => '%{status} !~ /active/i' },
|
||||
"units:s" => { name => 'units', default => '%' },
|
||||
"free" => { name => 'free' },
|
||||
});
|
||||
$options{options}->add_options(arguments => {
|
||||
'hostname:s' => { name => 'hostname' },
|
||||
'remote' => { name => 'remote' },
|
||||
'ssh-option:s@' => { name => 'ssh_option' },
|
||||
'ssh-path:s' => { name => 'ssh_path' },
|
||||
'ssh-command:s' => { name => 'ssh_command', default => 'ssh' },
|
||||
'timeout:s' => { name => 'timeout', default => 30 },
|
||||
'sudo' => { name => 'sudo' },
|
||||
'command:s' => { name => 'command', default => 'vcconfig' },
|
||||
'command-path:s' => { name => 'command_path', default => '/quadstorvtl/bin' },
|
||||
'command-options:s' => { name => 'command_options', default => '-l -v %{vtl_name}' },
|
||||
'vtl-name:s' => { name => 'vtl_name' },
|
||||
'filter-name:s' => { name => 'filter_name' },
|
||||
'warning-status:s' => { name => 'warning_status', default => '' },
|
||||
'critical-status:s' => { name => 'critical_status', default => '%{status} !~ /active/i' },
|
||||
'units:s' => { name => 'units', default => '%' },
|
||||
'free' => { name => 'free' },
|
||||
});
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
@ -199,12 +198,15 @@ sub prefix_tape_output {
|
|||
sub manage_selection {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
my ($stdout) = centreon::plugins::misc::execute(output => $self->{output},
|
||||
options => $self->{option_results},
|
||||
sudo => $self->{option_results}->{sudo},
|
||||
command => $self->{option_results}->{command},
|
||||
command_path => $self->{option_results}->{command_path},
|
||||
command_options => $self->{option_results}->{command_options});
|
||||
my ($stdout) = centreon::plugins::misc::execute(
|
||||
output => $self->{output},
|
||||
options => $self->{option_results},
|
||||
sudo => $self->{option_results}->{sudo},
|
||||
command => $self->{option_results}->{command},
|
||||
command_path => $self->{option_results}->{command_path},
|
||||
command_options => $self->{option_results}->{command_options}
|
||||
);
|
||||
|
||||
$self->{global}->{count} = 0;
|
||||
$self->{tape} = {};
|
||||
#Pool Label Element Address Vtype WORM Size Used% Status
|
||||
|
|
|
@ -96,8 +96,8 @@ sub new {
|
|||
bless $self, $class;
|
||||
|
||||
$options{options}->add_options(arguments => {
|
||||
"api-name:s@" => { name => 'api_name' },
|
||||
"filter-metric:s" => { name => 'filter_metric' },
|
||||
'api-name:s@' => { name => 'api_name' },
|
||||
'filter-metric:s' => { name => 'filter_metric' },
|
||||
});
|
||||
|
||||
return $self;
|
||||
|
|
|
@ -97,8 +97,8 @@ sub new {
|
|||
bless $self, $class;
|
||||
|
||||
$options{options}->add_options(arguments => {
|
||||
"api-name:s@" => { name => 'api_name' },
|
||||
"filter-metric:s" => { name => 'filter_metric' },
|
||||
'api-name:s@' => { name => 'api_name' },
|
||||
'filter-metric:s' => { name => 'filter_metric' },
|
||||
});
|
||||
|
||||
return $self;
|
||||
|
|
|
@ -136,8 +136,8 @@ sub new {
|
|||
bless $self, $class;
|
||||
|
||||
$options{options}->add_options(arguments => {
|
||||
"stream-name:s@" => { name => 'stream_name' },
|
||||
"filter-metric:s" => { name => 'filter_metric' },
|
||||
'stream-name:s@' => { name => 'stream_name' },
|
||||
'filter-metric:s' => { name => 'filter_metric' },
|
||||
});
|
||||
|
||||
return $self;
|
||||
|
@ -238,4 +238,4 @@ can be: 'records-get-iteratorage', 'records-get-volume',
|
|||
|
||||
=back
|
||||
|
||||
=cut
|
||||
=cut
|
||||
|
|
|
@ -112,8 +112,8 @@ sub new {
|
|||
bless $self, $class;
|
||||
|
||||
$options{options}->add_options(arguments => {
|
||||
"stream-name:s@" => { name => 'stream_name' },
|
||||
"filter-metric:s" => { name => 'filter_metric' },
|
||||
'stream-name:s@' => { name => 'stream_name' },
|
||||
'filter-metric:s' => { name => 'filter_metric' },
|
||||
});
|
||||
|
||||
return $self;
|
||||
|
@ -214,4 +214,4 @@ can be: 'incoming-bytes', 'incoming-records',
|
|||
|
||||
=back
|
||||
|
||||
=cut
|
||||
=cut
|
||||
|
|
|
@ -84,19 +84,18 @@ sub new {
|
|||
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_absent => 1, no_performance => 1);
|
||||
bless $self, $class;
|
||||
|
||||
$options{options}->add_options(arguments =>
|
||||
{
|
||||
"hostname:s" => { name => 'hostname' },
|
||||
"remote" => { name => 'remote' },
|
||||
"ssh-option:s@" => { name => 'ssh_option' },
|
||||
"ssh-path:s" => { name => 'ssh_path' },
|
||||
"ssh-command:s" => { name => 'ssh_command', default => 'ssh' },
|
||||
"timeout:s" => { name => 'timeout', default => 30 },
|
||||
"sudo" => { name => 'sudo' },
|
||||
"command:s" => { name => 'command', default => 'getreason' },
|
||||
"command-path:s" => { name => 'command_path', default => '/nas/sbin' },
|
||||
"command-options:s" => { name => 'command_options', default => '2>&1' },
|
||||
});
|
||||
$options{options}->add_options(arguments => {
|
||||
'hostname:s' => { name => 'hostname' },
|
||||
'remote' => { name => 'remote' },
|
||||
'ssh-option:s@' => { name => 'ssh_option' },
|
||||
'ssh-path:s' => { name => 'ssh_path' },
|
||||
'ssh-command:s' => { name => 'ssh_command', default => 'ssh' },
|
||||
'timeout:s' => { name => 'timeout', default => 30 },
|
||||
'sudo' => { name => 'sudo' },
|
||||
'command:s' => { name => 'command', default => 'getreason' },
|
||||
'command-path:s' => { name => 'command_path', default => '/nas/sbin' },
|
||||
'command-options:s' => { name => 'command_options', default => '2>&1' },
|
||||
});
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
|
|
@ -31,8 +31,8 @@ sub new {
|
|||
|
||||
$self->{version} = '0.1';
|
||||
%{$self->{modes}} = (
|
||||
'getreason' => 'storage::emc::celerra::local::mode::getreason',
|
||||
);
|
||||
'getreason' => 'storage::emc::celerra::local::mode::getreason',
|
||||
);
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
|
|
@ -32,27 +32,22 @@ sub new {
|
|||
|
||||
$self->{version} = '0.1';
|
||||
%{$self->{modes}} = (
|
||||
'cache' => 'centreon::common::emc::navisphere::mode::cache',
|
||||
'controller' => 'centreon::common::emc::navisphere::mode::controller',
|
||||
'disk' => 'centreon::common::emc::navisphere::mode::disk',
|
||||
'sp' => 'centreon::common::emc::navisphere::mode::sp',
|
||||
'faults' => 'centreon::common::emc::navisphere::mode::faults',
|
||||
'list-luns' => 'centreon::common::emc::navisphere::mode::listluns',
|
||||
'sp-info' => 'centreon::common::emc::navisphere::mode::spinfo',
|
||||
'port-state' => 'centreon::common::emc::navisphere::mode::portstate',
|
||||
'hba-state' => 'centreon::common::emc::navisphere::mode::hbastate',
|
||||
);
|
||||
'cache' => 'centreon::common::emc::navisphere::mode::cache',
|
||||
'controller' => 'centreon::common::emc::navisphere::mode::controller',
|
||||
'disk' => 'centreon::common::emc::navisphere::mode::disk',
|
||||
'sp' => 'centreon::common::emc::navisphere::mode::sp',
|
||||
'faults' => 'centreon::common::emc::navisphere::mode::faults',
|
||||
'list-luns' => 'centreon::common::emc::navisphere::mode::listluns',
|
||||
'sp-info' => 'centreon::common::emc::navisphere::mode::spinfo',
|
||||
'port-state' => 'centreon::common::emc::navisphere::mode::portstate',
|
||||
'hba-state' => 'centreon::common::emc::navisphere::mode::hbastate',
|
||||
);
|
||||
|
||||
$self->{custom_modes}{clariion} = 'centreon::common::emc::navisphere::custom::custom';
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
||||
sub init {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
$self->SUPER::init(%options);
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
|
|
|
@ -143,14 +143,13 @@ sub new {
|
|||
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
|
||||
bless $self, $class;
|
||||
|
||||
$options{options}->add_options(arguments =>
|
||||
{
|
||||
"warning-status:s" => { name => 'warning_status', default => '%{status} =~ /attn/' },
|
||||
"critical-status:s" => { name => 'critical_status', default => '%{status} =~ /down|invalid/' },
|
||||
"units:s" => { name => 'units', default => '%' },
|
||||
"free" => { name => 'free' },
|
||||
});
|
||||
|
||||
$options{options}->add_options(arguments => {
|
||||
'warning-status:s' => { name => 'warning_status', default => '%{status} =~ /attn/' },
|
||||
'critical-status:s' => { name => 'critical_status', default => '%{status} =~ /down|invalid/' },
|
||||
'units:s' => { name => 'units', default => '%' },
|
||||
'free' => { name => 'free' },
|
||||
});
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
||||
|
|
|
@ -58,9 +58,7 @@ sub new {
|
|||
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_absent => 1);
|
||||
bless $self, $class;
|
||||
|
||||
$options{options}->add_options(arguments =>
|
||||
{
|
||||
});
|
||||
$options{options}->add_options(arguments => {});
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
|
|
@ -31,9 +31,9 @@ sub new {
|
|||
|
||||
$self->{version} = '1.0';
|
||||
%{$self->{modes}} = (
|
||||
'cluster-usage' => 'storage::emc::isilon::snmp::mode::clusterusage',
|
||||
'hardware' => 'storage::emc::isilon::snmp::mode::hardware',
|
||||
);
|
||||
'cluster-usage' => 'storage::emc::isilon::snmp::mode::clusterusage',
|
||||
'hardware' => 'storage::emc::isilon::snmp::mode::hardware',
|
||||
);
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
|
|
@ -37,12 +37,11 @@ sub new {
|
|||
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
|
||||
bless $self, $class;
|
||||
|
||||
$options{options}->add_options(arguments =>
|
||||
{
|
||||
"cluster:s" => { name => 'cluster' },
|
||||
"filter:s@" => { name => 'filter' },
|
||||
"threshold-overload:s@" => { name => 'threshold_overload' },
|
||||
});
|
||||
$options{options}->add_options(arguments => {
|
||||
'cluster:s' => { name => 'cluster' },
|
||||
'filter:s@' => { name => 'filter' },
|
||||
'threshold-overload:s@' => { name => 'threshold_overload' },
|
||||
});
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
@ -91,10 +90,12 @@ sub run {
|
|||
my $vplex = $options{custom};
|
||||
|
||||
my $urlbase = '/vplex/clusters/';
|
||||
my $items = $vplex->get_items(url => $urlbase,
|
||||
parent => 'cluster',
|
||||
engine => $self->{option_results}->{cluster},
|
||||
obj => 'storage-elements/storage-volumes');
|
||||
my $items = $vplex->get_items(
|
||||
url => $urlbase,
|
||||
parent => 'cluster',
|
||||
engine => $self->{option_results}->{cluster},
|
||||
obj => 'storage-elements/storage-volumes'
|
||||
);
|
||||
|
||||
$self->{output}->output_add(severity => 'OK',
|
||||
short_msg => 'All storage volumes are OK');
|
||||
|
|
|
@ -31,14 +31,14 @@ sub new {
|
|||
|
||||
$self->{version} = '1.0';
|
||||
%{$self->{modes}} = (
|
||||
'psus' => 'storage::emc::vplex::restapi::mode::psus',
|
||||
'fans' => 'storage::emc::vplex::restapi::mode::fans',
|
||||
'distributed-devices' => 'storage::emc::vplex::restapi::mode::distributeddevices',
|
||||
'cluster-devices' => 'storage::emc::vplex::restapi::mode::clusterdevices',
|
||||
'storage-volumes' => 'storage::emc::vplex::restapi::mode::storagevolumes',
|
||||
'directors' => 'storage::emc::vplex::restapi::mode::directors',
|
||||
'cluster-communication' => 'storage::emc::vplex::restapi::mode::clustercommunication',
|
||||
);
|
||||
'psus' => 'storage::emc::vplex::restapi::mode::psus',
|
||||
'fans' => 'storage::emc::vplex::restapi::mode::fans',
|
||||
'distributed-devices' => 'storage::emc::vplex::restapi::mode::distributeddevices',
|
||||
'cluster-devices' => 'storage::emc::vplex::restapi::mode::clusterdevices',
|
||||
'storage-volumes' => 'storage::emc::vplex::restapi::mode::storagevolumes',
|
||||
'directors' => 'storage::emc::vplex::restapi::mode::directors',
|
||||
'cluster-communication' => 'storage::emc::vplex::restapi::mode::clustercommunication',
|
||||
);
|
||||
|
||||
$self->{custom_modes}{vplexapi} = 'storage::emc::vplex::restapi::custom::vplexapi';
|
||||
return $self;
|
||||
|
|
Loading…
Reference in New Issue