+ Change cisco SB path (Fix #84)
This commit is contained in:
parent
31b007d260
commit
56bbe18b3c
|
@ -33,7 +33,7 @@
|
||||||
#
|
#
|
||||||
####################################################################################
|
####################################################################################
|
||||||
|
|
||||||
package centreon::common::cisco::smallbusiness::mode::components::fan;
|
package centreon::common::cisco::smallbusiness::snmp::mode::components::fan;
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
|
@ -33,7 +33,7 @@
|
||||||
#
|
#
|
||||||
####################################################################################
|
####################################################################################
|
||||||
|
|
||||||
package centreon::common::cisco::smallbusiness::mode::components::psu;
|
package centreon::common::cisco::smallbusiness::snmp::mode::components::psu;
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
|
@ -33,7 +33,7 @@
|
||||||
#
|
#
|
||||||
####################################################################################
|
####################################################################################
|
||||||
|
|
||||||
package centreon::common::cisco::smallbusiness::mode::cpu;
|
package centreon::common::cisco::smallbusiness::snmp::mode::cpu;
|
||||||
|
|
||||||
use base qw(centreon::plugins::mode);
|
use base qw(centreon::plugins::mode);
|
||||||
|
|
||||||
|
@ -117,17 +117,17 @@ sub run {
|
||||||
short_msg => sprintf("CPU: %.2f%% (1sec), %.2f%% (1min), %.2f%% (5min)",
|
short_msg => sprintf("CPU: %.2f%% (1sec), %.2f%% (1min), %.2f%% (5min)",
|
||||||
$cpu1sec, $cpu1min, $cpu5min));
|
$cpu1sec, $cpu1min, $cpu5min));
|
||||||
|
|
||||||
$self->{output}->perfdata_add(label => "cpu_1s",
|
$self->{output}->perfdata_add(label => "cpu_1s", unit => '%',
|
||||||
value => $cpu1sec,
|
value => $cpu1sec,
|
||||||
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warn1s'),
|
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warn1s'),
|
||||||
critical => $self->{perfdata}->get_perfdata_for_output(label => 'crit1s'),
|
critical => $self->{perfdata}->get_perfdata_for_output(label => 'crit1s'),
|
||||||
min => 0, max => 100);
|
min => 0, max => 100);
|
||||||
$self->{output}->perfdata_add(label => "cpu_1m",
|
$self->{output}->perfdata_add(label => "cpu_1m", unit => '%',
|
||||||
value => $cpu1min,
|
value => $cpu1min,
|
||||||
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warn1m'),
|
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warn1m'),
|
||||||
critical => $self->{perfdata}->get_perfdata_for_output(label => 'crit1m'),
|
critical => $self->{perfdata}->get_perfdata_for_output(label => 'crit1m'),
|
||||||
min => 0, max => 100);
|
min => 0, max => 100);
|
||||||
$self->{output}->perfdata_add(label => "cpu_5m",
|
$self->{output}->perfdata_add(label => "cpu_5m", unit => '%',
|
||||||
value => $cpu5min,
|
value => $cpu5min,
|
||||||
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warn5m'),
|
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warn5m'),
|
||||||
critical => $self->{perfdata}->get_perfdata_for_output(label => 'crit5m'),
|
critical => $self->{perfdata}->get_perfdata_for_output(label => 'crit5m'),
|
|
@ -33,7 +33,7 @@
|
||||||
#
|
#
|
||||||
####################################################################################
|
####################################################################################
|
||||||
|
|
||||||
package centreon::common::cisco::smallbusiness::mode::environment;
|
package centreon::common::cisco::smallbusiness::snmp::mode::environment;
|
||||||
|
|
||||||
use base qw(centreon::plugins::mode);
|
use base qw(centreon::plugins::mode);
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ sub run {
|
||||||
my @components = ('psu', 'fan');
|
my @components = ('psu', 'fan');
|
||||||
foreach (@components) {
|
foreach (@components) {
|
||||||
if (/$self->{option_results}->{component}/) {
|
if (/$self->{option_results}->{component}/) {
|
||||||
my $mod_name = "centreon::common::cisco::smallbusiness::mode::components::$_";
|
my $mod_name = "centreon::common::cisco::smallbusiness::snmp::mode::components::$_";
|
||||||
centreon::plugins::misc::mymodule_load(output => $self->{output}, module => $mod_name,
|
centreon::plugins::misc::mymodule_load(output => $self->{output}, module => $mod_name,
|
||||||
error_msg => "Cannot load module '$mod_name'.");
|
error_msg => "Cannot load module '$mod_name'.");
|
||||||
my $func = $mod_name->can('load');
|
my $func = $mod_name->can('load');
|
||||||
|
@ -132,7 +132,7 @@ sub run {
|
||||||
|
|
||||||
foreach (@components) {
|
foreach (@components) {
|
||||||
if (/$self->{option_results}->{component}/) {
|
if (/$self->{option_results}->{component}/) {
|
||||||
my $mod_name = "centreon::common::cisco::smallbusiness::mode::components::$_";
|
my $mod_name = "centreon::common::cisco::smallbusiness::snmp::mode::components::$_";
|
||||||
my $func = $mod_name->can('check');
|
my $func = $mod_name->can('check');
|
||||||
$func->($self);
|
$func->($self);
|
||||||
}
|
}
|
|
@ -33,7 +33,7 @@
|
||||||
#
|
#
|
||||||
####################################################################################
|
####################################################################################
|
||||||
|
|
||||||
package network::cisco::smallbusiness::sf500::plugin;
|
package network::cisco::smallbusiness::standard::snmp::plugin;
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
@ -47,8 +47,8 @@ sub new {
|
||||||
|
|
||||||
$self->{version} = '1.0';
|
$self->{version} = '1.0';
|
||||||
%{$self->{modes}} = (
|
%{$self->{modes}} = (
|
||||||
'cpu' => 'centreon::common::cisco::smallbusiness::mode::cpu',
|
'cpu' => 'centreon::common::cisco::smallbusiness::snmp::mode::cpu',
|
||||||
'environment' => 'centreon::common::cisco::smallbusiness::mode::environment',
|
'environment' => 'centreon::common::cisco::smallbusiness::snmp::mode::environment',
|
||||||
'list-interfaces' => 'snmp_standard::mode::listinterfaces',
|
'list-interfaces' => 'snmp_standard::mode::listinterfaces',
|
||||||
'packet-errors' => 'snmp_standard::mode::packeterrors',
|
'packet-errors' => 'snmp_standard::mode::packeterrors',
|
||||||
'spanning-tree' => 'snmp_standard::mode::spanningtree',
|
'spanning-tree' => 'snmp_standard::mode::spanningtree',
|
||||||
|
@ -64,6 +64,6 @@ __END__
|
||||||
|
|
||||||
=head1 PLUGIN DESCRIPTION
|
=head1 PLUGIN DESCRIPTION
|
||||||
|
|
||||||
Check Cisco SB SF500 series switches in SNMP.
|
Check Cisco SB series switches in SNMP.
|
||||||
|
|
||||||
=cut
|
=cut
|
Loading…
Reference in New Issue