+ Change cisco SB path (Fix #84)

This commit is contained in:
garnier-quentin 2015-06-26 13:16:55 +02:00
parent 31b007d260
commit 56bbe18b3c
5 changed files with 13 additions and 13 deletions

View File

@ -33,7 +33,7 @@
#
####################################################################################
package centreon::common::cisco::smallbusiness::mode::components::fan;
package centreon::common::cisco::smallbusiness::snmp::mode::components::fan;
use strict;
use warnings;

View File

@ -33,7 +33,7 @@
#
####################################################################################
package centreon::common::cisco::smallbusiness::mode::components::psu;
package centreon::common::cisco::smallbusiness::snmp::mode::components::psu;
use strict;
use warnings;

View File

@ -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);
@ -117,17 +117,17 @@ sub run {
short_msg => sprintf("CPU: %.2f%% (1sec), %.2f%% (1min), %.2f%% (5min)",
$cpu1sec, $cpu1min, $cpu5min));
$self->{output}->perfdata_add(label => "cpu_1s",
$self->{output}->perfdata_add(label => "cpu_1s", unit => '%',
value => $cpu1sec,
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warn1s'),
critical => $self->{perfdata}->get_perfdata_for_output(label => 'crit1s'),
min => 0, max => 100);
$self->{output}->perfdata_add(label => "cpu_1m",
$self->{output}->perfdata_add(label => "cpu_1m", unit => '%',
value => $cpu1min,
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warn1m'),
critical => $self->{perfdata}->get_perfdata_for_output(label => 'crit1m'),
min => 0, max => 100);
$self->{output}->perfdata_add(label => "cpu_5m",
$self->{output}->perfdata_add(label => "cpu_5m", unit => '%',
value => $cpu5min,
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warn5m'),
critical => $self->{perfdata}->get_perfdata_for_output(label => 'crit5m'),

View File

@ -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);
@ -116,7 +116,7 @@ sub run {
my @components = ('psu', 'fan');
foreach (@components) {
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,
error_msg => "Cannot load module '$mod_name'.");
my $func = $mod_name->can('load');
@ -132,7 +132,7 @@ sub run {
foreach (@components) {
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');
$func->($self);
}

View File

@ -33,7 +33,7 @@
#
####################################################################################
package network::cisco::smallbusiness::sf500::plugin;
package network::cisco::smallbusiness::standard::snmp::plugin;
use strict;
use warnings;
@ -47,8 +47,8 @@ sub new {
$self->{version} = '1.0';
%{$self->{modes}} = (
'cpu' => 'centreon::common::cisco::smallbusiness::mode::cpu',
'environment' => 'centreon::common::cisco::smallbusiness::mode::environment',
'cpu' => 'centreon::common::cisco::smallbusiness::snmp::mode::cpu',
'environment' => 'centreon::common::cisco::smallbusiness::snmp::mode::environment',
'list-interfaces' => 'snmp_standard::mode::listinterfaces',
'packet-errors' => 'snmp_standard::mode::packeterrors',
'spanning-tree' => 'snmp_standard::mode::spanningtree',
@ -64,6 +64,6 @@ __END__
=head1 PLUGIN DESCRIPTION
Check Cisco SB SF500 series switches in SNMP.
Check Cisco SB series switches in SNMP.
=cut