thomas-krenn / check_ipmi_sensor_v3

Monitoring plugin to check IPMI sensors
https://www.thomas-krenn.com/en/wiki/IPMI_Sensor_Monitoring_Plugin
GNU General Public License v3.0
54 stars 21 forks source link

Relaxed matching of Removed/Absent Device/Entity #17

Closed flohoff closed 6 years ago

flohoff commented 7 years ago

Hi, please include this patch - it relaxes the matching for absent/removed devices/entitys a bit.

diff --git a/check_ipmi_sensor b/check_ipmi_sensor index a735b7e..fcc95fd 100755 --- a/check_ipmi_sensor

+++ b/check_ipmi_sensor
@@ -764,7 +764,7 @@ MAIN: {
                                $row->{'name'} =~ s/ /_/g;
                        }
                        my $check_sensor_state = 1;
-                       if($no_entity_absent && ($row->{'event'} eq '\'Entity Absent\'')){
+                       if($no_entity_absent && ($row->{'event'} =~ /\'.*((Device|Entity) (Absent|Removed)).*\'/)) {
                                $check_sensor_state = 0;
                        }
                        #check for warning sensors
gschoenberger commented 6 years ago

Can you test commit 68588829106159984c9b528052979725145723f0 ?

flohoff commented 6 years ago

I left the company and dont have access to Supermicro/TK Servers anymore - but i notified my former collegues to check and update their internal tools.

gschoenberger commented 6 years ago

Closing due to inactivity and the commit is already merged...