From 6df46c6c880ac462e84b81dd847403e71a84af95 Mon Sep 17 00:00:00 2001 From: garnier-quentin Date: Tue, 28 Mar 2017 14:35:52 +0200 Subject: [PATCH] + Change alteon path (WIP) --- network/radware/alteon/{common => snmp}/mode/cpu.pm | 2 +- .../radware/alteon/{common => snmp}/mode/hardware.pm | 2 +- network/radware/alteon/{common => snmp}/mode/memory.pm | 4 ++-- network/radware/alteon/{5224 => snmp}/plugin.pm | 10 +++++----- 4 files changed, 9 insertions(+), 9 deletions(-) rename network/radware/alteon/{common => snmp}/mode/cpu.pm (99%) rename network/radware/alteon/{common => snmp}/mode/hardware.pm (99%) rename network/radware/alteon/{common => snmp}/mode/memory.pm (95%) rename network/radware/alteon/{5224 => snmp}/plugin.pm (89%) diff --git a/network/radware/alteon/common/mode/cpu.pm b/network/radware/alteon/snmp/mode/cpu.pm similarity index 99% rename from network/radware/alteon/common/mode/cpu.pm rename to network/radware/alteon/snmp/mode/cpu.pm index b749bcc7b..b5f75b0ea 100644 --- a/network/radware/alteon/common/mode/cpu.pm +++ b/network/radware/alteon/snmp/mode/cpu.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package network::radware::alteon::common::mode::cpu; +package network::radware::alteon::snmp::mode::cpu; use base qw(centreon::plugins::mode); diff --git a/network/radware/alteon/common/mode/hardware.pm b/network/radware/alteon/snmp/mode/hardware.pm similarity index 99% rename from network/radware/alteon/common/mode/hardware.pm rename to network/radware/alteon/snmp/mode/hardware.pm index bbd9c74ef..a445b3206 100644 --- a/network/radware/alteon/common/mode/hardware.pm +++ b/network/radware/alteon/snmp/mode/hardware.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package network::radware::alteon::common::mode::hardware; +package network::radware::alteon::snmp::mode::hardware; use base qw(centreon::plugins::mode); diff --git a/network/radware/alteon/common/mode/memory.pm b/network/radware/alteon/snmp/mode/memory.pm similarity index 95% rename from network/radware/alteon/common/mode/memory.pm rename to network/radware/alteon/snmp/mode/memory.pm index e998585b2..5798cd1c4 100644 --- a/network/radware/alteon/common/mode/memory.pm +++ b/network/radware/alteon/snmp/mode/memory.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package network::radware::alteon::common::mode::memory; +package network::radware::alteon::snmp::mode::memory; use base qw(centreon::plugins::mode); @@ -69,7 +69,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/radware/alteon/5224/plugin.pm b/network/radware/alteon/snmp/plugin.pm similarity index 89% rename from network/radware/alteon/5224/plugin.pm rename to network/radware/alteon/snmp/plugin.pm index 7fc2f838d..e2da10efe 100644 --- a/network/radware/alteon/5224/plugin.pm +++ b/network/radware/alteon/snmp/plugin.pm @@ -18,7 +18,7 @@ # limitations under the License. # -package network::radware::alteon::5224::plugin; +package network::radware::alteon::snmp::plugin; use strict; use warnings; @@ -31,9 +31,9 @@ sub new { $self->{version} = '1.0'; %{$self->{modes}} = ( - 'cpu' => 'network::radware::alteon::common::mode::cpu', - 'hardware' => 'network::radware::alteon::common::mode::hardware', - 'memory' => 'network::radware::alteon::common::mode::memory', + 'cpu' => 'network::radware::alteon::snmp::mode::cpu', + 'hardware' => 'network::radware::alteon::snmp::mode::hardware', + 'memory' => 'network::radware::alteon::snmp::mode::memory', ); return $self; @@ -45,6 +45,6 @@ __END__ =head1 PLUGIN DESCRIPTION -Check Alteon 5224 in SNMP. +Check Radware Alteon in SNMP. =cut