-
Notifications
You must be signed in to change notification settings - Fork 277
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
Use of uninitialized value in addition (+) #4703
Comments
Hi @Benoit221, |
Hi @omercier, We are using Centreon 23.04.9 on Debian 11. Actual centreon plugin is 20230912-083720. root@Deb-Centreon:~/centreon-plugins# perl centreon_plugins.pl --plugin=hardware::sensors::apc::snmp::plugin --mode=sensors --hostname=192.168.1.1 --snmp-community=public --snmp-version=2c --component humidity --warning='humidity,.,45:65' --critical='humidity,.,35:70' --debug |
@Benoit221 I've tested it with your data (see PR comment) so it should work well if you add this simple line to your local code. |
Hi @Benoit221, |
Hello,
When executing this command :
perl centreon_plugins.pl --plugin=hardware::sensors::apc::snmp::plugin --mode=sensors --hostname=192.168.1.1 --snmp-community=public --snmp-version=2c --component humidity --warning='humidity,.,45:65' --critical='humidity,.,35:70'
I obtain this result :
Use of uninitialized value in addition (+) at /usr/lib/centreon/plugins/centreon-plugins/centreon/plugins/templates/hardware.pm line 303.
Use of uninitialized value in addition (+) at /usr/lib/centreon/plugins/centreon-plugins/centreon/plugins/templates/hardware.pm line 304.
Use of uninitialized value in concatenation (.) or string at /usr/lib/centreon/plugins/centreon-plugins/centreon/plugins/templates/hardware.pm line 305.
WARNING: Humidity 'Main Module:Sonde de temperature' is 36 % | 'Main Module:Sonde de temperature#hardware.sensor.humidity.percentage'=36%;45:65;35:70;0;100 'hardware.temperature.count'=1;;;;
Notice that it's working as expected for temperature sensor but not for humidity
Best regards,
B LORAND
The text was updated successfully, but these errors were encountered: