enhance typo

This commit is contained in:
garnier-quentin 2019-06-05 13:58:53 +02:00
parent a6695ab73c
commit 06e69db2f0
2 changed files with 22 additions and 22 deletions

View File

@ -33,15 +33,15 @@ sub new {
bless $self, $class; bless $self, $class;
$self->{version} = '1.0'; $self->{version} = '1.0';
$options{options}->add_options(arguments => $options{options}->add_options(arguments => {
{ 'hostname:s' => { name => 'hostname' },
"hostname:s" => { name => 'hostname' }, 'username:s' => { name => 'username' },
"username:s" => { name => 'username' }, 'password:s' => { name => 'password' },
"password:s" => { name => 'password' }, 'timeout:s' => { name => 'timeout', default => 30 },
"timeout:s" => { name => 'timeout', default => 30 }, 'memory' => { name => 'memory' },
"memory" => { name => 'memory' }, 'command-plink:s' => { name => 'command_plink', default => 'plink' },
"command-plink:s" => { name => 'command_plink', default => 'plink' }, });
});
$self->{statefile_cache} = centreon::plugins::statefile->new(%options); $self->{statefile_cache} = centreon::plugins::statefile->new(%options);
return $self; return $self;
} }
@ -77,10 +77,10 @@ sub run {
my $cmd_in = 'show -o table -level all /SP/faultmgmt'; my $cmd_in = 'show -o table -level all /SP/faultmgmt';
my $cmd = "echo '$cmd_in' | " . $self->{option_results}->{command_plink} . " -T -l '" . $self->{option_results}->{username} . "' -batch -pw '" . $self->{option_results}->{password} . "' " . $self->{option_results}->{hostname} . " 2>&1"; my $cmd = "echo '$cmd_in' | " . $self->{option_results}->{command_plink} . " -T -l '" . $self->{option_results}->{username} . "' -batch -pw '" . $self->{option_results}->{password} . "' " . $self->{option_results}->{hostname} . " 2>&1";
my ($lerror, $stdout, $exit_code) = centreon::plugins::misc::backtick( my ($lerror, $stdout, $exit_code) = centreon::plugins::misc::backtick(
command => $cmd, command => $cmd,
timeout => $self->{option_results}->{timeout}, timeout => $self->{option_results}->{timeout},
wait_exit => 1 wait_exit => 1
); );
$stdout =~ s/\r//g; $stdout =~ s/\r//g;
if ($lerror <= -1000) { if ($lerror <= -1000) {
$self->{output}->output_add(severity => 'UNKNOWN', $self->{output}->output_add(severity => 'UNKNOWN',

View File

@ -31,15 +31,15 @@ sub new {
$self->{version} = '0.1'; $self->{version} = '0.1';
%{$self->{modes}} = ( %{$self->{modes}} = (
'show-faulty' => 'hardware::server::sun::mgmt_cards::mode::showfaulty', 'show-faulty' => 'hardware::server::sun::mgmt_cards::mode::showfaulty',
'showfaults' => 'hardware::server::sun::mgmt_cards::mode::showfaults', 'showfaults' => 'hardware::server::sun::mgmt_cards::mode::showfaults',
'showstatus' => 'hardware::server::sun::mgmt_cards::mode::showstatus', 'showstatus' => 'hardware::server::sun::mgmt_cards::mode::showstatus',
'showboards' => 'hardware::server::sun::mgmt_cards::mode::showboards', 'showboards' => 'hardware::server::sun::mgmt_cards::mode::showboards',
'showenvironment' => 'hardware::server::sun::mgmt_cards::mode::showenvironment', 'showenvironment' => 'hardware::server::sun::mgmt_cards::mode::showenvironment',
'environment-v8xx' => 'hardware::server::sun::mgmt_cards::mode::environmentv8xx', 'environment-v8xx' => 'hardware::server::sun::mgmt_cards::mode::environmentv8xx',
'environment-v4xx' => 'hardware::server::sun::mgmt_cards::mode::environmentv4xx', 'environment-v4xx' => 'hardware::server::sun::mgmt_cards::mode::environmentv4xx',
'environment-sf2xx' => 'hardware::server::sun::mgmt_cards::mode::environmentsf2xx', 'environment-sf2xx' => 'hardware::server::sun::mgmt_cards::mode::environmentsf2xx',
); );
return $self; return $self;
} }