From bb66b7e35bf6e57c28ffb3b5f3185f88ea688865 Mon Sep 17 00:00:00 2001 From: Lucie Dubrunfaut Date: Fri, 20 Dec 2024 15:08:01 +0100 Subject: [PATCH 1/2] fix(environment): wrong oid for psu status and mapping for fan status --- src/hardware/devices/video/axis/snmp/mode/components/fan.pm | 2 +- src/hardware/devices/video/axis/snmp/mode/components/psu.pm | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/hardware/devices/video/axis/snmp/mode/components/fan.pm b/src/hardware/devices/video/axis/snmp/mode/components/fan.pm index 5ae9e53eb1..657cdc30b3 100644 --- a/src/hardware/devices/video/axis/snmp/mode/components/fan.pm +++ b/src/hardware/devices/video/axis/snmp/mode/components/fan.pm @@ -25,7 +25,7 @@ use warnings; my %map_fan_status = ( 0 => 'ok', - 1 => 'failed', + 1 => 'failure', ); my $mapping = { diff --git a/src/hardware/devices/video/axis/snmp/mode/components/psu.pm b/src/hardware/devices/video/axis/snmp/mode/components/psu.pm index a155d5679d..ea6581f66a 100644 --- a/src/hardware/devices/video/axis/snmp/mode/components/psu.pm +++ b/src/hardware/devices/video/axis/snmp/mode/components/psu.pm @@ -24,12 +24,12 @@ use strict; use warnings; my %map_psu_status = ( - 1 => 'ok', - 2 => 'failure', + 0 => 'ok', + 1 => 'failure', ); my $mapping = { - axisPsState => { oid => '.1.3.6.1.4.1.368.4.1.2.1.3', map => \%map_psu_status }, + axisPsState => { oid => '.1.3.6.1.4.1.368.4.1.1.1.3', map => \%map_psu_status }, }; sub load { From 00a39c20a73df6248a9a2df5d7741b35d42bec84 Mon Sep 17 00:00:00 2001 From: Lucie Dubrunfaut Date: Fri, 20 Dec 2024 15:14:31 +0100 Subject: [PATCH 2/2] fix(environment): wrong mapping --- src/hardware/devices/video/axis/snmp/mode/components/fan.pm | 4 ++-- src/hardware/devices/video/axis/snmp/mode/components/psu.pm | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/hardware/devices/video/axis/snmp/mode/components/fan.pm b/src/hardware/devices/video/axis/snmp/mode/components/fan.pm index 657cdc30b3..b5566725a6 100644 --- a/src/hardware/devices/video/axis/snmp/mode/components/fan.pm +++ b/src/hardware/devices/video/axis/snmp/mode/components/fan.pm @@ -24,8 +24,8 @@ use strict; use warnings; my %map_fan_status = ( - 0 => 'ok', - 1 => 'failure', + 1=> 'ok', + 2 => 'failure', ); my $mapping = { diff --git a/src/hardware/devices/video/axis/snmp/mode/components/psu.pm b/src/hardware/devices/video/axis/snmp/mode/components/psu.pm index ea6581f66a..da3a61a3ac 100644 --- a/src/hardware/devices/video/axis/snmp/mode/components/psu.pm +++ b/src/hardware/devices/video/axis/snmp/mode/components/psu.pm @@ -24,8 +24,8 @@ use strict; use warnings; my %map_psu_status = ( - 0 => 'ok', - 1 => 'failure', + 1 => 'ok', + 2 => 'failure', ); my $mapping = {