From 31347674f780616f2e47caa447b194dcb06acda5 Mon Sep 17 00:00:00 2001 From: UrBnW <40244829+UrBnW@users.noreply.github.com> Date: Thu, 16 Apr 2020 19:18:56 +0200 Subject: [PATCH] Better handle Blade/Flex temp thresholds --- centreon/common/ibm/nos/snmp/mode/components/temperature.pm | 5 +++++ .../lenovo/flexsystem/snmp/mode/components/temperature.pm | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/centreon/common/ibm/nos/snmp/mode/components/temperature.pm b/centreon/common/ibm/nos/snmp/mode/components/temperature.pm index 704bf3121..bba2b8448 100644 --- a/centreon/common/ibm/nos/snmp/mode/components/temperature.pm +++ b/centreon/common/ibm/nos/snmp/mode/components/temperature.pm @@ -47,6 +47,11 @@ sub check { $temperature = $1 if ($1 > $temperature); my $critical_mib = ($warning_mib + $2) / 2; + if ($warning_mib == $critical_mib) { #seen on some chassis ! + $warning_mib -= 10; + $critical_mib -= 5; + } + $self->{components}->{temperature}->{total}++; $self->{output}->output_add(long_msg => diff --git a/network/lenovo/flexsystem/snmp/mode/components/temperature.pm b/network/lenovo/flexsystem/snmp/mode/components/temperature.pm index 76bc6ca46..b7d0529b4 100644 --- a/network/lenovo/flexsystem/snmp/mode/components/temperature.pm +++ b/network/lenovo/flexsystem/snmp/mode/components/temperature.pm @@ -60,6 +60,11 @@ sub check { $temperature = $1 if ($1 > $temperature); my $critical_mib = ($warning_mib + $2) / 2; + if ($warning_mib == $critical_mib) { #seen on some chassis ! + $warning_mib -= 10; + $critical_mib -= 5; + } + $self->{output}->output_add( long_msg => sprintf( "temperature switch '%s' is %s C [instance: %s]",