diff --git a/network/paloalto/ssh/custom/cli.pm b/network/paloalto/ssh/custom/cli.pm index 76a6f52b8..bf3cdd5f2 100644 --- a/network/paloalto/ssh/custom/cli.pm +++ b/network/paloalto/ssh/custom/cli.pm @@ -38,7 +38,7 @@ sub new { $options{output}->add_option_msg(short_msg => "Class Custom: Need to specify 'options' argument."); $options{output}->option_exit(); } - + if (!defined($options{noptions})) { $options{options}->add_options(arguments => { 'hostname:s' => { name => 'hostname' }, @@ -106,7 +106,7 @@ sub get_hostname { ############## sub execute_command { my ($self, %options) = @_; - + $self->{ssh_commands} = "set cli op-command-xml-output on\n" . $options{command} . "\n"; diff --git a/network/paloalto/ssh/mode/environment.pm b/network/paloalto/ssh/mode/environment.pm index b26043d5f..0ad8ebb28 100644 --- a/network/paloalto/ssh/mode/environment.pm +++ b/network/paloalto/ssh/mode/environment.pm @@ -27,13 +27,13 @@ use warnings; sub set_system { my ($self, %options) = @_; - + $self->{regexp_threshold_overload_check_section_option} = '^(?:psu|temperature|voltage)$'; $self->{regexp_threshold_numeric_check_section_option} = '^(?:temperature|voltage)$'; - + $self->{cb_hook2} = 'ssh_execute'; - + $self->{thresholds} = { default => [ ['false', 'OK'], @@ -49,7 +49,7 @@ sub set_system { sub ssh_execute { my ($self, %options) = @_; - + ($self->{results}, $self->{exit_code}) = $options{custom}->execute_command( command => 'show system environmentals', ); @@ -59,7 +59,7 @@ sub new { my ($class, %options) = @_; my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_absent => 1, force_new_perfdata => 1); bless $self, $class; - + $options{options}->add_options(arguments => { }); diff --git a/network/paloalto/ssh/mode/ha.pm b/network/paloalto/ssh/mode/ha.pm index cf84a4457..a21a83ff3 100644 --- a/network/paloalto/ssh/mode/ha.pm +++ b/network/paloalto/ssh/mode/ha.pm @@ -140,7 +140,7 @@ sub new { my ($class, %options) = @_; my $self = $class->SUPER::new(package => __PACKAGE__, %options, statefile => 1, force_new_perfdata => 1); bless $self, $class; - + $options{options}->add_options(arguments => { 'unknown-member-status:s' => { name => 'unknown_member_status', default => '' }, 'warning-member-status:s' => { name => 'warning_member_status', default => '' }, @@ -159,7 +159,7 @@ sub new { sub check_options { my ($self, %options) = @_; $self->SUPER::check_options(%options); - + $self->change_macros( macros => [ 'unknown_sync_status', 'warning_sync_status', 'critical_sync_status', diff --git a/network/paloalto/ssh/mode/interfaces.pm b/network/paloalto/ssh/mode/interfaces.pm index 34b654603..5507b4515 100644 --- a/network/paloalto/ssh/mode/interfaces.pm +++ b/network/paloalto/ssh/mode/interfaces.pm @@ -79,7 +79,7 @@ sub new { my ($class, %options) = @_; my $self = $class->SUPER::new(package => __PACKAGE__, %options, force_new_perfdata => 1); bless $self, $class; - + $options{options}->add_options(arguments => { 'filter-name:s' => { name => 'filter_name' }, 'unknown-status:s' => { name => 'unknown_status', default => '' }, @@ -93,7 +93,7 @@ sub new { sub check_options { my ($self, %options) = @_; $self->SUPER::check_options(%options); - + $self->change_macros( macros => [ 'unknown_status', 'warning_status', 'critical_status' diff --git a/network/paloalto/ssh/mode/system.pm b/network/paloalto/ssh/mode/system.pm index ce68cc8cb..094325ca5 100644 --- a/network/paloalto/ssh/mode/system.pm +++ b/network/paloalto/ssh/mode/system.pm @@ -30,14 +30,14 @@ use centreon::plugins::misc; sub custom_status_output { my ($self, %options) = @_; - + my $msg = 'system operational mode: ' . $self->{result_values}->{oper_mode}; return $msg; } sub custom_av_output { my ($self, %options) = @_; - + return sprintf( "antivirus version '%s', last update %s", $self->{result_values}->{av_version_absolute}, @@ -47,7 +47,7 @@ sub custom_av_output { sub custom_threat_output { my ($self, %options) = @_; - + return sprintf( "threat version '%s', last update %s", $self->{result_values}->{threat_version_absolute}, @@ -57,11 +57,11 @@ sub custom_threat_output { sub set_counters { my ($self, %options) = @_; - + $self->{maps_counters_type} = [ { name => 'system', type => 0, message_separator => ' - ' } ]; - + $self->{maps_counters}->{system} = [ { label => 'status', threshold => 0, set => { key_values => [ { name => 'oper_mode' } ], @@ -94,7 +94,7 @@ sub new { my ($class, %options) = @_; my $self = $class->SUPER::new(package => __PACKAGE__, %options, force_new_perfdata => 1); bless $self, $class; - + $options{options}->add_options(arguments => { 'warning-status:s' => { name => 'warning_status', default => '' }, 'critical-status:s' => { name => 'critical_status', default => '%{oper_mode} !~ /normal/i' }, diff --git a/network/paloalto/ssh/mode/vpn.pm b/network/paloalto/ssh/mode/vpn.pm index 3f1baf7ce..74750b9d2 100644 --- a/network/paloalto/ssh/mode/vpn.pm +++ b/network/paloalto/ssh/mode/vpn.pm @@ -79,7 +79,7 @@ sub new { my ($class, %options) = @_; my $self = $class->SUPER::new(package => __PACKAGE__, %options, force_new_perfdata => 1); bless $self, $class; - + $options{options}->add_options(arguments => { 'unknown-status:s' => { name => 'unknown_status', default => '' }, 'warning-status:s' => { name => 'warning_status', default => '' }, @@ -92,7 +92,7 @@ sub new { sub check_options { my ($self, %options) = @_; $self->SUPER::check_options(%options); - + $self->change_macros( macros => [ 'unknown_status', 'warning_status', 'critical_status'