add network hp standard, move h3c modes to common
This commit is contained in:
parent
04ae55e104
commit
19bff42565
|
@ -18,7 +18,7 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
|
||||
package network::h3c::snmp::mode::components::default;
|
||||
package centreon::common::h3c::snmp::mode::components::default;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
|
@ -18,7 +18,7 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
|
||||
package network::h3c::snmp::mode::components::fan;
|
||||
package centreon::common::h3c::snmp::mode::components::fan;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
|
@ -18,7 +18,7 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
|
||||
package network::h3c::snmp::mode::components::psu;
|
||||
package centreon::common::h3c::snmp::mode::components::psu;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
|
@ -18,7 +18,7 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
|
||||
package network::h3c::snmp::mode::components::sensor;
|
||||
package centreon::common::h3c::snmp::mode::components::sensor;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
|
@ -18,7 +18,7 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
|
||||
package network::h3c::snmp::mode::cpu;
|
||||
package centreon::common::h3c::snmp::mode::cpu;
|
||||
|
||||
use base qw(centreon::plugins::mode);
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
|
||||
package network::h3c::snmp::mode::hardware;
|
||||
package centreon::common::h3c::snmp::mode::hardware;
|
||||
|
||||
use base qw(centreon::plugins::templates::hardware);
|
||||
|
||||
|
@ -112,7 +112,7 @@ sub set_system {
|
|||
],
|
||||
};
|
||||
|
||||
$self->{components_path} = 'network::h3c::snmp::mode::components';
|
||||
$self->{components_path} = 'centreon::common::h3c::snmp::mode::components';
|
||||
$self->{components_module} = ['chassis', 'backplane', 'container', 'psu', 'fan', 'sensor',
|
||||
'module', 'port', 'stack', 'cpu', 'other', 'unknown'];
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
|
||||
package network::h3c::snmp::mode::memory;
|
||||
package centreon::common::h3c::snmp::mode::memory;
|
||||
|
||||
use base qw(centreon::plugins::mode);
|
||||
|
|
@ -31,11 +31,11 @@ sub new {
|
|||
|
||||
$self->{version} = '1.0';
|
||||
%{$self->{modes}} = (
|
||||
'cpu' => 'network::h3c::snmp::mode::cpu',
|
||||
'hardware' => 'network::h3c::snmp::mode::hardware',
|
||||
'cpu' => 'centreon::common::h3c::snmp::mode::cpu',
|
||||
'hardware' => 'centreon::common::h3c::snmp::mode::hardware',
|
||||
'interfaces' => 'snmp_standard::mode::interfaces',
|
||||
'list-interfaces' => 'snmp_standard::mode::listinterfaces',
|
||||
'memory' => 'network::h3c::snmp::mode::memory',
|
||||
'memory' => 'centreon::common::h3c::snmp::mode::memory',
|
||||
);
|
||||
|
||||
return $self;
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
#
|
||||
# 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 network::hp::standard::snmp::plugin;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use base qw(centreon::plugins::script_snmp);
|
||||
|
||||
sub new {
|
||||
my ($class, %options) = @_;
|
||||
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
|
||||
bless $self, $class;
|
||||
|
||||
$self->{version} = '1.0';
|
||||
%{$self->{modes}} = (
|
||||
'cpu' => 'centreon::common::h3c::snmp::mode::cpu',
|
||||
'hardware' => 'centreon::common::h3c::snmp::mode::hardware',
|
||||
'interfaces' => 'snmp_standard::mode::interfaces',
|
||||
'list-interfaces' => 'snmp_standard::mode::listinterfaces',
|
||||
'memory' => 'centreon::common::h3c::snmp::mode::memory',
|
||||
'spanning-tree' => 'snmp_standard::mode::spanningtree',
|
||||
'uptime' => 'snmp_standard::mode::uptime',
|
||||
);
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
|
||||
=head1 PLUGIN DESCRIPTION
|
||||
|
||||
Check HP switches in SNMP.
|
||||
|
||||
=cut
|
|
@ -51,7 +51,7 @@ sub custom_status_threshold {
|
|||
|
||||
sub custom_status_output {
|
||||
my ($self, %options) = @_;
|
||||
my $msg = " spanning tree state is '" . $self->{result_values}->{state} . "' [index: '" . $self->{result_values}->{index} . "']";
|
||||
my $msg = "spanning tree state is '" . $self->{result_values}->{state} . "' [index: '" . $self->{result_values}->{index} . "']";
|
||||
|
||||
return $msg;
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ sub set_counters {
|
|||
sub prefix_peers_output {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
return "Port: '" . $options{instance_value}->{display} . "' ";
|
||||
return "Port '" . $options{instance_value}->{display} . "' ";
|
||||
}
|
||||
|
||||
sub new {
|
||||
|
|
Loading…
Reference in New Issue