Refs #5844
This commit is contained in:
parent
04d78a9a70
commit
138853e5e4
|
@ -178,8 +178,7 @@ sub run {
|
||||||
$self->{snmp} = $options{snmp};
|
$self->{snmp} = $options{snmp};
|
||||||
|
|
||||||
|
|
||||||
$self->{results} = $self->{snmp}->get_leef(oids => [$oid_synoSystempowerStatus, $oid_synoSystemcpuFanStatus, $oid_synoSystemsystemFanStatus, $oid_synoSystemsystemStatus],
|
$self->{results} = $self->{snmp}->get_leef(oids => [$oid_synoSystempowerStatus, $oid_synoSystemcpuFanStatus, $oid_synoSystemsystemFanStatus, $oid_synoSystemsystemStatus]);
|
||||||
nothing_quit => 1);
|
|
||||||
|
|
||||||
if ($self->{option_results}->{component} eq 'all') {
|
if ($self->{option_results}->{component} eq 'all') {
|
||||||
$self->check_fan_cpu();
|
$self->check_fan_cpu();
|
||||||
|
@ -351,7 +350,7 @@ sub check_disk {
|
||||||
return if ($self->check_exclude(section => 'disk'));
|
return if ($self->check_exclude(section => 'disk'));
|
||||||
|
|
||||||
|
|
||||||
my $results = $self->{snmp}->get_table(oid => $oid_synoDisk, return_type => 1);
|
my $results = $self->{snmp}->get_table(oid => $oid_synoDisk);
|
||||||
|
|
||||||
my $instance = 0;
|
my $instance = 0;
|
||||||
|
|
||||||
|
@ -382,14 +381,11 @@ sub check_raid {
|
||||||
$self->{components}->{raid} = {name => 'raid', total => 0, skip => 0};
|
$self->{components}->{raid} = {name => 'raid', total => 0, skip => 0};
|
||||||
return if ($self->check_exclude(section => 'raid'));
|
return if ($self->check_exclude(section => 'raid'));
|
||||||
|
|
||||||
my $results = $self->{snmp}->get_table(oid => $oid_synoRaid, start => $oid_synoRaidraidName, end => $oid_synoRaidraidStatus, nothing_quit => 1);
|
my $results = $self->{snmp}->get_table(oid => $oid_synoRaid, start => $oid_synoRaidraidName, end => $oid_synoRaidraidStatus);
|
||||||
|
|
||||||
my $instance = 0;
|
|
||||||
|
|
||||||
foreach my $key ($self->{snmp}->oid_lex_sort(keys %$results)) {
|
foreach my $key ($self->{snmp}->oid_lex_sort(keys %$results)) {
|
||||||
next if ($key !~ /^$oid_synoRaidraidName\.(.*)/);
|
next if ($key !~ /^$oid_synoRaidraidName\.(.*)/);
|
||||||
my $id = $1;
|
my $id = $1;
|
||||||
$instance = $1;
|
my $instance = $1;
|
||||||
my $raid_name = $results->{$key};
|
my $raid_name = $results->{$key};
|
||||||
my $raid_state = $results->{$oid_synoRaidraidStatus . '.' . $id};
|
my $raid_state = $results->{$oid_synoRaidraidStatus . '.' . $id};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue