+ Correct bladecenter IBM
This commit is contained in:
parent
8bc02e668b
commit
d21cfb3e3c
|
@ -59,7 +59,7 @@ sub check {
|
|||
$label = 'pureflex';
|
||||
}
|
||||
|
||||
foreach my $temp (@values) {
|
||||
foreach my $temp (@sensors) {
|
||||
if (!defined($self->{results}->{$oid_temperature}->{$oids->{$label}->{$temp}}) ||
|
||||
$self->{results}->{$oid_temperature}->{$oids->{$label}->{$temp}} !~ /([0-9\.]+)/) {
|
||||
$self->{output}->output_add(long_msg => sprintf("skip ambient '%s': no values",
|
||||
|
|
|
@ -77,8 +77,10 @@ sub check {
|
|||
my $result = $self->{snmp}->map_instance(mapping => $mapping, results => $self->{results}->{$oid_bladeSystemStatusEntry}, instance => $instance);
|
||||
|
||||
next if ($self->check_exclude(section => 'blade', instance => $result->{bladeId}));
|
||||
next if ($result->{bladeExists} =~ /No/i &&
|
||||
$self->absent_problem(section => 'blade', instance => $result->{bladeId}));
|
||||
if ($result->{bladeExists} =~ /No/i) {
|
||||
$self->{output}->output_add(long_msg => "skipping blade '" . $instance . "' : not exits");
|
||||
next;
|
||||
}
|
||||
$self->{components}->{blade}->{total}++;
|
||||
|
||||
if ($result->{bladePowerState} =~ /off/) {
|
||||
|
|
|
@ -58,8 +58,8 @@ sub check {
|
|||
next if ($self->check_exclude(section => 'chassisfan', instance => $instance));
|
||||
$self->{components}->{chassisfan}->{total}++;
|
||||
|
||||
$self->{output}->output_add(long_msg => sprintf("Chassis fan '%s' is %d rpm [status: %s, instance: %s]",
|
||||
$instance, $result->{fanPackAverageSpeedRPM}, $result->{chassisFanState},
|
||||
$self->{output}->output_add(long_msg => sprintf("Chassis fan '%s' is %s rpm [status: %s, instance: %s]",
|
||||
$instance, $result->{chassisFanSpeedRPM}, $result->{chassisFanState},
|
||||
$instance));
|
||||
my $exit = $self->get_severity(section => 'chassisfan', value => $result->{chassisFanState});
|
||||
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
|
||||
|
|
|
@ -29,10 +29,14 @@ my %map_state = (
|
|||
2 => 'warning',
|
||||
3 => 'bad',
|
||||
);
|
||||
my %map_exists = (
|
||||
0 => 'false',
|
||||
1 => 'true',
|
||||
);
|
||||
|
||||
# In MIB 'mmblade.mib' and 'cme.mib'
|
||||
my $mapping = {
|
||||
fanPackExists => { oid => '.1.3.6.1.4.1.2.3.51.2.2.6.1.1.2' },
|
||||
fanPackExists => { oid => '.1.3.6.1.4.1.2.3.51.2.2.6.1.1.2', map => \%map_exists },
|
||||
fanPackState => { oid => '.1.3.6.1.4.1.2.3.51.2.2.6.1.1.3', map => \%map_state },
|
||||
fanPackAverageSpeedRPM => { oid => '.1.3.6.1.4.1.2.3.51.2.2.6.1.1.6' },
|
||||
};
|
||||
|
@ -56,14 +60,14 @@ sub check {
|
|||
my $instance = $1;
|
||||
my $result = $self->{snmp}->map_instance(mapping => $mapping, results => $self->{results}->{$oid_fanPackEntry}, instance => $instance);
|
||||
|
||||
if ($result->{fanPackExists} == 1) {
|
||||
if ($result->{fanPackExists} =~ /No/i) {
|
||||
$self->{output}->output_add(long_msg => "skipping fanpack '" . $instance . "' : not exits");
|
||||
next;
|
||||
}
|
||||
next if ($self->check_exclude(section => 'fanpack', instance => $instance));
|
||||
$self->{components}->{fanpack}->{total}++;
|
||||
|
||||
$self->{output}->output_add(long_msg => sprintf("Fanpack '%s' is %d rpm [status: %s, instance: %s]",
|
||||
$self->{output}->output_add(long_msg => sprintf("Fanpack '%s' is %s rpm [status: %s, instance: %s]",
|
||||
$instance, $result->{fanPackAverageSpeedRPM}, $result->{fanPackState},
|
||||
$instance));
|
||||
my $exit = $self->get_severity(section => 'fanpack', value => $result->{fanPackState});
|
||||
|
|
|
@ -49,6 +49,7 @@ sub check {
|
|||
return if ($self->check_exclude(section => 'switchmodule'));
|
||||
|
||||
foreach my $oid ($self->{snmp}->oid_lex_sort(keys %{$self->{results}->{$mapping->{smHealthState}->{oid}}})) {
|
||||
$oid =~ /^$mapping->{smHealthState}->{oid}\.(.*)/;
|
||||
my $instance = $1;
|
||||
my $result = $self->{snmp}->map_instance(mapping => $mapping, results => $self->{results}->{$mapping->{smHealthState}->{oid}}, instance => $instance);
|
||||
|
||||
|
|
Loading…
Reference in New Issue