Fix #6190
This commit is contained in:
parent
116128ba98
commit
dca7c7a231
|
@ -496,7 +496,7 @@ Check Hardware (CPUs, Power Supplies, Power converters, Fans).
|
||||||
|
|
||||||
=item B<--component>
|
=item B<--component>
|
||||||
|
|
||||||
Which component to check (Default: 'all').
|
Which component to check (Default: '.*').
|
||||||
Can be: 'cpu', 'psu', 'pc', 'fan', 'temperature', 'lnic', 'pnic',...
|
Can be: 'cpu', 'psu', 'pc', 'fan', 'temperature', 'lnic', 'pnic',...
|
||||||
There are some magic words like: 'network', 'storage'.
|
There are some magic words like: 'network', 'storage'.
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,19 @@ my %map_states_fan = (
|
||||||
2 => 'reading error',
|
2 => 'reading error',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
my $mapping = {
|
||||||
|
fanSpeedSensorName => { oid => '.1.3.6.1.4.1.2620.1.6.7.8.2.1.2' },
|
||||||
|
fanSpeedSensorValue => { oid => '.1.3.6.1.4.1.2620.1.6.7.8.2.1.3' },
|
||||||
|
fanSpeedSensorStatus => { oid => '.1.3.6.1.4.1.2620.1.6.7.8.2.1.6', map => \%map_states_fan },
|
||||||
|
};
|
||||||
|
my $oid_fanSpeedSensorEntry = '.1.3.6.1.4.1.2620.1.6.7.8.2.1';
|
||||||
|
|
||||||
|
sub load {
|
||||||
|
my (%options) = @_;
|
||||||
|
|
||||||
|
push @{$options{request}}, { oid => $oid_fanSpeedSensorEntry, start => $mapping->{fanSpeedSensorName}->{oid}, end => $mapping->{fanSpeedSensorStatus}->{oid} };
|
||||||
|
}
|
||||||
|
|
||||||
sub check {
|
sub check {
|
||||||
my ($self) = @_;
|
my ($self) = @_;
|
||||||
|
|
||||||
|
@ -51,34 +64,24 @@ sub check {
|
||||||
$self->{components}->{fan} = {name => 'fans', total => 0, skip => 0};
|
$self->{components}->{fan} = {name => 'fans', total => 0, skip => 0};
|
||||||
return if ($self->check_exclude(section => 'fan'));
|
return if ($self->check_exclude(section => 'fan'));
|
||||||
|
|
||||||
my $oid_fanSpeedSensorEntry = '.1.3.6.1.4.1.2620.1.6.7.8.2.1';
|
foreach my $oid ($self->{snmp}->oid_lex_sort(keys %{$self->{results}->{$oid_fanSpeedSensorEntry}})) {
|
||||||
my $oid_fanSpeedSensorStatus = '.1.3.6.1.4.1.2620.1.6.7.8.2.1.6';
|
next if ($oid !~ /^$mapping->{fanSpeedSensorStatus}->{oid}\.(.*)$/);
|
||||||
my $oid_fanSpeedSensorValue = '.1.3.6.1.4.1.2620.1.6.7.8.2.1.3';
|
|
||||||
my $oid_fanSpeedSensorName = '.1.3.6.1.4.1.2620.1.6.7.8.2.1.2';
|
|
||||||
|
|
||||||
my $result = $self->{snmp}->get_table(oid => $oid_fanSpeedSensorEntry);
|
|
||||||
return if (scalar(keys %$result) <= 0);
|
|
||||||
|
|
||||||
foreach my $key ($self->{snmp}->oid_lex_sort(keys %$result)) {
|
|
||||||
next if ($key !~ /^$oid_fanSpeedSensorStatus\.(\d+).(\d+)$/);
|
|
||||||
my $instance = $1;
|
my $instance = $1;
|
||||||
|
my $result = $self->{snmp}->map_instance(mapping => $mapping, results => $self->{results}->{$oid_fanSpeedSensorEntry}, instance => $instance);
|
||||||
|
|
||||||
next if ($self->check_exclude(section => 'fan', instance => $instance));
|
next if ($self->check_exclude(section => 'fan', instance => $instance));
|
||||||
|
|
||||||
my $fan_name = $result->{$oid_fanSpeedSensorName . '.' . $instance};
|
|
||||||
my $fan_state = $result->{$oid_fanSpeedSensorStatus . '.' . $instance};
|
|
||||||
|
|
||||||
$self->{components}->{fan}->{total}++;
|
$self->{components}->{fan}->{total}++;
|
||||||
$self->{output}->output_add(long_msg => sprintf("Fan '%s' sensor out of range status is '%s'",
|
$self->{output}->output_add(long_msg => sprintf("Fan '%s' sensor out of range status is '%s'",
|
||||||
$fan_name, $map_states_fan{$fan_state}));
|
$result->{fanSpeedSensorName}, $result->{fanSpeedSensorStatus}));
|
||||||
my $exit = $self->get_severity(section => 'fan', value => $map_states_fan{$fan_state});
|
my $exit = $self->get_severity(section => 'fan', value => $result->{fanSpeedSensorStatus});
|
||||||
if (!$self->{output}->is_status(value => $exit, 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("Fan '%s' sensor out of range status is '%s'", $fan_name, $map_states_fan{$fan_state}));
|
short_msg => sprintf("Fan '%s' sensor out of range status is '%s'", $result->{fanSpeedSensorName}, $result->{fanSpeedSensorStatus}));
|
||||||
}
|
}
|
||||||
|
|
||||||
$self->{output}->perfdata_add(label => $fan_name , unit => 'rpm',
|
$self->{output}->perfdata_add(label => $result->{fanSpeedSensorName}, unit => 'rpm',
|
||||||
value => sprintf("%d", $result->{$oid_fanSpeedSensorValue . '.' . $instance}));
|
value => sprintf("%d", $result->{fanSpeedSensorValue}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,17 @@ package network::checkpoint::mode::components::psu;
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
|
my $mapping = {
|
||||||
|
powerSupplyStatus => { oid => '.1.3.6.1.4.1.2620.1.6.7.9.1.1.2' },
|
||||||
|
};
|
||||||
|
my $oid_powerSupplyStatus = '.1.3.6.1.4.1.2620.1.6.7.9.1.1.2';
|
||||||
|
|
||||||
|
sub load {
|
||||||
|
my (%options) = @_;
|
||||||
|
|
||||||
|
push @{$options{request}}, { oid => $oid_powerSupplyStatus };
|
||||||
|
}
|
||||||
|
|
||||||
sub check {
|
sub check {
|
||||||
my ($self) = @_;
|
my ($self) = @_;
|
||||||
|
|
||||||
|
@ -45,26 +56,20 @@ sub check {
|
||||||
$self->{components}->{psu} = {name => 'psus', total => 0, skip => 0};
|
$self->{components}->{psu} = {name => 'psus', total => 0, skip => 0};
|
||||||
return if ($self->check_exclude(section => 'psu'));
|
return if ($self->check_exclude(section => 'psu'));
|
||||||
|
|
||||||
my $oid_powerSupplyStatus = '.1.3.6.1.4.1.2620.1.6.7.9.1.1.2';
|
foreach my $oid ($self->{snmp}->oid_lex_sort(keys %{$self->{results}->{$oid_powerSupplyStatus}})) {
|
||||||
|
next if ($oid !~ /^$mapping->{powerSupplyStatus}->{oid}\.(.*)$/);
|
||||||
my $result = $self->{snmp}->get_table(oid => $oid_powerSupplyStatus);
|
|
||||||
return if (scalar(keys %$result) <= 0);
|
|
||||||
|
|
||||||
foreach my $key ($self->{snmp}->oid_lex_sort(keys %$result)) {
|
|
||||||
$key =~ /^$oid_powerSupplyStatus\.(\d+).(\d+)$/;
|
|
||||||
my $instance = $1;
|
my $instance = $1;
|
||||||
|
my $result = $self->{snmp}->map_instance(mapping => $mapping, results => $self->{results}->{$oid_powerSupplyStatus}, instance => $instance);
|
||||||
|
|
||||||
next if ($self->check_exclude(section => 'psu', instance => $instance));
|
next if ($self->check_exclude(section => 'psu', instance => $instance));
|
||||||
|
|
||||||
my $psu_state = $result->{$key};
|
|
||||||
|
|
||||||
$self->{components}->{psu}->{total}++;
|
$self->{components}->{psu}->{total}++;
|
||||||
$self->{output}->output_add(long_msg => sprintf("Power supply '%s' status is '%s'",
|
$self->{output}->output_add(long_msg => sprintf("Power supply '%s' status is '%s'",
|
||||||
$instance, $psu_state));
|
$instance, $result->{powerSupplyStatus}));
|
||||||
my $exit = $self->get_severity(section => 'psu', value => $psu_state);
|
my $exit = $self->get_severity(section => 'psu', value => $result->{powerSupplyStatus});
|
||||||
if (!$self->{output}->is_status(value => $exit, 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("Power supply '%s' status is '%s'", $instance, $psu_state));
|
short_msg => sprintf("Power supply '%s' status is '%s'", $instance, $result->{powerSupplyStatus}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,6 +44,18 @@ my %map_states_temperature = (
|
||||||
2 => 'reading error',
|
2 => 'reading error',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
my $mapping = {
|
||||||
|
tempertureSensorName => { oid => '.1.3.6.1.4.1.2620.1.6.7.8.1.1.2' },
|
||||||
|
tempertureSensorValue => { oid => '.1.3.6.1.4.1.2620.1.6.7.8.1.1.3' },
|
||||||
|
tempertureSensorStatus => { oid => '.1.3.6.1.4.1.2620.1.6.7.8.1.1.6', map => \%map_states_temperature },
|
||||||
|
};
|
||||||
|
my $oid_tempertureSensorEntry = '.1.3.6.1.4.1.2620.1.6.7.8.1.1';
|
||||||
|
|
||||||
|
sub load {
|
||||||
|
my (%options) = @_;
|
||||||
|
|
||||||
|
push @{$options{request}}, { oid => $oid_tempertureSensorEntry, start => $mapping->{tempertureSensorName}->{oid}, end => $mapping->{tempertureSensorStatus}->{oid} };
|
||||||
|
}
|
||||||
|
|
||||||
sub check {
|
sub check {
|
||||||
my ($self) = @_;
|
my ($self) = @_;
|
||||||
|
@ -52,33 +64,24 @@ sub check {
|
||||||
$self->{components}->{temperature} = {name => 'temperatures', total => 0, skip => 0};
|
$self->{components}->{temperature} = {name => 'temperatures', total => 0, skip => 0};
|
||||||
return if ($self->check_exclude(section => 'temperature'));
|
return if ($self->check_exclude(section => 'temperature'));
|
||||||
|
|
||||||
my $oid_tempertureSensorEntry = '.1.3.6.1.4.1.2620.1.6.7.8.1.1';
|
foreach my $oid ($self->{snmp}->oid_lex_sort(keys %{$self->{results}->{$oid_tempertureSensorEntry}})) {
|
||||||
my $oid_tempertureSensorName = '.1.3.6.1.4.1.2620.1.6.7.8.1.1.2';
|
next if ($oid !~ /^$mapping->{tempertureSensorStatus}->{oid}\.(.*)$/);
|
||||||
my $oid_tempertureSensorValue = '.1.3.6.1.4.1.2620.1.6.7.8.1.1.3';
|
|
||||||
my $oid_tempertureSensorStatus = '.1.3.6.1.4.1.2620.1.6.7.8.1.1.6';
|
|
||||||
|
|
||||||
my $result = $self->{snmp}->get_table(oid => $oid_tempertureSensorEntry);
|
|
||||||
return if (scalar(keys %$result) <= 0);
|
|
||||||
|
|
||||||
foreach my $key ($self->{snmp}->oid_lex_sort(keys %$result)) {
|
|
||||||
next if ($key !~ /^$oid_tempertureSensorValue\.(\d+).(\d+)$/);
|
|
||||||
my $instance = $1;
|
my $instance = $1;
|
||||||
|
my $result = $self->{snmp}->map_instance(mapping => $mapping, results => $self->{results}->{$oid_tempertureSensorEntry}, instance => $instance);
|
||||||
|
|
||||||
next if ($self->check_exclude(section => 'temperature', instance => $instance));
|
next if ($self->check_exclude(section => 'temperature', instance => $instance));
|
||||||
my $temperature_name = $result->{$oid_tempertureSensorName . '.' . $instance};
|
|
||||||
my $temperature_state = $result->{$oid_tempertureSensorStatus . '.' . $instance};
|
|
||||||
|
|
||||||
$self->{components}->{temperature}->{total}++;
|
$self->{components}->{temperature}->{total}++;
|
||||||
$self->{output}->output_add(long_msg => sprintf("Temperature '%s' sensor out of range status is '%s'",
|
$self->{output}->output_add(long_msg => sprintf("Temperature '%s' sensor out of range status is '%s'",
|
||||||
$temperature_name, $map_states_temperature{$temperature_state}));
|
$result->{tempertureSensorName}, $result->{tempertureSensorStatus}));
|
||||||
my $exit = $self->get_severity(section => 'temperature', value => $map_states_temperature{$temperature_state});
|
my $exit = $self->get_severity(section => 'temperature', value => $result->{tempertureSensorStatus});
|
||||||
if (!$self->{output}->is_status(value => $exit, 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' sensor out of range status is '%s'", $temperature_name, $map_states_temperature{$temperature_state}));
|
short_msg => sprintf("Temperature '%s' sensor out of range status is '%s'", $result->{tempertureSensorName}, $result->{tempertureSensorStatus}));
|
||||||
}
|
}
|
||||||
|
|
||||||
$self->{output}->perfdata_add(label => $temperature_name , unit => 'C',
|
$self->{output}->perfdata_add(label => $result->{tempertureSensorName} , unit => 'C',
|
||||||
value => sprintf("%.2f", $result->{$oid_tempertureSensorValue . '.' . $instance}));
|
value => sprintf("%.2f", $result->{tempertureSensorValue}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,19 @@ my %map_states_voltage = (
|
||||||
2 => 'reading error',
|
2 => 'reading error',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
my $mapping = {
|
||||||
|
voltageSensorName => { oid => '.1.3.6.1.4.1.2620.1.6.7.8.3.1.2' },
|
||||||
|
voltageSensorValue => { oid => '.1.3.6.1.4.1.2620.1.6.7.8.3.1.3' },
|
||||||
|
voltageSensorStatus => { oid => '.1.3.6.1.4.1.2620.1.6.7.8.3.1.6', map => \%map_states_voltage },
|
||||||
|
};
|
||||||
|
my $oid_voltageSensorEntry = '.1.3.6.1.4.1.2620.1.6.7.8.3.1';
|
||||||
|
|
||||||
|
sub load {
|
||||||
|
my (%options) = @_;
|
||||||
|
|
||||||
|
push @{$options{request}}, { oid => $oid_voltageSensorEntry, start => $mapping->{voltageSensorName}->{oid}, end => $mapping->{voltageSensorStatus}->{oid} };
|
||||||
|
}
|
||||||
|
|
||||||
sub check {
|
sub check {
|
||||||
my ($self) = @_;
|
my ($self) = @_;
|
||||||
|
|
||||||
|
@ -51,32 +64,23 @@ sub check {
|
||||||
$self->{components}->{voltage} = {name => 'voltages', total => 0, skip => 0};
|
$self->{components}->{voltage} = {name => 'voltages', total => 0, skip => 0};
|
||||||
return if ($self->check_exclude(section => 'voltage'));
|
return if ($self->check_exclude(section => 'voltage'));
|
||||||
|
|
||||||
my $oid_voltageSensorEntry = '.1.3.6.1.4.1.2620.1.6.7.8.3.1';
|
foreach my $oid ($self->{snmp}->oid_lex_sort(keys %{$self->{results}->{$oid_voltageSensorEntry}})) {
|
||||||
my $oid_voltageSensorStatus = '.1.3.6.1.4.1.2620.1.6.7.8.3.1.6';
|
next if ($oid !~ /^$mapping->{voltageSensorStatus}->{oid}\.(.*)$/);
|
||||||
my $oid_voltageSensorValue = '.1.3.6.1.4.1.2620.1.6.7.8.3.1.3';
|
|
||||||
my $oid_voltageSensorName = '.1.3.6.1.4.1.2620.1.6.7.8.3.1.2';
|
|
||||||
|
|
||||||
my $result = $self->{snmp}->get_table(oid => $oid_voltageSensorEntry);
|
|
||||||
return if (scalar(keys %$result) <= 0);
|
|
||||||
|
|
||||||
foreach my $key ($self->{snmp}->oid_lex_sort(keys %$result)) {
|
|
||||||
next if ($key !~ /^$oid_voltageSensorStatus\.(\d+).(\d+)$/);
|
|
||||||
my $instance = $1;
|
my $instance = $1;
|
||||||
|
my $result = $self->{snmp}->map_instance(mapping => $mapping, results => $self->{results}->{$oid_voltageSensorEntry}, instance => $instance);
|
||||||
|
|
||||||
next if ($self->check_exclude(section => 'voltage', instance => $instance));
|
next if ($self->check_exclude(section => 'voltage', instance => $instance));
|
||||||
my $voltage_name = $result->{$oid_voltageSensorName . '.' . $instance};
|
|
||||||
my $voltage_state = $result->{$oid_voltageSensorStatus . '.' . $instance};
|
|
||||||
|
|
||||||
$self->{components}->{voltage}->{total}++;
|
$self->{components}->{voltage}->{total}++;
|
||||||
$self->{output}->output_add(long_msg => sprintf("Voltage '%s' sensor out of range status is '%s'",
|
$self->{output}->output_add(long_msg => sprintf("Voltage '%s' sensor out of range status is '%s'",
|
||||||
$voltage_name, $map_states_voltage{$voltage_state}));
|
$result->{voltageSensorName}, $result->{voltageSensorStatus}));
|
||||||
my $exit = $self->get_severity(section => 'voltage', value => $map_states_voltage{$voltage_state});
|
my $exit = $self->get_severity(section => 'voltage', value => $result->{voltageSensorStatus});
|
||||||
if (!$self->{output}->is_status(value => $exit, 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("Voltage '%s' sensor out of range status is '%s'", $voltage_name, $map_states_voltage{$voltage_state}));
|
short_msg => sprintf("Voltage '%s' sensor out of range status is '%s'", $result->{voltageSensorName}, $result->{voltageSensorStatus}));
|
||||||
}
|
}
|
||||||
$self->{output}->perfdata_add(label => $voltage_name , unit => 'V',
|
$self->{output}->perfdata_add(label => $result->{voltageSensorName} , unit => 'V',
|
||||||
value => sprintf("%d", $result->{$oid_voltageSensorValue . '.' . $instance}));
|
value => sprintf("%d", $result->{voltageSensorValue}));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,11 +40,6 @@ use base qw(centreon::plugins::mode);
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
use network::checkpoint::mode::components::fan;
|
|
||||||
use network::checkpoint::mode::components::voltage;
|
|
||||||
use network::checkpoint::mode::components::temperature;
|
|
||||||
use network::checkpoint::mode::components::psu;
|
|
||||||
|
|
||||||
my $thresholds = {
|
my $thresholds = {
|
||||||
temperature => [
|
temperature => [
|
||||||
['true', 'CRITICAL'],
|
['true', 'CRITICAL'],
|
||||||
|
@ -77,7 +72,7 @@ sub new {
|
||||||
$options{options}->add_options(arguments =>
|
$options{options}->add_options(arguments =>
|
||||||
{
|
{
|
||||||
"exclude:s" => { name => 'exclude' },
|
"exclude:s" => { name => 'exclude' },
|
||||||
"component:s" => { name => 'component', default => 'all' },
|
"component:s" => { name => 'component', default => '.*' },
|
||||||
"no-component:s" => { name => 'no_component' },
|
"no-component:s" => { name => 'no_component' },
|
||||||
"threshold-overload:s@" => { name => 'threshold_overload' },
|
"threshold-overload:s@" => { name => 'threshold_overload' },
|
||||||
});
|
});
|
||||||
|
@ -114,34 +109,36 @@ sub check_options {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sub global {
|
|
||||||
my ($self, %options) = @_;
|
|
||||||
|
|
||||||
network::checkpoint::mode::components::temperature::check($self);
|
|
||||||
network::checkpoint::mode::components::fan::check($self);
|
|
||||||
network::checkpoint::mode::components::voltage::check($self);
|
|
||||||
network::checkpoint::mode::components::psu::check($self);
|
|
||||||
}
|
|
||||||
|
|
||||||
sub run {
|
sub run {
|
||||||
my ($self, %options) = @_;
|
my ($self, %options) = @_;
|
||||||
# $options{snmp} = snmp object
|
# $options{snmp} = snmp object
|
||||||
$self->{snmp} = $options{snmp};
|
$self->{snmp} = $options{snmp};
|
||||||
|
|
||||||
if ($self->{option_results}->{component} eq 'all') {
|
my $snmp_request = [];
|
||||||
$self->global();
|
my @components = ('voltage', 'fan', 'temperature', 'psu');
|
||||||
} elsif ($self->{option_results}->{component} eq 'fan') {
|
foreach (@components) {
|
||||||
network::checkpoint::mode::components::fan::check($self);
|
if (/$self->{option_results}->{component}/) {
|
||||||
} elsif ($self->{option_results}->{component} eq 'voltage') {
|
my $mod_name = "network::checkpoint::mode::components::$_";
|
||||||
network::checkpoint::mode::components::voltage::check($self);
|
centreon::plugins::misc::mymodule_load(output => $self->{output}, module => $mod_name,
|
||||||
} elsif ($self->{option_results}->{component} eq 'temperature') {
|
error_msg => "Cannot load module '$mod_name'.");
|
||||||
network::checkpoint::mode::components::temperature::check($self);
|
my $func = $mod_name->can('load');
|
||||||
} elsif ($self->{option_results}->{component} eq 'psu') {
|
$func->(request => $snmp_request);
|
||||||
network::checkpoint::mode::components::psu::check($self);
|
}
|
||||||
} else {
|
}
|
||||||
|
|
||||||
|
if (scalar(@{$snmp_request}) == 0) {
|
||||||
$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();
|
||||||
}
|
}
|
||||||
|
$self->{results} = $self->{snmp}->get_multiple_table(oids => $snmp_request);
|
||||||
|
|
||||||
|
foreach (@components) {
|
||||||
|
if (/$self->{option_results}->{component}/) {
|
||||||
|
my $mod_name = "network::checkpoint::mode::components::$_";
|
||||||
|
my $func = $mod_name->can('check');
|
||||||
|
$func->($self);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
my $total_components = 0;
|
my $total_components = 0;
|
||||||
my $display_by_component = '';
|
my $display_by_component = '';
|
||||||
|
@ -220,7 +217,7 @@ Check hardware (fans, power supplies, temperatures, voltages).
|
||||||
|
|
||||||
=item B<--component>
|
=item B<--component>
|
||||||
|
|
||||||
Which component to check (Default: 'all').
|
Which component to check (Default: '.*').
|
||||||
Can be: 'psu', 'fan', 'temperature', 'voltage'.
|
Can be: 'psu', 'fan', 'temperature', 'voltage'.
|
||||||
|
|
||||||
=item B<--exclude>
|
=item B<--exclude>
|
||||||
|
|
Loading…
Reference in New Issue