typo(dell/me4): indent
This commit is contained in:
parent
e5bde02012
commit
c366dec9b7
|
@ -44,23 +44,33 @@ sub check {
|
||||||
|
|
||||||
$self->{components}->{controller}->{total}++;
|
$self->{components}->{controller}->{total}++;
|
||||||
|
|
||||||
$self->{output}->output_add(long_msg => sprintf("Controller '%s' status is '%s', health is '%s', redundancy status is '%s'",
|
$self->{output}->output_add(
|
||||||
$result->{'durable-id'}, $result->{status}, $result->{health}, $result->{'redundancy-status'}));
|
long_msg => sprintf(
|
||||||
|
"controller '%s' status is '%s', health is '%s', redundancy status is '%s'",
|
||||||
|
$result->{'durable-id'}, $result->{status}, $result->{health}, $result->{'redundancy-status'}
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
my $exit1 = $self->get_severity(section => 'controller', value => $result->{status});
|
my $exit1 = $self->get_severity(section => 'controller', value => $result->{status});
|
||||||
if (!$self->{output}->is_status(value => $exit1, compare => 'ok', litteral => 1)) {
|
if (!$self->{output}->is_status(value => $exit1, compare => 'ok', litteral => 1)) {
|
||||||
$self->{output}->output_add(severity => $exit1,
|
$self->{output}->output_add(
|
||||||
short_msg => sprintf("Controller '%s' status is '%s'", $result->{'durable-id'}, $result->{status}));
|
severity => $exit1,
|
||||||
|
short_msg => sprintf("Controller '%s' status is '%s'", $result->{'durable-id'}, $result->{status})
|
||||||
|
);
|
||||||
}
|
}
|
||||||
my $exit2 = $self->get_severity(section => 'controller', value => $result->{health});
|
my $exit2 = $self->get_severity(section => 'controller', value => $result->{health});
|
||||||
if (!$self->{output}->is_status(value => $exit2, compare => 'ok', litteral => 1)) {
|
if (!$self->{output}->is_status(value => $exit2, compare => 'ok', litteral => 1)) {
|
||||||
$self->{output}->output_add(severity => $exit2,
|
$self->{output}->output_add(
|
||||||
short_msg => sprintf("Controller '%s' health is '%s'", $result->{'durable-id'}, $result->{health}));
|
severity => $exit2,
|
||||||
|
short_msg => sprintf("Controller '%s' health is '%s'", $result->{'durable-id'}, $result->{health})
|
||||||
|
);
|
||||||
}
|
}
|
||||||
my $exit3 = $self->get_severity(section => 'controller', value => $result->{health});
|
my $exit3 = $self->get_severity(section => 'controller', value => $result->{'redundancy-status'});
|
||||||
if (!$self->{output}->is_status(value => $exit3, compare => 'ok', litteral => 1)) {
|
if (!$self->{output}->is_status(value => $exit3, compare => 'ok', litteral => 1)) {
|
||||||
$self->{output}->output_add(severity => $exit3,
|
$self->{output}->output_add(
|
||||||
short_msg => sprintf("Controller '%s' redundancy status is '%s'", $result->{'redundancy-status'}, $result->{health}));
|
severity => $exit3,
|
||||||
|
short_msg => sprintf("Controller '%s' redundancy status is '%s'", $result->{'durable-id'}, $result->{'redundancy-status'})
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,7 @@ sub check {
|
||||||
|
|
||||||
$self->{output}->output_add(
|
$self->{output}->output_add(
|
||||||
long_msg => sprintf(
|
long_msg => sprintf(
|
||||||
"Disk '%s' status is '%s', health is '%s', state is '%s' [instance = %s] [temperature = %s C]",
|
"disk '%s' status is '%s', health is '%s', state is '%s' [instance = %s] [temperature = %s C]",
|
||||||
$result->{'serial-number'}, $result->{status}, $result->{health}, $result->{state}, $instance,
|
$result->{'serial-number'}, $result->{status}, $result->{health}, $result->{state}, $instance,
|
||||||
$result->{'temperature-numeric'}
|
$result->{'temperature-numeric'}
|
||||||
)
|
)
|
||||||
|
@ -99,8 +99,8 @@ sub check {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
$self->{output}->perfdata_add(
|
$self->{output}->perfdata_add(
|
||||||
label => 'temperature', unit => 'C',
|
|
||||||
nlabel => 'hardware.disk.temperature.celsius',
|
nlabel => 'hardware.disk.temperature.celsius',
|
||||||
|
unit => 'C',
|
||||||
instances => $instance,
|
instances => $instance,
|
||||||
value => $result->{'temperature-numeric'},
|
value => $result->{'temperature-numeric'},
|
||||||
warning => $warn,
|
warning => $warn,
|
||||||
|
|
|
@ -44,19 +44,27 @@ sub check {
|
||||||
|
|
||||||
$self->{components}->{fan}->{total}++;
|
$self->{components}->{fan}->{total}++;
|
||||||
|
|
||||||
$self->{output}->output_add(long_msg => sprintf("Fan '%s' status is '%s', health is '%s' [instance = %s] [speed = %s rpm]",
|
$self->{output}->output_add(
|
||||||
$result->{name}, $result->{status}, $result->{health}, $instance,
|
long_msg => sprintf(
|
||||||
$result->{speed}));
|
"fan '%s' status is '%s', health is '%s' [instance = %s] [speed = %s rpm]",
|
||||||
|
$result->{name}, $result->{status}, $result->{health}, $instance,
|
||||||
|
$result->{speed}
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
my $exit1 = $self->get_severity(section => 'fan', value => $result->{status});
|
my $exit1 = $self->get_severity(section => 'fan', value => $result->{status});
|
||||||
if (!$self->{output}->is_status(value => $exit1, compare => 'ok', litteral => 1)) {
|
if (!$self->{output}->is_status(value => $exit1, compare => 'ok', litteral => 1)) {
|
||||||
$self->{output}->output_add(severity => $exit1,
|
$self->{output}->output_add(
|
||||||
short_msg => sprintf("Fan '%s' status is '%s'", $result->{name}, $result->{status}));
|
severity => $exit1,
|
||||||
|
short_msg => sprintf("Fan '%s' status is '%s'", $result->{name}, $result->{status})
|
||||||
|
);
|
||||||
}
|
}
|
||||||
my $exit2 = $self->get_severity(section => 'fan', value => $result->{health});
|
my $exit2 = $self->get_severity(section => 'fan', value => $result->{health});
|
||||||
if (!$self->{output}->is_status(value => $exit2, compare => 'ok', litteral => 1)) {
|
if (!$self->{output}->is_status(value => $exit2, compare => 'ok', litteral => 1)) {
|
||||||
$self->{output}->output_add(severity => $exit2,
|
$self->{output}->output_add(
|
||||||
short_msg => sprintf("Fan '%s' health is '%s'", $result->{name}, $result->{health}));
|
severity => $exit2,
|
||||||
|
short_msg => sprintf("Fan '%s' health is '%s'", $result->{name}, $result->{health})
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
next if ($result->{speed} !~ /[0-9]/);
|
next if ($result->{speed} !~ /[0-9]/);
|
||||||
|
@ -66,8 +74,8 @@ sub check {
|
||||||
short_msg => sprintf("Fan '%s' speed is %s rpm", $result->{name}, $result->{speed}));
|
short_msg => sprintf("Fan '%s' speed is %s rpm", $result->{name}, $result->{speed}));
|
||||||
}
|
}
|
||||||
$self->{output}->perfdata_add(
|
$self->{output}->perfdata_add(
|
||||||
label => 'speed', unit => 'rpm',
|
|
||||||
nlabel => 'hardware.fan.speed.rpm',
|
nlabel => 'hardware.fan.speed.rpm',
|
||||||
|
unit => 'rpm',
|
||||||
instances => $instance,
|
instances => $instance,
|
||||||
value => $result->{speed},
|
value => $result->{speed},
|
||||||
warning => $warn,
|
warning => $warn,
|
||||||
|
|
|
@ -44,13 +44,19 @@ sub check {
|
||||||
|
|
||||||
$self->{components}->{fru}->{total}++;
|
$self->{components}->{fru}->{total}++;
|
||||||
|
|
||||||
$self->{output}->output_add(long_msg => sprintf("FRU '%s' status is '%s'",
|
$self->{output}->output_add(
|
||||||
$result->{name}, $result->{'fru-status'}));
|
long_msg => sprintf(
|
||||||
|
"fru '%s' status is '%s'",
|
||||||
|
$result->{name}, $result->{'fru-status'}
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
my $exit1 = $self->get_severity(section => 'fru', value => $result->{'fru-status'});
|
my $exit1 = $self->get_severity(section => 'fru', value => $result->{'fru-status'});
|
||||||
if (!$self->{output}->is_status(value => $exit1, compare => 'ok', litteral => 1)) {
|
if (!$self->{output}->is_status(value => $exit1, compare => 'ok', litteral => 1)) {
|
||||||
$self->{output}->output_add(severity => $exit1,
|
$self->{output}->output_add(
|
||||||
short_msg => sprintf("FRU '%s' status is '%s'", $result->{name}, $result->{'fru-status'}));
|
severity => $exit1,
|
||||||
|
short_msg => sprintf("FRU '%s' status is '%s'", $result->{name}, $result->{'fru-status'})
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,18 +44,26 @@ sub check {
|
||||||
|
|
||||||
$self->{components}->{psu}->{total}++;
|
$self->{components}->{psu}->{total}++;
|
||||||
|
|
||||||
$self->{output}->output_add(long_msg => sprintf("Power supply '%s' status is '%s', health is '%s' [instance = %s]",
|
$self->{output}->output_add(
|
||||||
$result->{name}, $result->{status}, $result->{health}, $instance));
|
long_msg => sprintf(
|
||||||
|
"power supply '%s' status is '%s', health is '%s' [instance = %s]",
|
||||||
|
$result->{name}, $result->{status}, $result->{health}, $instance
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
my $exit1 = $self->get_severity(section => 'psu', value => $result->{status});
|
my $exit1 = $self->get_severity(section => 'psu', value => $result->{status});
|
||||||
if (!$self->{output}->is_status(value => $exit1, compare => 'ok', litteral => 1)) {
|
if (!$self->{output}->is_status(value => $exit1, compare => 'ok', litteral => 1)) {
|
||||||
$self->{output}->output_add(severity => $exit1,
|
$self->{output}->output_add(
|
||||||
short_msg => sprintf("Power supply '%s' status is '%s'", $result->{name}, $result->{status}));
|
severity => $exit1,
|
||||||
|
short_msg => sprintf("Power supply '%s' status is '%s'", $result->{name}, $result->{status})
|
||||||
|
);
|
||||||
}
|
}
|
||||||
my $exit2 = $self->get_severity(section => 'psu', value => $result->{health});
|
my $exit2 = $self->get_severity(section => 'psu', value => $result->{health});
|
||||||
if (!$self->{output}->is_status(value => $exit2, compare => 'ok', litteral => 1)) {
|
if (!$self->{output}->is_status(value => $exit2, compare => 'ok', litteral => 1)) {
|
||||||
$self->{output}->output_add(severity => $exit2,
|
$self->{output}->output_add(
|
||||||
short_msg => sprintf("Power supply '%s' health is '%s'", $result->{name}, $result->{health}));
|
severity => $exit2,
|
||||||
|
short_msg => sprintf("Power supply '%s' health is '%s'", $result->{name}, $result->{health})
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,14 +71,20 @@ sub check {
|
||||||
|
|
||||||
$self->{components}->{sensor}->{total}++;
|
$self->{components}->{sensor}->{total}++;
|
||||||
|
|
||||||
$self->{output}->output_add(long_msg => sprintf("Sensor '%s' status is '%s' [instance = %s] [value = %s]",
|
$self->{output}->output_add(
|
||||||
$result->{'sensor-name'}, $result->{status}, $instance,
|
long_msg => sprintf(
|
||||||
$result->{value}));
|
"sensor '%s' status is '%s' [instance = %s] [value = %s]",
|
||||||
|
$result->{'sensor-name'}, $result->{status}, $instance,
|
||||||
|
$result->{value}
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
my $exit1 = $self->get_severity(section => 'sensor', value => $result->{status});
|
my $exit1 = $self->get_severity(section => 'sensor', value => $result->{status});
|
||||||
if (!$self->{output}->is_status(value => $exit1, compare => 'ok', litteral => 1)) {
|
if (!$self->{output}->is_status(value => $exit1, compare => 'ok', litteral => 1)) {
|
||||||
$self->{output}->output_add(severity => $exit1,
|
$self->{output}->output_add(
|
||||||
short_msg => sprintf("sensor '%s' status is '%s'", $result->{'sensor-name'}, $result->{status}));
|
severity => $exit1,
|
||||||
|
short_msg => sprintf("sensor '%s' status is '%s'", $result->{'sensor-name'}, $result->{status})
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
next if (!defined($mapping{$result->{'sensor-type'}}));
|
next if (!defined($mapping{$result->{'sensor-type'}}));
|
||||||
|
@ -86,11 +92,12 @@ sub check {
|
||||||
my $value = $1;
|
my $value = $1;
|
||||||
my ($exit3, $warn, $crit, $checked) = $self->get_severity_numeric(section => 'sensor', instance => $instance, value => $value);
|
my ($exit3, $warn, $crit, $checked) = $self->get_severity_numeric(section => 'sensor', instance => $instance, value => $value);
|
||||||
if (!$self->{output}->is_status(value => $exit3, compare => 'ok', litteral => 1)) {
|
if (!$self->{output}->is_status(value => $exit3, compare => 'ok', litteral => 1)) {
|
||||||
$self->{output}->output_add(severity => $exit3,
|
$self->{output}->output_add(
|
||||||
short_msg => sprintf("Sensor '%s' value is %s %s", $result->{'sensor-name'}, $value, $mapping{$result->{'sensor-type'}}->{nunit}));
|
severity => $exit3,
|
||||||
|
short_msg => sprintf("Sensor '%s' value is %s %s", $result->{'sensor-name'}, $value, $mapping{$result->{'sensor-type'}}->{nunit})
|
||||||
|
);
|
||||||
}
|
}
|
||||||
$self->{output}->perfdata_add(
|
$self->{output}->perfdata_add(
|
||||||
label => 'sensor', unit => $mapping{$result->{'sensor-type'}}->{unit},
|
|
||||||
nlabel => 'hardware.sensor.' . $mapping{$result->{'sensor-type'}}->{nlabel} . '.' . $mapping{$result->{'sensor-type'}}->{nunit},
|
nlabel => 'hardware.sensor.' . $mapping{$result->{'sensor-type'}}->{nlabel} . '.' . $mapping{$result->{'sensor-type'}}->{nunit},
|
||||||
instances => $instance,
|
instances => $instance,
|
||||||
value => $value,
|
value => $value,
|
||||||
|
|
|
@ -44,13 +44,19 @@ sub check {
|
||||||
|
|
||||||
$self->{components}->{volume}->{total}++;
|
$self->{components}->{volume}->{total}++;
|
||||||
|
|
||||||
$self->{output}->output_add(long_msg => sprintf("Volume '%s' health is '%s' [instance = %s]",
|
$self->{output}->output_add(
|
||||||
$result->{'volume-name'}, $result->{health}, $instance));
|
long_msg => sprintf(
|
||||||
|
"volume '%s' health is '%s' [instance = %s]",
|
||||||
|
$result->{'volume-name'}, $result->{health}, $instance
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
my $exit1 = $self->get_severity(section => 'volume', value => $result->{health});
|
my $exit1 = $self->get_severity(section => 'volume', value => $result->{health});
|
||||||
if (!$self->{output}->is_status(value => $exit1, compare => 'ok', litteral => 1)) {
|
if (!$self->{output}->is_status(value => $exit1, compare => 'ok', litteral => 1)) {
|
||||||
$self->{output}->output_add(severity => $exit1,
|
$self->{output}->output_add(
|
||||||
short_msg => sprintf("Volume '%s' health is '%s'", $result->{'volume-name'}, $result->{health}));
|
severity => $exit1,
|
||||||
|
short_msg => sprintf("Volume '%s' health is '%s'", $result->{'volume-name'}, $result->{health})
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue