Bug isis avid and storwize

This commit is contained in:
garnier-quentin 2019-03-29 11:30:36 +01:00
parent f1247b8289
commit 46232d0caa
2 changed files with 22 additions and 25 deletions

View File

@ -74,11 +74,11 @@ sub new {
bless $self, $class;
$self->{version} = '1.0';
$options{options}->add_options(arguments =>
{
"warning-status:s" => { name => 'warning_status', default => '' },
"critical-status:s" => { name => 'critical_status', default => '%{status} !~ /Online/i' },
});
$options{options}->add_options(arguments => {
"warning-status:s" => { name => 'warning_status', default => '' },
"critical-status:s" => { name => 'critical_status', default => '%{status} !~ /Online/i' },
});
return $self;
}
@ -86,8 +86,7 @@ sub check_options {
my ($self, %options) = @_;
$self->SUPER::check_options(%options);
$instance_mode = $self;
$self->change_macros('warning_status', 'critical_status');
$self->change_macros(macros => ['warning_status', 'critical_status']);
}
my %map_status = (

View File

@ -138,23 +138,22 @@ sub new {
bless $self, $class;
$self->{version} = '1.0';
$options{options}->add_options(arguments =>
{
"filter-name:s" => { name => 'filter_name' },
"warning-status:s" => { name => 'warning_status', default => '%{status} =~ /degraded/i' },
"critical-status:s" => { name => 'critical_status', default => '%{status} =~ /offline/i' },
"units:s" => { name => 'units', default => '%' },
"free" => { name => 'free' },
"hostname:s" => { name => 'hostname' },
"ssh-option:s@" => { name => 'ssh_option' },
"ssh-path:s" => { name => 'ssh_path' },
"ssh-command:s" => { name => 'ssh_command', default => 'ssh' },
"timeout:s" => { name => 'timeout', default => 30 },
"sudo" => { name => 'sudo' },
"command:s" => { name => 'command' },
"command-path:s" => { name => 'command_path' },
"command-options:s" => { name => 'command_options' },
});
$options{options}->add_options(arguments => {
"filter-name:s" => { name => 'filter_name' },
"warning-status:s" => { name => 'warning_status', default => '%{status} =~ /degraded/i' },
"critical-status:s" => { name => 'critical_status', default => '%{status} =~ /offline/i' },
"units:s" => { name => 'units', default => '%' },
"free" => { name => 'free' },
"hostname:s" => { name => 'hostname' },
"ssh-option:s@" => { name => 'ssh_option' },
"ssh-path:s" => { name => 'ssh_path' },
"ssh-command:s" => { name => 'ssh_command', default => 'ssh' },
"timeout:s" => { name => 'timeout', default => 30 },
"sudo" => { name => 'sudo' },
"command:s" => { name => 'command' },
"command-path:s" => { name => 'command_path' },
"command-options:s" => { name => 'command_options' },
});
return $self;
}
@ -166,7 +165,6 @@ sub check_options {
if (defined($self->{option_results}->{hostname}) && $self->{option_results}->{hostname} ne '') {
$self->{option_results}->{remote} = 1;
}
$instance_mode = $self;
$self->change_macros(macros => ['warning_status', 'critical_status']);
}