Fix on gloabal status component #5151
This commit is contained in:
parent
8a3fee2a1e
commit
c20e750e63
|
@ -45,14 +45,21 @@ my %status = (
|
||||||
);
|
);
|
||||||
|
|
||||||
sub check {
|
sub check {
|
||||||
my ($self, %options) = @_;
|
my ($self) = @_;
|
||||||
# $options{snmp} = snmp object
|
|
||||||
$self->{snmp} = $options{snmp};
|
# In MIB '10892.mib'
|
||||||
|
$self->{output}->output_add(long_msg => "Checking global system status");
|
||||||
|
return if ($self->check_exclude('globalstatus'));
|
||||||
|
|
||||||
my $oid_globalSystemStatus = '.1.3.6.1.4.1.674.10892.1.200.10.1.2.1';
|
my $oid_globalSystemStatus = '.1.3.6.1.4.1.674.10892.1.200.10.1.2.1';
|
||||||
my $result = $self->{snmp}->get_leef(oids => [$oid_globalSystemStatus], nothing_quit => 1);
|
my $result = $self->{snmp}->get_leef(oids => [$oid_globalSystemStatus], nothing_quit => 1);
|
||||||
|
|
||||||
$self->{output}->output_add(severity => ${$status{$result->{$oid_globalSystemStatus}}}[1],
|
$self->{output}->output_add(long_msg => sprintf("Overall global status is '%s'.",
|
||||||
|
${$status{$result->{$oid_globalSystemStatus}}}[0]
|
||||||
|
));
|
||||||
|
|
||||||
|
if ($result->{$oid_globalSystemStatus} != 3) {
|
||||||
|
$self->{output}->output_add(severity => ${$status{$result->{$oid_globalSystemStatus}}}[1],
|
||||||
short_msg => sprintf("Overall global status is '%s'",
|
short_msg => sprintf("Overall global status is '%s'",
|
||||||
${$status{$result->{$oid_globalSystemStatus}}}[0]));
|
${$status{$result->{$oid_globalSystemStatus}}}[0]));
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,6 +42,8 @@ use warnings;
|
||||||
use centreon::plugins::misc;
|
use centreon::plugins::misc;
|
||||||
use hardware::server::dell::openmanage::mode::components::fan;
|
use hardware::server::dell::openmanage::mode::components::fan;
|
||||||
use hardware::server::dell::openmanage::mode::components::psu;
|
use hardware::server::dell::openmanage::mode::components::psu;
|
||||||
|
use hardware::server::dell::openmanage::mode::components::temperature;
|
||||||
|
use hardware::server::dell::openmanage::mode::components::globalstatus;
|
||||||
|
|
||||||
sub new {
|
sub new {
|
||||||
my ($class, %options) = @_;
|
my ($class, %options) = @_;
|
||||||
|
@ -70,9 +72,11 @@ sub run {
|
||||||
$self->{snmp} = $options{snmp};
|
$self->{snmp} = $options{snmp};
|
||||||
|
|
||||||
$self->get_system_information();
|
$self->get_system_information();
|
||||||
|
hardware::server::dell::openmanage::mode::components::globalstatus::check($self);
|
||||||
hardware::server::dell::openmanage::mode::components::fan::check($self);
|
hardware::server::dell::openmanage::mode::components::fan::check($self);
|
||||||
hardware::server::dell::openmanage::mode::components::psu::check($self);
|
hardware::server::dell::openmanage::mode::components::psu::check($self);
|
||||||
|
hardware::server::dell::openmanage::mode::components::temperature::check($self);
|
||||||
|
|
||||||
my $total_components = 0;
|
my $total_components = 0;
|
||||||
my $display_by_component = '';
|
my $display_by_component = '';
|
||||||
my $display_by_component_append = '';
|
my $display_by_component_append = '';
|
||||||
|
|
Loading…
Reference in New Issue