Correcting with return code from 2014 official Checkpoint Doc
This commit is contained in:
parent
49353d703e
commit
f07aa3e415
|
@ -39,9 +39,7 @@ use strict;
|
|||
use warnings;
|
||||
|
||||
my %map_status = (
|
||||
1 => 'Out of range',
|
||||
2 => 'OK',
|
||||
3 => 'Error reading',
|
||||
0 => 'OK',
|
||||
);
|
||||
|
||||
sub check {
|
||||
|
@ -73,8 +71,8 @@ sub check {
|
|||
$instance, $map_status{$status}));
|
||||
if ($status != 2) {
|
||||
$self->{output}->output_add(severity => 'CRITICAL',
|
||||
short_msg => sprintf("Fan '%s' status is %s",
|
||||
$instance, $map_status{$status}));
|
||||
short_msg => sprintf("Fan '%s' status is in an error state",
|
||||
$instance));
|
||||
}
|
||||
|
||||
$self->{output}->perfdata_add(label => $fan_name , unit => 'rpm', value => sprintf("%d", $result->{$oid_fanSpeedSensorValue . '.' . $instance})),
|
||||
|
|
|
@ -39,9 +39,7 @@ use strict;
|
|||
use warnings;
|
||||
|
||||
my %map_status = (
|
||||
1 => 'Out of range',
|
||||
2 => 'OK',
|
||||
3 => 'Error reading',
|
||||
0 => 'OK',
|
||||
);
|
||||
|
||||
sub check {
|
||||
|
@ -70,10 +68,10 @@ sub check {
|
|||
$self->{components}->{psus}->{total}++;
|
||||
$self->{output}->output_add(long_msg => sprintf("Power Supply '%s' status is %s.",
|
||||
$instance, $map_status{$status}));
|
||||
if ($status != 2) {
|
||||
if ($status != 0) {
|
||||
$self->{output}->output_add(severity => 'CRITICAL',
|
||||
short_msg => sprintf("Power Supply '%s' status is %s",
|
||||
$instance, $map_status{$status}));
|
||||
short_msg => sprintf("Power Supply '%s' status is in an error state",
|
||||
$instance));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => $psu_name , unit => 'V', value => sprintf("%d", $result->{$oid_voltageSensorValue . '.' . $instance})),
|
||||
|
||||
|
|
|
@ -39,9 +39,7 @@ use strict;
|
|||
use warnings;
|
||||
|
||||
my %map_status = (
|
||||
1 => 'Out of range',
|
||||
2 => 'OK',
|
||||
3 => 'Error reading',
|
||||
0 => 'OK',
|
||||
);
|
||||
|
||||
sub check {
|
||||
|
@ -72,10 +70,10 @@ sub check {
|
|||
|
||||
$self->{output}->output_add(long_msg => sprintf("Temperature '%s' status is %s.",
|
||||
$instance, $map_status{$status}));
|
||||
if ($status != 2) {
|
||||
if ($status != 0) {
|
||||
$self->{output}->output_add(severity => 'CRITICAL',
|
||||
short_msg => sprintf("Temperature '%s' status is %s",
|
||||
$instance, $map_status{$status}));
|
||||
short_msg => sprintf("Temperature '%s' status is in an error state",
|
||||
$instance));
|
||||
}
|
||||
|
||||
$self->{output}->perfdata_add(label => $temperature_name , unit => 'C', value => sprintf("%.2f", $result->{$oid_tempertureSensorValue . '.' . $instance})),
|
||||
|
|
Loading…
Reference in New Issue