diff --git a/hardware/server/huawei/ibmc/snmp/mode/components/cpu.pm b/hardware/server/huawei/ibmc/snmp/mode/components/cpu.pm index 3bdb09b94..d998cf626 100644 --- a/hardware/server/huawei/ibmc/snmp/mode/components/cpu.pm +++ b/hardware/server/huawei/ibmc/snmp/mode/components/cpu.pm @@ -33,15 +33,19 @@ my %map_status = ( ); my $mapping = { - cpuStatus => { oid => '.1.3.6.1.4.1.2011.2.235.1.1.15.50.1.6', map => \%map_status }, - cpuDevicename => { oid => '.1.3.6.1.4.1.2011.2.235.1.1.15.50.1.10' }, + cpuStatus => { oid => '.1.3.6.1.4.1.2011.2.235.1.1.15.50.1.6', map => \%map_status }, + cpuDevicename => { oid => '.1.3.6.1.4.1.2011.2.235.1.1.15.50.1.10' }, }; my $oid_cpuDescriptionEntry = '.1.3.6.1.4.1.2011.2.235.1.1.15.50.1'; sub load { my ($self) = @_; - push @{$self->{request}}, { oid => $oid_cpuDescriptionEntry }; + push @{$self->{request}}, { + oid => $oid_cpuDescriptionEntry, + start => $mapping->{cpuStatus}->{oid}, + end => $mapping->{cpuDevicename}->{oid}, + }; } sub check { @@ -72,4 +76,4 @@ sub check { } } -1; \ No newline at end of file +1; diff --git a/hardware/server/huawei/ibmc/snmp/mode/components/harddisk.pm b/hardware/server/huawei/ibmc/snmp/mode/components/harddisk.pm index 0efcda209..e716d3216 100644 --- a/hardware/server/huawei/ibmc/snmp/mode/components/harddisk.pm +++ b/hardware/server/huawei/ibmc/snmp/mode/components/harddisk.pm @@ -49,7 +49,11 @@ my $oid_hardDiskDescriptionEntry = '.1.3.6.1.4.1.2011.2.235.1.1.18.50.1'; sub load { my ($self) = @_; - push @{$self->{request}}, { oid => $oid_hardDiskDescriptionEntry }; + push @{$self->{request}}, { + oid => $oid_hardDiskDescriptionEntry, + start => $mapping->{hardDiskPresence}->{oid}, + end => $mapping->{hardDiskTemperature}->{oid}, + }; } sub check { diff --git a/hardware/server/huawei/ibmc/snmp/mode/components/logicaldrive.pm b/hardware/server/huawei/ibmc/snmp/mode/components/logicaldrive.pm index e5342e50e..c0c2f111d 100644 --- a/hardware/server/huawei/ibmc/snmp/mode/components/logicaldrive.pm +++ b/hardware/server/huawei/ibmc/snmp/mode/components/logicaldrive.pm @@ -41,7 +41,10 @@ my $oid_logicalDriveDescriptionEntry = '.1.3.6.1.4.1.2011.2.235.1.1.37.50.1'; sub load { my ($self) = @_; - push @{$self->{request}}, { oid => $oid_logicalDriveDescriptionEntry }; + push @{$self->{request}}, { + oid => $oid_logicalDriveDescriptionEntry, + end => $mapping->{logicalDriveState}->{oid}, + }; } sub check { diff --git a/hardware/server/huawei/ibmc/snmp/mode/components/memory.pm b/hardware/server/huawei/ibmc/snmp/mode/components/memory.pm index 56550df7b..9300bcba0 100644 --- a/hardware/server/huawei/ibmc/snmp/mode/components/memory.pm +++ b/hardware/server/huawei/ibmc/snmp/mode/components/memory.pm @@ -41,7 +41,11 @@ my $oid_memoryDescriptionEntry = '.1.3.6.1.4.1.2011.2.235.1.1.16.50.1'; sub load { my ($self) = @_; - push @{$self->{request}}, { oid => $oid_memoryDescriptionEntry }; + push @{$self->{request}}, { + oid => $oid_memoryDescriptionEntry, + start => $mapping->{memoryStatus}->{oid}, + end => $mapping->{memoryDevicename}->{oid}, + }; } sub check { @@ -72,4 +76,4 @@ sub check { } } -1; \ No newline at end of file +1; diff --git a/hardware/server/huawei/ibmc/snmp/mode/components/pcie.pm b/hardware/server/huawei/ibmc/snmp/mode/components/pcie.pm index 8e0b8bec5..916252feb 100644 --- a/hardware/server/huawei/ibmc/snmp/mode/components/pcie.pm +++ b/hardware/server/huawei/ibmc/snmp/mode/components/pcie.pm @@ -48,7 +48,11 @@ my $oid_pCIeDescriptionEntry = '.1.3.6.1.4.1.2011.2.235.1.1.24.50.1'; sub load { my ($self) = @_; - push @{$self->{request}}, { oid => $oid_pCIeDescriptionEntry }; + push @{$self->{request}}, { + oid => $oid_pCIeDescriptionEntry, + start => $mapping->{pCIePresence}->{oid}, + end => $mapping->{pCIeDevicename}->{oid}, + }; } sub check { @@ -79,4 +83,4 @@ sub check { } } -1; \ No newline at end of file +1; diff --git a/hardware/server/huawei/ibmc/snmp/mode/components/psu.pm b/hardware/server/huawei/ibmc/snmp/mode/components/psu.pm index 29ef12462..a5aa384b1 100644 --- a/hardware/server/huawei/ibmc/snmp/mode/components/psu.pm +++ b/hardware/server/huawei/ibmc/snmp/mode/components/psu.pm @@ -50,7 +50,10 @@ my $oid_powerSupplyDescriptionEntry = '.1.3.6.1.4.1.2011.2.235.1.1.6.50.1'; sub load { my ($self) = @_; - push @{$self->{request}}, { oid => $oid_powerSupplyDescriptionEntry }; + push @{$self->{request}}, { + oid => $oid_powerSupplyDescriptionEntry, + start => $mapping->{powerSupplyPowerRating}->{oid}, + }; } sub check { diff --git a/hardware/server/huawei/ibmc/snmp/mode/components/raidcontroller.pm b/hardware/server/huawei/ibmc/snmp/mode/components/raidcontroller.pm index 15ad9e5e5..5c45be5fb 100644 --- a/hardware/server/huawei/ibmc/snmp/mode/components/raidcontroller.pm +++ b/hardware/server/huawei/ibmc/snmp/mode/components/raidcontroller.pm @@ -24,15 +24,19 @@ use strict; use warnings; my $mapping = { - raidControllerHealthStatus => { oid => '.1.3.6.1.4.1.2011.2.235.1.1.36.50.1.7' }, raidControllerComponentName => { oid => '.1.3.6.1.4.1.2011.2.235.1.1.36.50.1.4' }, + raidControllerHealthStatus => { oid => '.1.3.6.1.4.1.2011.2.235.1.1.36.50.1.7' }, }; my $oid_raidControllerDescriptionEntry = '.1.3.6.1.4.1.2011.2.235.1.1.36.50.1'; sub load { my ($self) = @_; - push @{$self->{request}}, { oid => $oid_raidControllerDescriptionEntry }; + push @{$self->{request}}, { + oid => $oid_raidControllerDescriptionEntry, + start => $mapping->{raidControllerComponentName}->{oid}, + end => $mapping->{raidControllerHealthStatus}->{oid}, + }; } sub check { diff --git a/hardware/server/huawei/ibmc/snmp/mode/components/temperature.pm b/hardware/server/huawei/ibmc/snmp/mode/components/temperature.pm index 3a3ac26b0..5992cc911 100644 --- a/hardware/server/huawei/ibmc/snmp/mode/components/temperature.pm +++ b/hardware/server/huawei/ibmc/snmp/mode/components/temperature.pm @@ -32,7 +32,11 @@ my $oid_temperatureDescriptionEntry = '.1.3.6.1.4.1.2011.2.235.1.1.26.50.1'; sub load { my ($self) = @_; - push @{$self->{request}}, { oid => $oid_temperatureDescriptionEntry }; + push @{$self->{request}}, { + oid => $oid_temperatureDescriptionEntry, + start => $mapping->{temperatureObject}->{oid}, + end => $mapping->{temperatureReading}->{oid}, + }; } sub check {