diff --git a/network/aruba/common/mode/components/fan.pm b/centreon/common/aruba/snmp/mode/components/fan.pm similarity index 98% rename from network/aruba/common/mode/components/fan.pm rename to centreon/common/aruba/snmp/mode/components/fan.pm index e3dabce0b..83f611483 100644 --- a/network/aruba/common/mode/components/fan.pm +++ b/centreon/common/aruba/snmp/mode/components/fan.pm @@ -33,7 +33,7 @@ # #################################################################################### -package network::aruba::common::mode::components::fan; +package centreon::common::aruba::snmp::mode::components::fan; use strict; use warnings; diff --git a/network/aruba/common/mode/components/module.pm b/centreon/common/aruba/snmp/mode/components/module.pm similarity index 98% rename from network/aruba/common/mode/components/module.pm rename to centreon/common/aruba/snmp/mode/components/module.pm index b5138d097..7d66ad17f 100644 --- a/network/aruba/common/mode/components/module.pm +++ b/centreon/common/aruba/snmp/mode/components/module.pm @@ -33,7 +33,7 @@ # #################################################################################### -package network::aruba::common::mode::components::module; +package centreon::common::aruba::snmp::mode::components::module; use strict; use warnings; diff --git a/network/aruba/common/mode/components/psu.pm b/centreon/common/aruba/snmp/mode/components/psu.pm similarity index 98% rename from network/aruba/common/mode/components/psu.pm rename to centreon/common/aruba/snmp/mode/components/psu.pm index ffee3ec13..a0f757bda 100644 --- a/network/aruba/common/mode/components/psu.pm +++ b/centreon/common/aruba/snmp/mode/components/psu.pm @@ -33,7 +33,7 @@ # #################################################################################### -package network::aruba::common::mode::components::psu; +package centreon::common::aruba::snmp::mode::components::psu; use strict; use warnings; diff --git a/network/aruba/common/mode/cpu.pm b/centreon/common/aruba/snmp/mode/cpu.pm similarity index 91% rename from network/aruba/common/mode/cpu.pm rename to centreon/common/aruba/snmp/mode/cpu.pm index f17f5275c..6dd68f0e6 100644 --- a/network/aruba/common/mode/cpu.pm +++ b/centreon/common/aruba/snmp/mode/cpu.pm @@ -33,7 +33,7 @@ # #################################################################################### -package network::aruba::common::mode::cpu; +package centreon::common::aruba::snmp::mode::cpu; use base qw(centreon::plugins::mode); @@ -60,12 +60,12 @@ sub check_options { $self->SUPER::init(%options); if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{option_results}->{warning})) == 0) { - $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'."); - $self->{output}->option_exit(); + $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'."); + $self->{output}->option_exit(); } if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) { - $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'."); - $self->{output}->option_exit(); + $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'."); + $self->{output}->option_exit(); } } @@ -90,7 +90,7 @@ sub run { my $descr = $result->{$oid_sysExtProcessorDescr . '.' . $instance}; my $exit = $self->{perfdata}->threshold_check(value => $load, - threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]); + threshold => [ { label => 'critical', exit_litteral => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]); $self->{output}->output_add(long_msg => sprintf("CPU '%s': %.2f%% (1min)", $descr, $load)); diff --git a/network/aruba/common/mode/hardware.pm b/centreon/common/aruba/snmp/mode/hardware.pm similarity index 88% rename from network/aruba/common/mode/hardware.pm rename to centreon/common/aruba/snmp/mode/hardware.pm index 41db0befb..5eddd1dca 100644 --- a/network/aruba/common/mode/hardware.pm +++ b/centreon/common/aruba/snmp/mode/hardware.pm @@ -33,16 +33,16 @@ # #################################################################################### -package network::aruba::common::mode::hardware; +package centreon::common::aruba::snmp::mode::hardware; use base qw(centreon::plugins::mode); use strict; use warnings; -use network::aruba::common::mode::components::fan; -use network::aruba::common::mode::components::module; -use network::aruba::common::mode::components::psu; +use centreon::common::aruba::snmp::mode::components::fan; +use centreon::common::aruba::snmp::mode::components::module; +use centreon::common::aruba::snmp::mode::components::psu; sub new { my ($class, %options) = @_; @@ -67,9 +67,9 @@ sub check_options { sub global { my ($self, %options) = @_; - network::aruba::common::mode::components::fan::check($self); - network::aruba::common::mode::components::module::check($self); - network::aruba::common::mode::components::psu::check($self); + centreon::common::aruba::snmp::mode::components::fan::check($self); + centreon::common::aruba::snmp::mode::components::module::check($self); + centreon::common::aruba::snmp::mode::components::psu::check($self); } sub run { @@ -80,11 +80,11 @@ sub run { if ($self->{option_results}->{component} eq 'all') { $self->global(); } elsif ($self->{option_results}->{component} eq 'fan') { - network::aruba::common::mode::components::fan::check($self); + centreon::common::aruba::snmp::mode::components::fan::check($self); } elsif ($self->{option_results}->{component} eq 'module') { - network::aruba::common::mode::components::module::check($self); + centreon::common::aruba::snmp::mode::components::module::check($self); } elsif ($self->{option_results}->{component} eq 'psu') { - network::aruba::common::mode::components::psu::check($self); + centreon::common::aruba::snmp::mode::components::psu::check($self); } else { $self->{output}->add_option_msg(short_msg => "Wrong option. Cannot find component '" . $self->{option_results}->{component} . "'."); $self->{output}->option_exit(); diff --git a/network/aruba/common/mode/memory.pm b/centreon/common/aruba/snmp/mode/memory.pm similarity index 92% rename from network/aruba/common/mode/memory.pm rename to centreon/common/aruba/snmp/mode/memory.pm index fcddfcffe..6a4de6513 100644 --- a/network/aruba/common/mode/memory.pm +++ b/centreon/common/aruba/snmp/mode/memory.pm @@ -33,7 +33,7 @@ # #################################################################################### -package network::aruba::common::mode::memory; +package centreon::common::aruba::snmp::mode::memory; use base qw(centreon::plugins::mode); @@ -60,12 +60,12 @@ sub check_options { $self->SUPER::init(%options); if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{option_results}->{warning})) == 0) { - $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'."); - $self->{output}->option_exit(); + $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'."); + $self->{output}->option_exit(); } if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) { - $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'."); - $self->{output}->option_exit(); + $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'."); + $self->{output}->option_exit(); } } @@ -99,7 +99,7 @@ sub run { my $prct_used = $memory_used * 100 / $total_size; my $prct_free = 100 - $prct_used; - my $exit = $self->{perfdata}->threshold_check(value => $prct_used, threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]); + my $exit = $self->{perfdata}->threshold_check(value => $prct_used, threshold => [ { label => 'critical', exit_litteral => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]); my ($total_value, $total_unit) = $self->{perfdata}->change_bytes(value => $total_size); my ($used_value, $used_unit) = $self->{perfdata}->change_bytes(value => $memory_used); my ($free_value, $free_unit) = $self->{perfdata}->change_bytes(value => $memory_free); diff --git a/network/aruba/common/mode/storage.pm b/centreon/common/aruba/snmp/mode/storage.pm similarity index 97% rename from network/aruba/common/mode/storage.pm rename to centreon/common/aruba/snmp/mode/storage.pm index 2900a93c6..a707e350a 100644 --- a/network/aruba/common/mode/storage.pm +++ b/centreon/common/aruba/snmp/mode/storage.pm @@ -33,7 +33,7 @@ # #################################################################################### -package network::aruba::common::mode::storage; +package centreon::common::aruba::snmp::mode::storage; use base qw(centreon::plugins::mode); @@ -118,7 +118,7 @@ sub run { my $prct_used = $total_used * 100 / $total_size; my $prct_free = 100 - $prct_used; - my $exit = $self->{perfdata}->threshold_check(value => $prct_used, threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]); + my $exit = $self->{perfdata}->threshold_check(value => $prct_used, threshold => [ { label => 'critical', exit_litteral => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]); my ($total_size_value, $total_size_unit) = $self->{perfdata}->change_bytes(value => $total_size); my ($total_used_value, $total_used_unit) = $self->{perfdata}->change_bytes(value => $total_used); my ($total_free_value, $total_free_unit) = $self->{perfdata}->change_bytes(value => $total_free); diff --git a/network/aruba/7200/plugin.pm b/network/aruba/standard/snmp/plugin.pm similarity index 85% rename from network/aruba/7200/plugin.pm rename to network/aruba/standard/snmp/plugin.pm index a485d5fb1..4555725c0 100644 --- a/network/aruba/7200/plugin.pm +++ b/network/aruba/standard/snmp/plugin.pm @@ -33,7 +33,7 @@ # #################################################################################### -package network::aruba::7200::plugin; +package network::aruba::standard::snmp::plugin; use strict; use warnings; @@ -47,13 +47,13 @@ sub new { $self->{version} = '1.0'; %{$self->{modes}} = ( - 'cpu' => 'network::aruba::common::mode::cpu', - 'hardware' => 'network::aruba::common::mode::hardware', + 'cpu' => 'centreon::common::aruba::snmp::mode::cpu', + 'hardware' => 'centreon::common::aruba::snmp::mode::hardware', 'list-interfaces' => 'snmp_standard::mode::listinterfaces', 'packet-errors' => 'snmp_standard::mode::packeterrors', 'traffic' => 'snmp_standard::mode::traffic', - 'memory' => 'network::aruba::common::mode::memory', - 'storage' => 'network::aruba::common::mode::storage', + 'memory' => 'centreon::common::aruba::snmp::mode::memory', + 'storage' => 'centreon::common::aruba::snmp::mode::storage', ); return $self; @@ -65,6 +65,6 @@ __END__ =head1 PLUGIN DESCRIPTION -Check Aruba 7200 series in SNMP. +Check Aruba equipments in SNMP. =cut