diff --git a/centreon-plugins/centreon/common/riverbed/steelhead/snmp/mode/bwoptimization.pm b/centreon-plugins/centreon/common/riverbed/steelhead/snmp/mode/bwoptimization.pm index b276f9fbd..83c9211e0 100644 --- a/centreon-plugins/centreon/common/riverbed/steelhead/snmp/mode/bwoptimization.pm +++ b/centreon-plugins/centreon/common/riverbed/steelhead/snmp/mode/bwoptimization.pm @@ -88,9 +88,8 @@ sub new { my $self = $class->SUPER::new(package => __PACKAGE__, %options, statefile => 1); bless $self, $class; - $options{options}->add_options(arguments => - { - }); + $options{options}->add_options(arguments => { + }); return $self; } @@ -120,12 +119,8 @@ sub manage_selection { my $results = $options{snmp}->get_multiple_table( oids => [ - { oid => $oids->{common}, - start => $mappings->{common}->{bwHCAggInLan}->{oid}, - end => $mappings->{common}->{bwHCAggOutWan}->{oid} }, - { oid => $oids->{ex}, - start => $mappings->{ex}->{bwHCAggInLan}->{oid}, - end => $mappings->{ex}->{bwHCAggOutWan}->{oid} } + { oid => $oids->{common}, start => $mappings->{common}->{bwHCAggInLan}->{oid}, end => $mappings->{common}->{bwHCAggOutWan}->{oid} }, + { oid => $oids->{ex}, start => $mappings->{ex}->{bwHCAggInLan}->{oid}, end => $mappings->{ex}->{bwHCAggOutWan}->{oid} } ] ); diff --git a/centreon-plugins/centreon/common/riverbed/steelhead/snmp/mode/bwpassthrough.pm b/centreon-plugins/centreon/common/riverbed/steelhead/snmp/mode/bwpassthrough.pm index 6d1852253..20060c8e6 100644 --- a/centreon-plugins/centreon/common/riverbed/steelhead/snmp/mode/bwpassthrough.pm +++ b/centreon-plugins/centreon/common/riverbed/steelhead/snmp/mode/bwpassthrough.pm @@ -95,12 +95,8 @@ sub manage_selection { my $results = $options{snmp}->get_multiple_table( oids => [ - { oid => $oids->{common}, - start => $mappings->{common}->{bwPassThroughIn}->{oid}, - end => $mappings->{common}->{bwPassThroughOut}->{oid} }, - { oid => $oids->{ex}, - start => $mappings->{ex}->{bwPassThroughIn}->{oid}, - end => $mappings->{ex}->{bwPassThroughOut}->{oid} } + { oid => $oids->{common}, start => $mappings->{common}->{bwPassThroughIn}->{oid}, end => $mappings->{common}->{bwPassThroughOut}->{oid} }, + { oid => $oids->{ex}, start => $mappings->{ex}->{bwPassThroughIn}->{oid}, end => $mappings->{ex}->{bwPassThroughOut}->{oid} } ] ); diff --git a/centreon-plugins/centreon/common/riverbed/steelhead/snmp/mode/connections.pm b/centreon-plugins/centreon/common/riverbed/steelhead/snmp/mode/connections.pm index 63a58527d..0ada8b8d8 100644 --- a/centreon-plugins/centreon/common/riverbed/steelhead/snmp/mode/connections.pm +++ b/centreon-plugins/centreon/common/riverbed/steelhead/snmp/mode/connections.pm @@ -105,6 +105,7 @@ sub new { $options{options}->add_options(arguments => { }); + return $self; } @@ -139,12 +140,8 @@ sub manage_selection { my $results = $options{snmp}->get_multiple_table( oids => [ - { oid => $oids->{common}, - start => $mappings->{common}->{optimizedConnections}->{oid}, - end => $mappings->{common}->{totalConnections}->{oid} }, - { oid => $oids->{ex}, - start => $mappings->{ex}->{optimizedConnections}->{oid}, - end => $mappings->{ex}->{totalConnections}->{oid} } + { oid => $oids->{common}, start => $mappings->{common}->{optimizedConnections}->{oid}, end => $mappings->{common}->{totalConnections}->{oid} }, + { oid => $oids->{ex}, start => $mappings->{ex}->{optimizedConnections}->{oid}, end => $mappings->{ex}->{totalConnections}->{oid} } ] ); diff --git a/centreon-plugins/centreon/common/riverbed/steelhead/snmp/mode/diskutilization.pm b/centreon-plugins/centreon/common/riverbed/steelhead/snmp/mode/diskutilization.pm index a48ef1bb1..06fbeb492 100644 --- a/centreon-plugins/centreon/common/riverbed/steelhead/snmp/mode/diskutilization.pm +++ b/centreon-plugins/centreon/common/riverbed/steelhead/snmp/mode/diskutilization.pm @@ -101,20 +101,15 @@ sub manage_selection { my $results = $options{snmp}->get_multiple_table( oids => [ - { oid => $oids->{common}, - start => $mappings->{common}->{dsHitsTotal}->{oid}, - end => $mappings->{common}->{dsAveDiskUtilization}->{oid} }, - { oid => $oids->{ex}, - start => $mappings->{ex}->{dsHitsTotal}->{oid}, - end => $mappings->{ex}->{dsAveDiskUtilization}->{oid} } + { oid => $oids->{common}, start => $mappings->{common}->{dsHitsTotal}->{oid}, end => $mappings->{common}->{dsAveDiskUtilization}->{oid} }, + { oid => $oids->{ex}, start => $mappings->{ex}->{dsHitsTotal}->{oid}, end => $mappings->{ex}->{dsAveDiskUtilization}->{oid} } ] ); foreach my $equipment (keys %{$oids}) { next if (!%{$results->{$oids->{$equipment}}}); - my $result = $options{snmp}->map_instance(mapping => $mappings->{$equipment}, - results => $results->{$oids->{$equipment}}, instance => 0); + my $result = $options{snmp}->map_instance(mapping => $mappings->{$equipment}, results => $results->{$oids->{$equipment}}, instance => 0); $self->{global} = { dsHitsTotal => $result->{dsHitsTotal}, diff --git a/centreon-plugins/centreon/common/riverbed/steelhead/snmp/mode/loadaverage.pm b/centreon-plugins/centreon/common/riverbed/steelhead/snmp/mode/loadaverage.pm index acd5f4a7e..03adbbe84 100644 --- a/centreon-plugins/centreon/common/riverbed/steelhead/snmp/mode/loadaverage.pm +++ b/centreon-plugins/centreon/common/riverbed/steelhead/snmp/mode/loadaverage.pm @@ -18,26 +18,6 @@ # limitations under the License. # -# -# Copyright 2019 Centreon (http://www.centreon.com/) -# -# Centreon is a full-fledged industry-strength solution that meets -# the needs in IT infrastructure and application monitoring for -# service performance. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - package centreon::common::riverbed::steelhead::snmp::mode::loadaverage; use base qw(centreon::plugins::templates::counter); @@ -134,15 +114,9 @@ sub manage_selection { my $results = $options{snmp}->get_multiple_table( oids => [ - { oid => $oids->{common}, - start => $mappings->{common}->{cpuLoad1}->{oid}, - end => $mappings->{common}->{cpuUtil1}->{oid} }, - { oid => $oids->{ex}, - start => $mappings->{ex}->{cpuLoad1}->{oid}, - end => $mappings->{ex}->{cpuUtil1}->{oid} }, - { oid => $oids->{interceptor}, - start => $mappings->{interceptor}->{cpuLoad1}->{oid}, - end => $mappings->{interceptor}->{cpuUtil1}->{oid} } + { oid => $oids->{common}, start => $mappings->{common}->{cpuLoad1}->{oid}, end => $mappings->{common}->{cpuUtil1}->{oid} }, + { oid => $oids->{ex}, start => $mappings->{ex}->{cpuLoad1}->{oid}, end => $mappings->{ex}->{cpuUtil1}->{oid} }, + { oid => $oids->{interceptor}, start => $mappings->{interceptor}->{cpuLoad1}->{oid}, end => $mappings->{interceptor}->{cpuUtil1}->{oid} } ] ); diff --git a/centreon-plugins/centreon/common/riverbed/steelhead/snmp/mode/status.pm b/centreon-plugins/centreon/common/riverbed/steelhead/snmp/mode/status.pm index 9eb7bfaed..72cde1168 100644 --- a/centreon-plugins/centreon/common/riverbed/steelhead/snmp/mode/status.pm +++ b/centreon-plugins/centreon/common/riverbed/steelhead/snmp/mode/status.pm @@ -82,8 +82,8 @@ sub new { bless $self, $class; $options{options}->add_options(arguments => { - "warning-status:s" => { name => 'warning_status', default => '' }, - "critical-status:s" => { name => 'critical_status', default => '%{health} !~ /Healthy/ || %{status} !~ /running/' }, + 'warning-status:s' => { name => 'warning_status', default => '' }, + 'critical-status:s' => { name => 'critical_status', default => '%{health} !~ /Healthy/ || %{status} !~ /running/' }, }); return $self; @@ -125,15 +125,9 @@ sub manage_selection { my $results = $options{snmp}->get_multiple_table( oids => [ - { oid => $oids->{common}, - start => $mappings->{common}->{health}->{oid}, - end => $mappings->{common}->{serviceUptime}->{oid} }, - { oid => $oids->{ex}, - start => $mappings->{ex}->{health}->{oid}, - end => $mappings->{ex}->{serviceUptime}->{oid} }, - { oid => $oids->{interceptor}, - start => $mappings->{interceptor}->{health}->{oid}, - end => $mappings->{interceptor}->{serviceUptime}->{oid} } + { oid => $oids->{common}, start => $mappings->{common}->{health}->{oid}, end => $mappings->{common}->{serviceUptime}->{oid} }, + { oid => $oids->{ex}, start => $mappings->{ex}->{health}->{oid}, end => $mappings->{ex}->{serviceUptime}->{oid} }, + { oid => $oids->{interceptor}, start => $mappings->{interceptor}->{health}->{oid}, end => $mappings->{interceptor}->{serviceUptime}->{oid} } ] ); diff --git a/centreon-plugins/centreon/common/riverbed/steelhead/snmp/mode/temperature.pm b/centreon-plugins/centreon/common/riverbed/steelhead/snmp/mode/temperature.pm index 844cec1e1..06c279514 100644 --- a/centreon-plugins/centreon/common/riverbed/steelhead/snmp/mode/temperature.pm +++ b/centreon-plugins/centreon/common/riverbed/steelhead/snmp/mode/temperature.pm @@ -53,6 +53,7 @@ sub new { $options{options}->add_options(arguments =>{ }); + return $self; } @@ -75,12 +76,8 @@ sub manage_selection { my $results = $options{snmp}->get_multiple_table( oids => [ - { oid => $oids->{common}, - start => $mappings->{common}->{systemTemperature}->{oid}, - end => $mappings->{common}->{systemTemperature}->{oid} }, - { oid => $oids->{ex}, - start => $mappings->{ex}->{systemTemperature}->{oid}, - end => $mappings->{ex}->{systemTemperature}->{oid} } + { oid => $oids->{common}, start => $mappings->{common}->{systemTemperature}->{oid}, end => $mappings->{common}->{systemTemperature}->{oid} }, + { oid => $oids->{ex}, start => $mappings->{ex}->{systemTemperature}->{oid}, end => $mappings->{ex}->{systemTemperature}->{oid} } ] );