diff --git a/storage/synology/mode/hardware.pm b/storage/synology/mode/hardware.pm index 164ec443c..74b9018cc 100644 --- a/storage/synology/mode/hardware.pm +++ b/storage/synology/mode/hardware.pm @@ -93,8 +93,8 @@ sub new { "exclude:s" => { name => 'exclude' }, "component:s" => { name => 'component', default => 'all' }, "no-component:s" => { name => 'no_component' }, - "threshold-overload:s@" => { name => 'threshold_overload' }, - }); + "threshold-overload:s@" => { name => 'threshold_overload' }, + }); $self->{components} = {}; $self->{no_components} = undef; @@ -137,7 +137,7 @@ sub run { $self->{results} = $self->{snmp}->get_leef(oids => [$oid_synoSystempowerStatus, $oid_synoSystemcpuFanStatus, $oid_synoSystemsystemFanStatus], - nothing_quit => 1); + nothing_quit => 1); if ($self->{option_results}->{component} eq 'all') { $self->check_fan_cpu(); @@ -291,8 +291,8 @@ sub check_disk { foreach my $key ($self->{snmp}->oid_lex_sort(keys %$results)) { next if ($key !~ /^$oid_synoDiskdiskStatus\.(\d+)/); - my $index = $1; - $instance = $1; + my $index = $1; + $instance = $1; my $disk_state = $results->{$oid_synoDiskdiskStatus . '.' . $index}; next if ($self->check_exclude(section => 'disk', instance => $instance)); @@ -302,14 +302,13 @@ sub check_disk { $self->{output}->output_add(long_msg => sprintf("Disk '%s' state is %s.", $index, $map_states_disk{$disk_state})); my $exit = $self->get_severity(section => 'disk', value => $map_states_disk{$disk_state}); - if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) { + if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) { $self->{output}->output_add(severity => $exit, short_msg => sprintf("Disk '%s' state is %s.", $index, $map_states_disk{$disk_state})); } } } - 1; __END__ diff --git a/storage/synology/mode/systemstatus.pm b/storage/synology/mode/systemstatus.pm index 3a8e0b267..db922ef78 100644 --- a/storage/synology/mode/systemstatus.pm +++ b/storage/synology/mode/systemstatus.pm @@ -52,7 +52,6 @@ my %map_states_system = ( 2 => 'Failed', ); - sub new { my ($class, %options) = @_; my $self = $class->SUPER::new(package => __PACKAGE__, %options); @@ -73,7 +72,7 @@ sub run { # $options{snmp} = snmp object $self->{snmp} = $options{snmp}; - my $oid_synoSystemsystemStatus = '.1.3.6.1.4.1.6574.1.1.0'; # in Celsius + my $oid_synoSystemsystemStatus = '.1.3.6.1.4.1.6574.1.1.0'; my $result = $self->{snmp}->get_leef(oids => [$oid_synoSystemsystemStatus], nothing_quit => 1); diff --git a/storage/synology/mode/temperature.pm b/storage/synology/mode/temperature.pm index ae645e752..8529dbb76 100644 --- a/storage/synology/mode/temperature.pm +++ b/storage/synology/mode/temperature.pm @@ -39,7 +39,6 @@ use base qw(centreon::plugins::mode); use strict; use warnings; -use Data::Dumper; sub new { my ($class, %options) = @_; diff --git a/storage/synology/mode/ups.pm b/storage/synology/mode/ups.pm index f85f424c0..7bccb23e0 100644 --- a/storage/synology/mode/ups.pm +++ b/storage/synology/mode/ups.pm @@ -39,7 +39,6 @@ use base qw(centreon::plugins::mode); use strict; use warnings; -use Data::Dumper; sub new { my ($class, %options) = @_; @@ -49,8 +48,8 @@ sub new { $self->{version} = '1.0'; $options{options}->add_options(arguments => { - "warning:s" => { name => 'warning' }, - "critical:s" => { name => 'critical' }, + "warning:s" => { name => 'warning' }, + "critical:s" => { name => 'critical' }, }); return $self; }