This commit is contained in:
garnier-quentin 2020-06-15 09:28:06 +02:00
parent 6579e230be
commit 44e4999e2a
4 changed files with 28 additions and 20 deletions

View File

@ -28,23 +28,26 @@ use warnings;
my $mapping = { my $mapping = {
v6 => { v6 => {
diskState => { oid => '.1.3.6.1.4.1.4526.22.3.1.9' }, diskState => { oid => '.1.3.6.1.4.1.4526.22.3.1.9' },
diskTemperature => { oid => '.1.3.6.1.4.1.4526.22.3.1.10' }, diskTemperature => { oid => '.1.3.6.1.4.1.4526.22.3.1.10' }
}, },
v4 => { v4 => {
diskState => { oid => '.1.3.6.1.4.1.4526.18.3.1.4' }, diskState => { oid => '.1.3.6.1.4.1.4526.18.3.1.4' },
diskTemperature => { oid => '.1.3.6.1.4.1.4526.18.3.1.5' }, diskTemperature => { oid => '.1.3.6.1.4.1.4526.18.3.1.5' }
}, }
}; };
my $oid_diskTable = { my $oid_diskTable = {
v4 => '.1.3.6.1.4.1.4526.18.3', v4 => '.1.3.6.1.4.1.4526.18.3',
v6 => '.1.3.6.1.4.1.4526.22.3', v6 => '.1.3.6.1.4.1.4526.22.3'
}; };
sub load { sub load {
my ($self) = @_; my ($self) = @_;
push @{$self->{request}}, { oid => $oid_diskTable->{$self->{mib_ver}}, push @{$self->{request}}, {
start => $mapping->{$self->{mib_ver}}->{diskState}, end => $mapping->{$self->{mib_ver}}->{diskTemperature} }; oid => $oid_diskTable->{$self->{mib_ver}},
start => $mapping->{$self->{mib_ver}}->{diskState}->{oid},
end => $mapping->{$self->{mib_ver}}->{diskTemperature}->{oid}
};
} }
sub check { sub check {

View File

@ -30,8 +30,8 @@ my $mapping = {
psuStatus => { oid => '.1.3.6.1.4.1.4526.22.8.1.3' }, psuStatus => { oid => '.1.3.6.1.4.1.4526.22.8.1.3' },
}, },
v4 => { v4 => {
psuStatus => { oid => '.1.3.6.1.4.1.4526.18.8.1.3' }, psuStatus => { oid => '.1.3.6.1.4.1.4526.18.8.1.3' }
}, }
}; };
sub load { sub load {

View File

@ -29,23 +29,25 @@ my $mapping = {
v6 => { v6 => {
temperatureValue => { oid => '.1.3.6.1.4.1.4526.22.5.1.2' }, temperatureValue => { oid => '.1.3.6.1.4.1.4526.22.5.1.2' },
temperatureType => { oid => '.1.3.6.1.4.1.4526.22.5.1.3' }, temperatureType => { oid => '.1.3.6.1.4.1.4526.22.5.1.3' },
temperatureMax => { oid => '.1.3.6.1.4.1.4526.22.5.1.5' }, temperatureMax => { oid => '.1.3.6.1.4.1.4526.22.5.1.5' }
}, },
v4 => { v4 => {
temperatureValue => { oid => '.1.3.6.1.4.1.4526.18.5.1.2' }, temperatureValue => { oid => '.1.3.6.1.4.1.4526.18.5.1.2' },
temperatureStatus => { oid => '.1.3.6.1.4.1.4526.18.5.1.3' }, temperatureStatus => { oid => '.1.3.6.1.4.1.4526.18.5.1.3' }
}, }
}; };
my $oid_temperatureTable = { my $oid_temperatureTable = {
v4 => '.1.3.6.1.4.1.4526.18.5', v4 => '.1.3.6.1.4.1.4526.18.5',
v6 => '.1.3.6.1.4.1.4526.22.5', v6 => '.1.3.6.1.4.1.4526.22.5'
}; };
sub load { sub load {
my ($self) = @_; my ($self) = @_;
push @{$self->{request}}, { oid => $oid_temperatureTable->{$self->{mib_ver}}, push @{$self->{request}}, {
start => $mapping->{$self->{mib_ver}}->{temperatureValue} }; oid => $oid_temperatureTable->{$self->{mib_ver}},
start => $mapping->{$self->{mib_ver}}->{temperatureValue}->{oid}
};
} }
sub check { sub check {

View File

@ -28,23 +28,26 @@ use warnings;
my $mapping = { my $mapping = {
v6 => { v6 => {
volumeName => { oid => '.1.3.6.1.4.1.4526.22.7.1.2' }, volumeName => { oid => '.1.3.6.1.4.1.4526.22.7.1.2' },
volumeStatus => { oid => '.1.3.6.1.4.1.4526.22.7.1.4' }, volumeStatus => { oid => '.1.3.6.1.4.1.4526.22.7.1.4' }
}, },
v4 => { v4 => {
volumeName => { oid => '.1.3.6.1.4.1.4526.18.7.1.2' }, volumeName => { oid => '.1.3.6.1.4.1.4526.18.7.1.2' },
volumeStatus => { oid => '.1.3.6.1.4.1.4526.18.7.1.4' }, volumeStatus => { oid => '.1.3.6.1.4.1.4526.18.7.1.4' }
}, }
}; };
my $oid_volumeTable = { my $oid_volumeTable = {
v4 => '.1.3.6.1.4.1.4526.18.7', v4 => '.1.3.6.1.4.1.4526.18.7',
v6 => '.1.3.6.1.4.1.4526.22.7', v6 => '.1.3.6.1.4.1.4526.22.7'
}; };
sub load { sub load {
my ($self) = @_; my ($self) = @_;
push @{$self->{request}}, { oid => $oid_volumeTable->{$self->{mib_ver}}, push @{$self->{request}}, {
start => $mapping->{$self->{mib_ver}}->{volumeName}, end => $mapping->{$self->{mib_ver}}->{volumeStatus} }; oid => $oid_volumeTable->{$self->{mib_ver}},
start => $mapping->{$self->{mib_ver}}->{volumeName}->{oid},
end => $mapping->{$self->{mib_ver}}->{volumeStatus}->{oid}
};
} }
sub check { sub check {