mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-27 15:44:21 +02:00
+ Fix hardware cisco f5 bigip
This commit is contained in:
parent
6b13062ee1
commit
427d021a63
@ -24,7 +24,7 @@ use strict;
|
|||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
my $mapping = {
|
my $mapping = {
|
||||||
sysChassisTempTemperature => { oid => '.1.3.6.1.4.1.3375.2.1.3.2.3.2.1.2', map => \%map_status },
|
sysChassisTempTemperature => { oid => '.1.3.6.1.4.1.3375.2.1.3.2.3.2.1.2' },
|
||||||
};
|
};
|
||||||
|
|
||||||
sub load {
|
sub load {
|
||||||
@ -54,7 +54,7 @@ sub check {
|
|||||||
|
|
||||||
if (defined($result->{sysChassisTempTemperature}) && $result->{sysChassisTempTemperature} =~ /[0-9]/) {
|
if (defined($result->{sysChassisTempTemperature}) && $result->{sysChassisTempTemperature} =~ /[0-9]/) {
|
||||||
my ($exit, $warn, $crit, $checked) = $self->get_severity_numeric(section => 'temperature', instance => $instance, value => $result->{sysChassisTempTemperature});
|
my ($exit, $warn, $crit, $checked) = $self->get_severity_numeric(section => 'temperature', instance => $instance, value => $result->{sysChassisTempTemperature});
|
||||||
if (!$self->{output}->is_status(value => $exit2, compare => 'ok', litteral => 1)) {
|
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
|
||||||
$self->{output}->output_add(severity => $exit,
|
$self->{output}->output_add(severity => $exit,
|
||||||
short_msg => sprintf("Temperature '%s' is %.2f C", $instance, $result->{sysChassisTempTemperature}));
|
short_msg => sprintf("Temperature '%s' is %.2f C", $instance, $result->{sysChassisTempTemperature}));
|
||||||
}
|
}
|
||||||
|
@ -32,6 +32,11 @@ my $thresholds = {
|
|||||||
['good', 'OK'],
|
['good', 'OK'],
|
||||||
['notPresent', 'OK'],
|
['notPresent', 'OK'],
|
||||||
],
|
],
|
||||||
|
psu => [
|
||||||
|
['bad', 'CRITICAL'],
|
||||||
|
['good', 'OK'],
|
||||||
|
['notPresent', 'OK'],
|
||||||
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
sub new {
|
sub new {
|
||||||
@ -74,13 +79,6 @@ sub check_options {
|
|||||||
push @{$self->{absent_problem}}, { filter => $values[0], instance => $values[1] };
|
push @{$self->{absent_problem}}, { filter => $values[0], instance => $values[1] };
|
||||||
}
|
}
|
||||||
|
|
||||||
$self->{absent_problem} = [];
|
|
||||||
foreach my $val (@{$self->{option_results}->{absent_problem}}) {
|
|
||||||
next if (!defined($val) || $val eq '');
|
|
||||||
my @values = split (/,/, $val);
|
|
||||||
push @{$self->{absent_problem}}, { filter => $values[0], instance => $values[1] };
|
|
||||||
}
|
|
||||||
|
|
||||||
$self->{overload_th} = {};
|
$self->{overload_th} = {};
|
||||||
foreach my $val (@{$self->{option_results}->{threshold_overload}}) {
|
foreach my $val (@{$self->{option_results}->{threshold_overload}}) {
|
||||||
next if (!defined($val) || $val eq '');
|
next if (!defined($val) || $val eq '');
|
||||||
@ -117,7 +115,7 @@ sub check_options {
|
|||||||
$self->{output}->option_exit();
|
$self->{output}->option_exit();
|
||||||
}
|
}
|
||||||
my ($section, $instance, $value) = ($1, $2, $3);
|
my ($section, $instance, $value) = ($1, $2, $3);
|
||||||
if (!defined($thresholds->{$section})) {
|
if ($section !~ /^(temperature|fan)$/) {
|
||||||
$self->{output}->add_option_msg(short_msg => "Wrong $option option '" . $val . "'.");
|
$self->{output}->add_option_msg(short_msg => "Wrong $option option '" . $val . "'.");
|
||||||
$self->{output}->option_exit();
|
$self->{output}->option_exit();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user