Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[hardware::server::hp::ilo::restapi::plugin] '--mode' 'hardware' Use of uninitialized value in pattern match (m//) #5222

Open
Wintermute2k6 opened this issue Oct 8, 2024 · 1 comment

Comments

@Wintermute2k6
Copy link

Quick description

Plugin version : 20240909

When using the following command:

./centreon_plugins.pl '--plugin' 'hardware::server::hp::ilo::restapi::plugin' '--mode' 'hardware' '--api-username' 'redacted' '--hostname' 'somewhere' '--api-password' 'redacted' '--ssl-opt' 'SSL_verify_mode => SSL_VERIFY_NONE'

We encounter: the following errors:

Use of uninitialized value in sprintf at /usr/lib/nagios/plugins/centreon-plugins/src/centreon/common/redfish/restapi/mode/components/chassis.pm line 46.
Use of uninitialized value $options{"value"} in pattern match (m//) at /usr/lib/nagios/plugins/centreon-plugins/src/centreon/plugins/templates/hardware.pm line 468.
Use of uninitialized value $options{"value"} in pattern match (m//) at /usr/lib/nagios/plugins/centreon-plugins/src/centreon/plugins/templates/hardware.pm line 468.

How to reproduce

Just use the centreon-plugins against an fresh
https://buy.hpe.com/de/de/synergy/synergy-compute/synergy-compute-modules/synergy-compute-modules/hpe-synergy-480-gen11-computing-modul/p/1014705721

with /redfish/v1/

and MR_RAID instead of SMARTARRAY

below the errors the check seems to return the other values correctly:

OK: All 50 components are ok [2/2 chassis, 10/10 devices, 1/1 fans, 37/37 temperatures]. | 'chassis:1~Fan 1#hardware.fan.speed.percentage'=24%;;;0;100 'chassis:1~01-Inlet Ambient#hardware.temperature.celsius'=23C;0:42;0:47;; 'chassis:1~02-CPU 1 PkgTmp#hardware.temperature.celsius'=42C;0:96;;; 'chassis:1~03-CPU 2 PkgTmp#hardware.temperature.celsius'=47C;0:96;;; 'chassis:1~04-P1 DIMM 1-8#hardware.temperature.celsius'=34C;0:92;;; 'chassis:1~06-P1 DIMM 9-16#hardware.temperature.celsius'=33C;0:92;;; 'chassis:1~08-P2 DIMM 1-8#hardware.temperature.celsius'=38C;0:92;;; 'chassis:1~10-P2 DIMM 9-16#hardware.temperature.celsius'=36C;0:92;;; 'chassis:1~12-VR P1#hardware.temperature.celsius'=49C;0:110;0:115;; 'chassis:1~13-VR P2#hardware.temperature.celsius'=50C;0:110;0:115;; 'chassis:1~18-Chipset#hardware.temperature.celsius'=44C;0:100;;; 'chassis:1~19-BMC#hardware.temperature.celsius'=53C;0:110;0:115;; 'chassis:1~26-P1 Mem Zone 1#hardware.temperature.celsius'=33C;0:90;0:95;; 'chassis:1~27-P1 Mem Zone 2#hardware.temperature.celsius'=33C;0:90;0:95;; 'chassis:1~28-I/O Zone 1#hardware.temperature.celsius'=36C;0:85;0:90;; 'chassis:1~29-I/O Zone 2#hardware.temperature.celsius'=38C;0:85;0:90;; 'chassis:1~30-I/O Zone 3#hardware.temperature.celsius'=39C;0:85;0:90;; 'chassis:1~31-E-Fuse#hardware.temperature.celsius'=39C;0:100;0:105;; 'chassis:1~32-Sys Exhaust 1#hardware.temperature.celsius'=34C;0:80;0:85;; 'chassis:1~33-Sys Exhaust 2#hardware.temperature.celsius'=35C;0:80;0:85;; 'chassis:1~62-CPU 1#hardware.temperature.celsius'=40C;0:70;;; 'chassis:1~63-CPU 2#hardware.temperature.celsius'=40C;0:70;;; 'chassis:1~16.1-ExpBayBoot-I/O controller#hardware.temperature.celsius'=46C;0:100;0:105;; 'chassis:1~16.2-ExpBayBoot-I/O controller#hardware.temperature.celsius'=28C;0:75;0:80;; 'chassis:1~20.1-Mezz 1-I/O module#hardware.temperature.celsius'=45C;0:105;0:110;; 'chassis:1~21.1-Mezz 1 Inlet-External Envir#hardware.temperature.celsius'=33C;0:85;;; 'chassis:1~21.2-Mezz 1 Inlet-External Envir#hardware.temperature.celsius'=33C;0:85;;; 'chassis:1~24.1-Mezz 3-I/O module#hardware.temperature.celsius'=60C;0:110;0:115;; 'chassis:1~25.1-Mezz 3 Inlet-External Envir#hardware.temperature.celsius'=38C;0:75;0:110;; 'hardware.chassis.count'=2;;;; 'hardware.device.count'=10;;;; 'hardware.fan.count'=1;;;; 'hardware.temperature.count'=37;;;;
  • Environment: result of uname -a ; cat /etc/redhat-release /etc/debian_version.
uname -a 
Linux  5.4.0-193-generic #213-Ubuntu SMP Fri Aug 2 19:14:16 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.6 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.6 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
  • Version of the plugin: version of the package or last commit date if using a clone of this repository.
Version of the plugin 20240909

Expected result

I guess the information which should be queried by $options{"value"} without the error message

Actual result

./centreon_plugins.pl '--plugin' 'hardware::server::hp::ilo::restapi::plugin' '--mode' 'hardware' '--api-username' 'redacted' '--hostname' 'somewhere' '--api-password' 'redacted' '--ssl-opt' 'SSL_verify_mode => SSL_VERIFY_NONE' 
Use of uninitialized value in sprintf at /usr/lib/nagios/plugins/centreon-plugins/src/centreon/common/redfish/restapi/mode/components/chassis.pm line 46.
Use of uninitialized value $options{"value"} in pattern match (m//) at /usr/lib/nagios/plugins/centreon-plugins/src/centreon/plugins/templates/hardware.pm line 468.
Use of uninitialized value $options{"value"} in pattern match (m//) at /usr/lib/nagios/plugins/centreon-plugins/src/centreon/plugins/templates/hardware.pm line 468.
OK: All 50 components are ok [2/2 chassis, 10/10 devices, 1/1 fans, 37/37 temperatures]. | 'chassis:1~Fan 1#hardware.fan.speed.percentage'=24%;;;0;100 'chassis:1~01-Inlet Ambient#hardware.temperature.celsius'=23C;0:42;0:47;; 'chassis:1~02-CPU 1 PkgTmp#hardware.temperature.celsius'=42C;0:96;;; 'chassis:1~03-CPU 2 PkgTmp#hardware.temperature.celsius'=47C;0:96;;; 'chassis:1~04-P1 DIMM 1-8#hardware.temperature.celsius'=34C;0:92;;; 'chassis:1~06-P1 DIMM 9-16#hardware.temperature.celsius'=33C;0:92;;; 'chassis:1~08-P2 DIMM 1-8#hardware.temperature.celsius'=38C;0:92;;; 'chassis:1~10-P2 DIMM 9-16#hardware.temperature.celsius'=36C;0:92;;; 'chassis:1~12-VR P1#hardware.temperature.celsius'=49C;0:110;0:115;; 'chassis:1~13-VR P2#hardware.temperature.celsius'=50C;0:110;0:115;; 'chassis:1~18-Chipset#hardware.temperature.celsius'=44C;0:100;;; 'chassis:1~19-BMC#hardware.temperature.celsius'=53C;0:110;0:115;; 'chassis:1~26-P1 Mem Zone 1#hardware.temperature.celsius'=33C;0:90;0:95;; 'chassis:1~27-P1 Mem Zone 2#hardware.temperature.celsius'=33C;0:90;0:95;; 'chassis:1~28-I/O Zone 1#hardware.temperature.celsius'=36C;0:85;0:90;; 'chassis:1~29-I/O Zone 2#hardware.temperature.celsius'=38C;0:85;0:90;; 'chassis:1~30-I/O Zone 3#hardware.temperature.celsius'=39C;0:85;0:90;; 'chassis:1~31-E-Fuse#hardware.temperature.celsius'=39C;0:100;0:105;; 'chassis:1~32-Sys Exhaust 1#hardware.temperature.celsius'=34C;0:80;0:85;; 'chassis:1~33-Sys Exhaust 2#hardware.temperature.celsius'=35C;0:80;0:85;; 'chassis:1~62-CPU 1#hardware.temperature.celsius'=40C;0:70;;; 'chassis:1~63-CPU 2#hardware.temperature.celsius'=40C;0:70;;; 'chassis:1~16.1-ExpBayBoot-I/O controller#hardware.temperature.celsius'=46C;0:100;0:105;; 'chassis:1~16.2-ExpBayBoot-I/O controller#hardware.temperature.celsius'=28C;0:75;0:80;; 'chassis:1~20.1-Mezz 1-I/O module#hardware.temperature.celsius'=45C;0:105;0:110;; 'chassis:1~21.1-Mezz 1 Inlet-External Envir#hardware.temperature.celsius'=33C;0:85;;; 'chassis:1~21.2-Mezz 1 Inlet-External Envir#hardware.temperature.celsius'=33C;0:85;;; 'chassis:1~24.1-Mezz 3-I/O module#hardware.temperature.celsius'=60C;0:110;0:115;; 'chassis:1~25.1-Mezz 3 Inlet-External Envir#hardware.temperature.celsius'=38C;0:75;0:110;; 'hardware.chassis.count'=2;;;; 'hardware.device.count'=10;;;; 'hardware.fan.count'=1;;;; 'hardware.temperature.count'=37;;;;
@lucie-dubrunfaut
Copy link
Contributor

Hello :)

Can you provide us the output with the --verbose and --debug optionset (to better understand where the issue occurs)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants