]> arthur.barton.de Git - netdata.git/commitdiff
info logs when alarms are raised
authorCosta Tsaousis <costa@tsaousis.gr>
Mon, 15 Aug 2016 00:54:43 +0000 (03:54 +0300)
committerCosta Tsaousis <costa@tsaousis.gr>
Mon, 15 Aug 2016 00:54:43 +0000 (03:54 +0300)
src/health.c

index ed0cdfc68f2ae6765b248cde0004eeed9492d90d..68fdbcd127db7c9ce3af6f772c63d4963ca9b7d6 100644 (file)
@@ -1600,6 +1600,14 @@ void *health_main(void *ptr) {
                               rc->name, rc->warning->result,
                               buffer_tostring(rc->warning->error_msg)
                         );
+
+                        if(rc->warning->result)
+                            info("WARNING ALARM '%s' - expression '%s' evaluated to %Lf, %s (source: %s)",
+                                 rc->name,
+                                 rc->warning->source,
+                                 rc->warning->result,
+                                 buffer_tostring(rc->warning->error_msg),
+                                 rc->source);
                     }
                 }
 
@@ -1614,6 +1622,14 @@ void *health_main(void *ptr) {
                               rc->name, rc->critical->result,
                               buffer_tostring(rc->critical->error_msg)
                         );
+
+                        if(rc->critical->result)
+                            info("CRITICAL ALARM '%s' - expression '%s' evaluated to %Lf, %s (source: %s)",
+                                 rc->name,
+                                 rc->critical->source,
+                                 rc->critical->result,
+                                 buffer_tostring(rc->critical->error_msg),
+                                 rc->source);
                     }
                 }