mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-27 23:54:18 +02:00
add network hp standard, move h3c modes to common
This commit is contained in:
parent
3894ad18c3
commit
1f517b9b43
@ -18,7 +18,7 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
package network::h3c::snmp::mode::components::default;
|
package centreon::common::h3c::snmp::mode::components::default;
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
@ -18,7 +18,7 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
package network::h3c::snmp::mode::components::fan;
|
package centreon::common::h3c::snmp::mode::components::fan;
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
@ -18,7 +18,7 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
package network::h3c::snmp::mode::components::psu;
|
package centreon::common::h3c::snmp::mode::components::psu;
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
@ -18,7 +18,7 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
package network::h3c::snmp::mode::components::sensor;
|
package centreon::common::h3c::snmp::mode::components::sensor;
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
@ -18,7 +18,7 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
package network::h3c::snmp::mode::cpu;
|
package centreon::common::h3c::snmp::mode::cpu;
|
||||||
|
|
||||||
use base qw(centreon::plugins::mode);
|
use base qw(centreon::plugins::mode);
|
||||||
|
|
@ -18,7 +18,7 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
package network::h3c::snmp::mode::hardware;
|
package centreon::common::h3c::snmp::mode::hardware;
|
||||||
|
|
||||||
use base qw(centreon::plugins::templates::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',
|
$self->{components_module} = ['chassis', 'backplane', 'container', 'psu', 'fan', 'sensor',
|
||||||
'module', 'port', 'stack', 'cpu', 'other', 'unknown'];
|
'module', 'port', 'stack', 'cpu', 'other', 'unknown'];
|
||||||
|
|
@ -18,7 +18,7 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
package network::h3c::snmp::mode::memory;
|
package centreon::common::h3c::snmp::mode::memory;
|
||||||
|
|
||||||
use base qw(centreon::plugins::mode);
|
use base qw(centreon::plugins::mode);
|
||||||
|
|
@ -31,11 +31,11 @@ sub new {
|
|||||||
|
|
||||||
$self->{version} = '1.0';
|
$self->{version} = '1.0';
|
||||||
%{$self->{modes}} = (
|
%{$self->{modes}} = (
|
||||||
'cpu' => 'network::h3c::snmp::mode::cpu',
|
'cpu' => 'centreon::common::h3c::snmp::mode::cpu',
|
||||||
'hardware' => 'network::h3c::snmp::mode::hardware',
|
'hardware' => 'centreon::common::h3c::snmp::mode::hardware',
|
||||||
'interfaces' => 'snmp_standard::mode::interfaces',
|
'interfaces' => 'snmp_standard::mode::interfaces',
|
||||||
'list-interfaces' => 'snmp_standard::mode::listinterfaces',
|
'list-interfaces' => 'snmp_standard::mode::listinterfaces',
|
||||||
'memory' => 'network::h3c::snmp::mode::memory',
|
'memory' => 'centreon::common::h3c::snmp::mode::memory',
|
||||||
);
|
);
|
||||||
|
|
||||||
return $self;
|
return $self;
|
||||||
|
54
centreon-plugins/network/hp/standard/snmp/plugin.pm
Normal file
54
centreon-plugins/network/hp/standard/snmp/plugin.pm
Normal file
@ -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
|
@ -88,7 +88,7 @@ sub set_counters {
|
|||||||
sub prefix_peers_output {
|
sub prefix_peers_output {
|
||||||
my ($self, %options) = @_;
|
my ($self, %options) = @_;
|
||||||
|
|
||||||
return "Port: '" . $options{instance_value}->{display} . "' ";
|
return "Port '" . $options{instance_value}->{display} . "' ";
|
||||||
}
|
}
|
||||||
|
|
||||||
sub new {
|
sub new {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user