This commit is contained in:
Kevin Duret 2014-02-19 10:55:22 +00:00
parent 831de1e5f9
commit 9ac6d0b78a
2 changed files with 11 additions and 2 deletions

View File

@ -52,11 +52,13 @@ sub check {
# In MIB '10892.mib' # In MIB '10892.mib'
$self->{output}->output_add(long_msg => "Checking ESM log filling"); $self->{output}->output_add(long_msg => "Checking ESM log filling");
$self->{components}->{esmlog} = {name => 'ESM log', total => 0};
return if ($self->check_exclude('esmlog')); return if ($self->check_exclude('esmlog'));
my $oid_eventLogStatus = '.1.3.6.1.4.1.674.10892.1.200.10.1.41.1'; my $oid_eventLogStatus = '.1.3.6.1.4.1.674.10892.1.200.10.1.41.1';
my $result = $self->{snmp}->get_leef(oids => [$oid_eventLogStatus], nothing_quit => 1); my $result = $self->{snmp}->get_leef(oids => [$oid_eventLogStatus], nothing_quit => 1);
$self->{components}->{esmlog}->{total}++;
$self->{output}->output_add(long_msg => sprintf("ESM log status is '%s'.", $self->{output}->output_add(long_msg => sprintf("ESM log status is '%s'.",
${$status{$result->{$oid_eventLogStatus}}}[0] ${$status{$result->{$oid_eventLogStatus}}}[0]
)); ));

View File

@ -142,6 +142,13 @@ sub component {
hardware::server::dell::openmanage::mode::components::controller::check($self); hardware::server::dell::openmanage::mode::components::controller::check($self);
} elsif ($self->{option_results}->{component} eq 'connector') { } elsif ($self->{option_results}->{component} eq 'connector') {
hardware::server::dell::openmanage::mode::components::connector::check($self); hardware::server::dell::openmanage::mode::components::connector::check($self);
} elsif ($self->{option_results}->{component} eq 'storage') {
hardware::server::dell::openmanage::mode::components::physicaldisk::check($self);
hardware::server::dell::openmanage::mode::components::logicaldrive::check($self);
hardware::server::dell::openmanage::mode::components::cachebattery::check($self);
hardware::server::dell::openmanage::mode::components::controller::check($self);
hardware::server::dell::openmanage::mode::components::connector::check($self);
hardware::server::dell::openmanage::mode::components::cachebattery::check($self);
}else { }else {
$self->{output}->add_option_msg(short_msg => "Wrong option. Cannot find component '" . $self->{option_results}->{component} . "'."); $self->{output}->add_option_msg(short_msg => "Wrong option. Cannot find component '" . $self->{option_results}->{component} . "'.");
$self->{output}->option_exit(); $self->{output}->option_exit();
@ -207,14 +214,14 @@ __END__
=head1 MODE =head1 MODE
Check Hardware (Global status, Fans, CPUs, Power Supplies, Temperature Probes, Cache Batteries). Check Hardware (Global status, Fans, CPUs, Power Supplies, Temperature, Storage).
=over 8 =over 8
=item B<--component> =item B<--component>
Which component to check (Default: 'all'). Which component to check (Default: 'all').
Can be: 'globalstatus', 'fan', 'cpu', 'psu', 'temperature', 'cachebattery', 'physicaldisk', 'logicaldrive', 'battery', 'controller', connector. Can be: 'globalstatus', 'fan', 'cpu', 'psu', 'temperature', 'cachebattery', 'physicaldisk', 'logicaldrive', 'battery', 'controller', 'connector', 'storage'.
=item B<--exclude> =item B<--exclude>